Skip to content

[settings-panel]: Keep Settings visible and anchored to the tray - #96

Merged
archae0pteryx merged 1 commit into
mainfrom
fix/settings-tray-panel
Oct 21, 2026
Merged

archae0pteryx merged 1 commit into
mainfrom
fix/settings-tray-panel

Conversation

@archae0pteryx

@archae0pteryx archae0pteryx commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Settings could clip its controls: the host used a fixed 380×300 window while the frontend attempted resizing without the required capability. Open a bounded, scrollable Preferences panel beneath the tray icon and keep it above other windows independently of the Widget setting.

 Open Settings
- 380×300 window plus frontend resize observer
+ native 380×620 panel, reduced to the monitor work area
+ tray placement, edge clamping, restore and reposition on reopen
+ vertical scrolling and wrapping display labels

Preserve the Rust-driven notification registry now on main. Conflict resolution keeps startup seeding removed, retains the registry tests, and extends keyboard coverage through dynamically supplied notification controls, including a future source.

Issue: 064 — Settings tray panel

Completion promise:

Opening Settings shows every control inside a usable, vertically scrollable panel that stays above other windows and reopens beneath the Ranch menu-bar icon on macOS, with screen-bounded placement on other platforms.

Evidence

  • Before: Source used a 380×300 native window, a frontend resize call without permission, and clipped viewport overflow.
    After: Six native geometry regressions cover placement, screen boundaries, window decorations, missing tray geometry, and display scaling. Ten Settings component tests cover updates, the notification registry, and keyboard access through twelve display controls and dynamic notification toggles.
  • Rebased head 4d858d89ceaf6f9a3edfbab7e301d18bdf220ec5 onto main at 67140af412436fdcfb1ae1c89bcde395035c127b, after PR [hooks-upgrade]: Upgrade stale hook plugins before reporting success #95 merged.
  • Fresh task check: passed; 342 Rust tests, 179 frontend tests, lint, debug/release Clippy, build/type checks, unused-code checks, and generated-contract checks.
  • Fresh task check:windows: passed. Existing unrelated unused script warning and expected cross-check placeholder-sidecar notice remain.
  • git diff --check: passed. No weakened tests, silenced checks, new dependency, IPC capability, or personal Settings change.

Native GUI acceptance remains pending: this session has not observed actual macOS stacking, tray placement, reanchoring, or rendered scrolling. Issue 064 remains open with both GUI acceptance boxes unchecked. Automated tests do not substitute for that evidence. This PR does not publish a release.

Merge Danger

Door: two-way

Code-only change with no data migration; reverting restores the prior Settings behavior.

Blast Radius: Settings

Native window placement and Preferences layout change; platform-specific visual behavior remains the manual verification gap.

@archae0pteryx

Copy link
Copy Markdown
Contributor Author

Independent reviews of commit 93c1e10:

  • Behavior reviewer: PASS, no findings. Read the complete diff, menu callers, settings workflow, and installed Tauri/Tao/tray-icon coordinate handling. Independently ran all six geometry tests and all six Settings component tests, plus git diff --check.
  • Repository rules reviewer: clean across every changed runtime, test, style and issue file, including callers and the relevant follow-the-rules standards.

Author full gates passed: task check (341 Rust tests, 171 frontend tests and all configured checks) and task check:windows. The main session inspected the diff and full local-gate log and confirmed the fetched base remains unchanged.

Native stacking/reanchoring and rendered scrolling are explicitly unverified because no connected browser/native UI automation surface is available. Issue 064 and those acceptance criteria remain open. Neither review substitutes unit/component results for GUI evidence; this PR is not merged.

@archae0pteryx

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: killallgit/adhd-ranch/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e6192e95-599d-4569-9898-0227352ac594

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: killallgit/adhd-ranch/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 176c76e9-d05e-4b90-8efc-8c9a661861f4
📥 Commits

Reviewing files that changed from the base of the PR and between 7900cc4 and 93c1e10.

📒 Files selected for processing: 7
  • issues/064-settings-tray-panel.md
  • src-tauri/src/app/mod.rs
  • src-tauri/src/app/settings_window.rs
  • src/components/SettingsWindow.test.tsx
  • src/components/SettingsWindow.tsx
  • src/settings.tsx
  • src/styles.css

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The PR adds tray-anchored placement for the Preferences window, with monitor and work-area fallbacks. It removes content-measured resizing and adds a vertically scrollable preferences panel. It also adds keyboard-navigation coverage and numeric-input draft handling.

