Menu

#428 fix(tray): dismiss tooltip on right-click, dismiss popover on other-window focus

closed
nobody
None
2026-07-10
2026-07-09
Anonymous
No

Originally created by: Akarsh-Hegde

Summary

Three tray popover bugs found during manual QA of the running dev app (independent of the dashboard style-cleanup work — no file overlap, safe to review/merge on its own):

  1. Hover tooltip stuck visible behind the right-click menu. on_tray_icon_event in tray/src-tauri/src/lib.rs only hid the tooltip on Click { button: Left, button_state: Up } — right-click (which opens the native context menu) was never matched, so nothing dismissed it. Fixed: any click (left or right) now hides the tooltip; only left-click still toggles the popover.

  2. Popover doesn't dismiss when clicking into an already-open dashboard/setup window. install_click_outside_monitor uses macOS's addGlobalMonitorForEventsMatchingMask:, which — per Apple's own docs — only fires for mouse-down events delivered to other processes, never for clicks landing on one of our own windows. So if the dashboard (or setup wizard) was already open in the background and the popover got reopened on top of it, clicking back into that window did nothing. Added dismiss_popover_on_focus (tray/src-tauri/src/commands/system.rs), wired onto both windows' Focused(true) event — the one in-app signal that does fire for a same-app click.

  3. Popover had a visible dark hairline border. Removed the .pop card's border: 1px solid rgba(120, 90, 200, 0.14) in tray/src/style.css — against the transparent NSPanel window it read as a hard dark line; the existing box-shadow provides enough definition on its own.

Test plan

  • [x] cargo check / cargo fmt --check / cargo clippy -D warnings — clean
  • [x] cargo test / UI build / UI tests / security audit — all clean (pre-push hook)
  • [x] Manually verified in a running dev build (tauri dev, this worktree): right-click no longer leaves the tooltip stuck, and the popover border is gone
  • [ ] Manual re-verification of the click-outside-onto-other-window dismiss fix recommended before merge (harder to script than the other two — needs a human clicking between the popover and an already-open dashboard/setup window)

🤖 Generated with Claude Code

Related

Tickets: #440

Discussion

  • Anonymous

    Anonymous - 2026-07-09

    Originally posted by: coderabbitai[bot]

    [!IMPORTANT]

    Review skipped

    Auto reviews are disabled on base/target branches other than the default branch.

    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: Organization UI

    Review profile: ASSERTIVE

    Plan: Pro Plus

    Run ID: ece11c85-1f8f-461a-83b6-366f0d2701ba

    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

    ✨ Finishing Touches
    🧪 Generate unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `fix/tray-popover-dismiss-and-tooltip`

    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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

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

     
  • Anonymous

    Anonymous - 2026-07-10

    Ticket changed by: Akarsh-Hegde

    • status: open --> closed
     

Log in to post a comment.