Skip to content

feat: ship menu bar tray shell with live bus and device twin - #16

Merged
DevVig merged 3 commits into
mainfrom
feat/menu-bar-app-shell
Jul 17, 2026
Merged

feat: ship menu bar tray shell with live bus and device twin#16
DevVig merged 3 commits into
mainfrom
feat/menu-bar-app-shell

Conversation

@DevVig

@DevVig DevVig commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Real macOS menu bar tray (Accessory) with popover / settings / focus HUD windows
  • Persistent UI socket subscribe + live bus-snapshot events (no 2s poll in Tauri)
  • MagicPath-faithful device echo + Settings device twin; Homebrew installs .app + daemon
  • Daemon tracks frontmost app via NSWorkspace for focused_app key source

Test plan

  • cargo test --workspace
  • cd apps/microbridge-ui && npm run build
  • cargo run -p microbridged + npm run tauri dev — tray icon appears, popover toggles, Settings opens, Quit leaves daemon running
  • Focus change shows HUD toast briefly
  • Agent Keys / Device settings persist via daemon config

Made with Cursor

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>
Copilot AI review requested due to automatic review settings July 17, 2026 19:33
@coderabbitai

coderabbitai Bot commented Jul 17, 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: 45 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: 99bce9bf-b863-4aa5-a9ea-9eeb5cf6c22a

📥 Commits

Reviewing files that changed from the base of the PR and between 1516c96 and e888755.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • apps/microbridge-ui/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (28)
  • .github/workflows/release.yml
  • Formula/microbridge.rb
  • INSTALL.md
  • README.md
  • apps/microbridge-ui/README.md
  • apps/microbridge-ui/src-tauri/Cargo.toml
  • apps/microbridge-ui/src-tauri/capabilities/default.json
  • apps/microbridge-ui/src-tauri/src/bus.rs
  • apps/microbridge-ui/src-tauri/src/lib.rs
  • apps/microbridge-ui/src-tauri/tauri.conf.json
  • apps/microbridge-ui/src/App.tsx
  • apps/microbridge-ui/src/components/DeviceEcho.tsx
  • apps/microbridge-ui/src/components/DeviceTwin.tsx
  • apps/microbridge-ui/src/index.css
  • apps/microbridge-ui/src/lib/bus.ts
  • apps/microbridge-ui/src/surfaces/Hud.tsx
  • apps/microbridge-ui/src/surfaces/Popover.tsx
  • apps/microbridge-ui/src/surfaces/Settings.tsx
  • crates/mb-device/src/lib.rs
  • crates/microbridged/Cargo.toml
  • crates/microbridged/src/config.rs
  • crates/microbridged/src/frontmost.rs
  • crates/microbridged/src/lib.rs
  • crates/microbridged/src/main.rs
  • crates/microbridged/src/state.rs
  • docs/design/README.md
  • docs/governance.md
  • scripts/install-from-release.sh

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

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

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 microbridged and treat frontmost_app as runtime-only (not persisted).
  • Refactor the Tauri UI into a tray-based multi-window app (popover/settings/HUD) with live bus-snapshot subscription and new device twin/echo components.
  • Update release workflow + install scripts + Homebrew formula + docs to ship/install Microbridge.app together 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.

Comment thread crates/microbridged/src/state.rs Outdated
Comment thread crates/microbridged/src/config.rs
Comment thread crates/microbridged/src/frontmost.rs
Comment thread crates/mb-device/src/lib.rs Outdated
Comment thread scripts/install-from-release.sh
Comment thread apps/microbridge-ui/src/lib/bus.ts
Comment thread scripts/install-from-release.sh
@DevVig
DevVig force-pushed the feat/menu-bar-app-shell branch from 62c1806 to b39226e Compare July 17, 2026 19:41
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.
@DevVig
DevVig force-pushed the feat/menu-bar-app-shell branch from b39226e to 3ea60b7 Compare July 17, 2026 19:42
Timeout set_config, cancel stale HUD hides, clamp popover to the
monitor, drain AppKit autoreleases, and avoid clobbering unmanaged .app
bundles.
@DevVig
DevVig force-pushed the feat/menu-bar-app-shell branch from 573ea48 to e888755 Compare July 17, 2026 19:42
@DevVig
DevVig merged commit 51151df into main Jul 17, 2026
6 checks passed
@DevVig
DevVig deleted the feat/menu-bar-app-shell branch July 17, 2026 19: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.

2 participants