feat: ship menu bar tray shell with live bus and device twin - #16
Conversation
Make the companion a real macOS status-item app (popover/settings/HUD), keep a persistent UI subscribe, deepen MagicPath fidelity, wire NSWorkspace frontmost tracking in the daemon, and install the .app via Homebrew. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (28)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR turns Microbridge into a shipping macOS menu bar app + daemon experience: it adds a real tray shell with dedicated popover/settings/HUD windows, upgrades the UI to a persistent bus subscription (instead of polling), and extends the daemon to publish a live frontmost_app signal for focus policy. It also updates release packaging + installation docs/scripts/Homebrew so the .app is installed alongside the daemon.
Changes:
- Add macOS frontmost-app tracking in
microbridgedand treatfrontmost_appas runtime-only (not persisted). - Refactor the Tauri UI into a tray-based multi-window app (popover/settings/HUD) with live
bus-snapshotsubscription and new device twin/echo components. - Update release workflow + install scripts + Homebrew formula + docs to ship/install
Microbridge.apptogether with the daemon.
Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/install-from-release.sh | Installs daemon binaries and (macOS) downloads/copies Microbridge.app + sets up launchd |
| README.md | Updates macOS install instructions to include opening the menu bar app |
| INSTALL.md | Clarifies product is not CLI-only; documents app + daemon install locations |
| Formula/microbridge.rb | Homebrew formula now builds/installs the Tauri .app and copies it into ~/Applications |
| docs/governance.md | Documents Homebrew as supported consumer path including opening the app |
| docs/design/README.md | Updates design doc to describe tray/popover/settings/HUD and daemon-owned frontmost tracking |
| crates/microbridged/src/state.rs | Preserves/updates runtime frontmost_app; broadcasts config changes |
| crates/microbridged/src/main.rs | Spawns frontmost watcher and feeds updates into daemon state |
| crates/microbridged/src/lib.rs | Exposes new frontmost module |
| crates/microbridged/src/frontmost.rs | New macOS frontmost app polling watcher using NSWorkspace |
| crates/microbridged/src/config.rs | Clears frontmost_app before persisting config |
| crates/microbridged/Cargo.toml | Adds macOS-only objc2* dependencies for frontmost tracking |
| crates/mb-device/src/lib.rs | Changes mock device descriptor connection reporting for UI usability |
| Cargo.lock | Locks new objc2-related dependency graph |
| apps/microbridge-ui/src/surfaces/Settings.tsx | Adds device twin inspector UI and displays live frontmost_app |
| apps/microbridge-ui/src/surfaces/Popover.tsx | Refreshes popover UI and integrates DeviceEcho + new focus card |
| apps/microbridge-ui/src/surfaces/Hud.tsx | Adjusts HUD layout/styling for transparent window usage |
| apps/microbridge-ui/src/lib/bus.ts | Adds window-control commands and live snapshot subscription API |
| apps/microbridge-ui/src/index.css | Adds “breathe” LED animation for agent states |
| apps/microbridge-ui/src/components/DeviceTwin.tsx | New interactive “device twin” control surface + inspector helper |
| apps/microbridge-ui/src/components/DeviceEcho.tsx | New miniature read-only deck echo component |
| apps/microbridge-ui/src/App.tsx | Switches from polling + single-window routing to subscribed snapshots + window commands |
| apps/microbridge-ui/src-tauri/tauri.conf.json | Defines multi-window app (popover/settings/HUD) + macOS private API + min macOS version |
| apps/microbridge-ui/src-tauri/src/lib.rs | Implements tray icon behavior, window positioning, HUD auto-hide, cached snapshots, and commands |
| apps/microbridge-ui/src-tauri/src/bus.rs | New reconnecting subscribe loop and local snapshot event application |
| apps/microbridge-ui/src-tauri/Cargo.toml | Enables macos-private-api feature; updates UI crate description |
| apps/microbridge-ui/src-tauri/capabilities/default.json | Grants required window/event permissions for multi-window tray app |
| apps/microbridge-ui/README.md | Updates UI dev/build docs for tray-first flow and browser-only fallback |
| .github/workflows/release.yml | Adds macOS UI build job and publishes .app tarball as a release asset |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
62c1806 to
b39226e
Compare
Gate macOS-only imports, keep frontmost watcher-owned, treat mock as simulator in the popover, harden settings close/HUD placement, and bound the UI bus channel.
b39226e to
3ea60b7
Compare
Timeout set_config, cancel stale HUD hides, clamp popover to the monitor, drain AppKit autoreleases, and avoid clobbering unmanaged .app bundles.
573ea48 to
e888755
Compare
Summary
bus-snapshotevents (no 2s poll in Tauri).app+ daemonNSWorkspaceforfocused_appkey sourceTest plan
cargo test --workspacecd apps/microbridge-ui && npm run buildcargo run -p microbridged+npm run tauri dev— tray icon appears, popover toggles, Settings opens, Quit leaves daemon runningMade with Cursor