Skip to content

Add setting to turn off menu card hover highlight - #870

Merged
Finesssee merged 1 commit into
mainfrom
feat/menu-card-hover-toggle
Oct 15, 2026
Merged

Finesssee merged 1 commit into
mainfrom
feat/menu-card-hover-toggle

Conversation

@Finesssee

@Finesssee Finesssee commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Ports upstream steipete#4414 (2786ed90e: 4e6a964ff, 6cd1b24bc), "Highlight menu cards on hover".

  • New setting highlight_menu_cards_on_hover (highlightMenuCardsOnHover), on by default; old settings files load with the default. Excluded from the preferences export, as upstream.
  • Settings > Menu: a switch as the first row of the Content group, label only (upstream text and translations).
  • Tray panel: when off, the panel gets menu-surface--hover-highlight-off, and the Refresh row no longer highlights under the pointer. Keyboard focus (:focus-visible) still highlights it.

Deviations from upstream

  • Upstream turns off the pointer highlight on hosted rows: clickable provider/Overview cards and Refresh. On Windows the provider and Overview cards have no hover highlight or click handler, so only Refresh changes. The other footer rows stand in for native menu items, which still highlight upstream.
  • Upstream tracks keyboard selection explicitly; here :focus-visible does the same job.

Validation

  • cargo fmt --all -- --check, clippy -D warnings on both manifests
  • cargo test: rust 4421 passed, Tauri 718 passed (before rebase); after rebase onto 92e9c2d0b: Tauri settings tests 61 passed
  • pnpm test (124 files after rebase), tsc --noEmit, pnpm run build
  • New tests: settings default/round-trip, camelCase patch, snapshot, export exclusion; Vitest for the MenuTab switch, MenuSurface class, TrayPanel wiring, and the stylesheet rules. The four Vitest tests failed before the change; two Rust mutations (default false, serde default) each failed the new test.

UI proof (CDP + CUA, fresh debug build)

Temporary settings with only Codex enabled and a synthetic Codex snapshot; driven by CDP mouse events, screenshots from cua-driver in the background.

  • Settings > Menu: switch on by default; a click turns it off and saves false; window stays dark.
  • Tray panel after restart: off value kept; hovering Refresh shows no highlight (transparent background), hovering Settings… still highlights; turning it back on restores the Refresh highlight.
  • Settings and window geometry restored SHA-exact.
  • Not covered: keyboard focus with the setting off in the live app (stylesheet test only); tray icon and native tray menu (untouched).

Summary by CodeRabbit

  • New Features
    • Added a setting to control whether the tray panel’s Refresh row highlights on pointer hover. It’s enabled by default and can be turned off under Settings > Menu.
    • Keyboard-focus highlighting remains enabled, and other menu rows are unaffected.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: nesszer/Win-CodexBar/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 29705684-46f3-44dc-96de-1255031bdbbc
📥 Commits

Reviewing files that changed from the base of the PR and between 92e9c2d and ec6bc0d.

📒 Files selected for processing: 29
  • CHANGELOG.md
  • apps/desktop-tauri/src-tauri/src/commands/bridge.rs
  • apps/desktop-tauri/src-tauri/src/commands/settings.rs
  • apps/desktop-tauri/src/components/MenuSurface.test.tsx
  • apps/desktop-tauri/src/components/MenuSurface.tsx
  • apps/desktop-tauri/src/i18n/keys.ts
  • apps/desktop-tauri/src/styles.css
  • apps/desktop-tauri/src/surfaces/TrayPanel.test.tsx
  • apps/desktop-tauri/src/surfaces/TrayPanel.tsx
  • apps/desktop-tauri/src/surfaces/settings/tabs/MenuTab.test.tsx
  • apps/desktop-tauri/src/surfaces/settings/tabs/MenuTab.tsx
  • apps/desktop-tauri/src/surfaces/trayCardStyles.test.ts
  • apps/desktop-tauri/src/types/bridge.ts
  • rust/src/locale.rs
  • rust/src/locale/en-US.ftl
  • rust/src/locale/es-MX.ftl
  • rust/src/locale/ja-JP.ftl
  • rust/src/locale/ko-KR.ftl
  • rust/src/locale/pt-BR.ftl
  • rust/src/locale/ru-RU.ftl
  • rust/src/locale/tr-TR.ftl
  • rust/src/locale/uk-UA.ftl
  • rust/src/locale/zh-CN.ftl
  • rust/src/locale/zh-TW.ftl
  • rust/src/settings.rs
  • rust/src/settings/preferences_document.rs
  • rust/src/settings/preferences_document/tests.rs
  • rust/src/settings/raw.rs
  • rust/src/settings/tests.rs

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