Changes: Settings tray panel

Layer / File(s) Summary
Tray and monitor placement
issues/064-settings-tray-panel.md, src-tauri/src/app/settings_window.rs
The panel layout selects the roomier side of a tray anchor, constrains dimensions to the work area, and clamps horizontal placement. Monitor selection falls back to the primary monitor and then the first available monitor. Tests cover placement, sizing, fallback, and coordinate conversion. The specification records passing implementation checks and pending GUI checks.
Native window opening
src-tauri/src/app/mod.rs, src-tauri/src/app/settings_window.rs
open_settings_window delegates to settings_window::open. The opening logic reuses or creates the Preferences window, sets it always-on-top, positions it, and shows and focuses it. On macOS, it disables native window movement.
Scrollable preferences content
src/settings.tsx, src/components/SettingsWindow.tsx, src/styles.css, src/components/SettingsWindow.test.tsx
The settings app no longer resizes the window from measured content height. The preferences panel scrolls vertically, and its rows and inputs use the new sizing rules. NumberRow keeps out-of-range input as a draft and clamps parseable drafts on blur. The test checks keyboard navigation through the settings controls.

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant SettingsWindowOpen as settings_window::open
  participant TrayMonitor as Tray and monitor
  participant PreferencesWindow
  App->>SettingsWindowOpen: Open settings
  SettingsWindowOpen->>TrayMonitor: Resolve tray anchor and monitor
  TrayMonitor-->>SettingsWindowOpen: Anchor, work area, and scale
  SettingsWindowOpen->>SettingsWindowOpen: Calculate panel placement
  SettingsWindowOpen->>PreferencesWindow: Position, show, and focus
Loading

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 93c1e

No confirmed issue currently blocks merging. Native placement and rendered scrolling still need the planned GUI acceptance checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the required bracketed slug and an imperative sentence that accurately describes the Settings anchoring and visibility changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@archae0pteryx

Copy link
Copy Markdown
Contributor Author

Checked the CodeRabbit result on head 93c1e105b1a37af40e292ea8ba1eb7f925157c95: no actionable review comments or inline findings were generated, and GitHub CI is green.

The Biome tool warning is a reviewer-tool version mismatch, not a lint finding in the Settings code. CodeRabbit used Biome 2.5.14 while the repository pins Biome 1.9.4 and its schema. Reproducing with an isolated 2.5.14 CLI fails while parsing biome.json (files.ignore and organizeImports are unknown to that major version), before the target file can be linted. Running the repository-owned rtk task lint:web with its pinned version passes all 85 files with no fixes. No project dependencies, lint rules or CodeRabbit configuration were changed to mask this warning.

The existing independent behavior and rules reviews remain valid. Native GUI acceptance in issue 064 remains open; this note does not certify stacking, anchoring or rendered scrolling.

@archae0pteryx
archae0pteryx force-pushed the fix/settings-tray-panel branch from 93c1e10 to 4d858d8 Compare October 21, 2026 20:40
@archae0pteryx

Copy link
Copy Markdown
Contributor Author

Fresh reviews of rebased head 4d858d89ceaf6f9a3edfbab7e301d18bdf220ec5 against main at 67140af412436fdcfb1ae1c89bcde395035c127b, after PR #95 merged:

  • Independent behavior review: PASS, no findings. Full diff/files and menu, tray, Settings, and Widget callers checked. Native coordinate handling checked against the installed Tao/tray-icon implementations.
  • Independent rules review: clean across all seven changed files and their immediate callers/callees/tests.
  • Builder and reviewer independently passed task check and task check:windows: 342 Rust tests, 179 frontend tests, generated contracts, lint/type/build checks, and the Windows cross-check. Existing unrelated Windows warning and placeholder-sidecar notice remain.
  • Conflict resolution preserves removed startup seeding and the Rust-driven notification registry. Keyboard traversal covers twelve displays, all supplied notification sources, a future source, and the final debug controls.
  • Seven files, +356/-42; worktree and diff checks clean. No tests weakened, checks silenced, or unrelated changes added.

Actual native stacking, tray positioning/reanchoring, and rendered scrolling remain unobserved. The user authorized this code merge; issue 064 remains open with those GUI criteria unchecked. This review does not certify GUI acceptance or publish a release.

@archae0pteryx
archae0pteryx merged commit 8ad15a5 into main Oct 21, 2026
2 checks passed
@archae0pteryx
archae0pteryx deleted the fix/settings-tray-panel branch October 21, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant