Skip to content

feat(ui): add right-click tray menu with Settings and Quit - #40

Merged
DevVig merged 1 commit into
mainfrom
feat/tray-context-menu
Jul 18, 2026
Merged

feat(ui): add right-click tray menu with Settings and Quit#40
DevVig merged 1 commit into
mainfrom
feat/tray-context-menu

Conversation

@DevVig

@DevVig DevVig commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Why

The menu bar icon only handled left-click (toggle popover) — there was no way to quit the app or jump to settings from the tray. This adds the standard macOS right-click context menu.

What

Right-click the Microbridge tray icon → context menu:

  • Settings… — opens the settings window (reuses the same path as the open_settings command via a new show_settings_window helper). The settings surface itself is still being built out; this just wires the jump.
  • Quit Microbridge (⌘Q) — exits the app cleanly (app.exit(0)).

Left-click is unchanged — it still toggles the popover. show_menu_on_left_click(false) scopes the menu to right-click only, so the existing on_tray_icon_event left-click handler keeps working.

Notes

  • Menu is built entirely in Rust core (tauri::menu), so no JS capability/permission changes are needed; the tray-icon feature is already enabled.
  • CI builds the Rust tauri crate only at release time, so I verified cargo build on apps/microbridge-ui/src-tauri compiles locally.

🤖 Generated with Claude Code

The menu bar icon only handled left-click (toggle popover), so there was no
way to quit the app or reach settings from the tray. Add a right-click
context menu:

- Settings… — opens the settings window (shares the same code path as the
  open_settings command via a new show_settings_window helper).
- Quit Microbridge (⌘Q) — exits the app.

Left-click still toggles the popover: show_menu_on_left_click(false) keeps the
menu on right-click only, so the existing on_tray_icon_event left-click handler
is unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 18, 2026 14:28
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 62525fc9-e741-4112-ada4-0a16e603e9b1

📥 Commits

Reviewing files that changed from the base of the PR and between 4959494 and 196268c.

📒 Files selected for processing (1)
  • apps/microbridge-ui/src-tauri/src/lib.rs

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

@DevVig
DevVig merged commit f0aec5f into main Jul 18, 2026
7 checks passed
@DevVig
DevVig deleted the feat/tray-context-menu branch July 18, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a macOS tray right-click context menu to the Tauri UI app so users can open Settings or quit from the menu bar icon, while keeping the existing left-click popover behavior.

Changes:

  • Introduces a Rust-side tray context menu (Settings…, Quit Microbridge) using tauri::menu.
  • Adds a show_settings_window helper shared by the tray menu and the open_settings Tauri command.
  • Configures the tray to show the menu on right-click only (show_menu_on_left_click(false)), preserving left-click popover toggling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +131 to 135
#[tauri::command]
async fn open_settings(app: AppHandle) -> Result<(), String> {
show_settings_window(&app);
Ok(())
}
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.

2 participants