📝 Walkthrough

Adds a default-on setting to control pointer-hover highlighting for the tray panel’s Refresh row. The setting is persisted, exposed in Menu settings, and applied to both tray panel views. Disabling it preserves keyboard-focus highlighting and leaves other menu rows unchanged.

Changes: Menu Hover Highlight

Layer / File(s) Summary
Preference storage and bridge
rust/src/settings*, rust/src/settings/raw.rs, rust/src/settings/preferences_document*, apps/desktop-tauri/src-tauri/src/commands/{bridge,settings}.rs, apps/desktop-tauri/src/types/bridge.ts
Adds the default-on preference to Rust settings and the desktop settings bridge. Missing values default to true. The preference is excluded from portable settings exports.
Settings toggle and labels
apps/desktop-tauri/src/surfaces/settings/tabs/MenuTab*, apps/desktop-tauri/src/i18n/keys.ts, rust/src/locale*
Adds the Menu settings toggle and localized labels. The toggle defaults to enabled when unset and saves changes through the settings update.
Tray hover rendering
apps/desktop-tauri/src/components/MenuSurface*, apps/desktop-tauri/src/surfaces/TrayPanel*, apps/desktop-tauri/src/styles.css, apps/desktop-tauri/src/surfaces/trayCardStyles.test.ts, CHANGELOG.md
Passes the setting to both tray panel views. When disabled, unfocused pointer hover on Refresh keeps its normal text, shortcut, and background colors. Keyboard focus and other footer rows retain their existing styling.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant MenuTab
  participant SettingsUpdate
  participant RustSettings
  participant SettingsSnapshot
  participant TrayPanel
  participant MenuSurface
  MenuTab->>SettingsUpdate: Save highlightMenuCardsOnHover
  SettingsUpdate->>RustSettings: Apply supplied preference
  RustSettings->>SettingsSnapshot: Populate preference value
  SettingsSnapshot->>TrayPanel: Provide setting value
  TrayPanel->>MenuSurface: Pass hoverHighlight to both views
Loading

Suggested reviewers: romeroej2, yozu, pasharm

Merge Risk: ⚪ Minimal · up to ec6bc

The setting preserves keyboard focus and limits the hover change to the intended Refresh row. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 8
Passed Passed checks: 8 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title is a short imperative summary and directly describes the added setting that disables menu card hover highlighting.
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.
Provider Data Stays Siloed Passed PASS. The PR adds one boolean menu-hover preference and UI/CSS wiring for the tray Refresh row. The changed Rust paths only copy, default, serialize, and exclude this non-provider setting. The diff ad…
Secrets Handled Safely Passed The PR adds only a boolean menu setting, UI text, CSS, and tests. The diff contains no token, cookie, API key, OAuth credential, authorization header, or secret material. It adds no logging or user-fa…
No Unapproved Dependencies Passed The authoritative PR diff changes 31 source, test, locale, stylesheet, and changelog files. It does not change any Cargo.toml or package.json, add an npm/yarn lockfile, or change pnpm packageManager p…
Ui Changes Include Windows Proof Passed The pull request changes visible settings and tray UI in MenuTab.tsx, TrayPanel.tsx, MenuSurface.tsx, and styles.css. The description includes a UI proof note from a fresh debug build, with sc…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • 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.

@Finesssee
Finesssee merged commit 66b5481 into main Oct 15, 2026
4 checks passed
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