feat(desktop): macOS menu bar tray with running agents per project - #6374
feat(desktop): macOS menu bar tray with running agents per project#6374giulianoo0 wants to merge 1 commit into
Conversation
Clicking the new T3 menu bar item fetches a fresh orchestration shell snapshot from the local backend and pops up a menu showing live agents grouped by project (shared agentAwareness phases), plus entries for Open T3 Code, Settings, Usage, Pull Requests, Check for Updates and Quit. Fetch happens at click time only — no background polling — and degrades to the last good snapshot when the backend is unreachable. Settings/Usage/Pull Requests ride the existing desktop:menu-action IPC channel; the renderer handler now also navigates /usage and /pull-requests. The update check handler is shared with the app menu, tagged with a "tray" reason. Done with Claude Code (Claude Fable 5). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 341562b. Configure here.
| { | ||
| label: "Pull Requests", | ||
| click: () => runTrayEffect("open-pull-requests", dispatchMenuAction("open-pull-requests")), | ||
| }, |
There was a problem hiding this comment.
Tray actions no-op before backend ready
Medium Severity
Tray Settings, Usage, and Pull Requests call dispatchMenuAction, which returns immediately when there is no main window and backendReadyRef is false. The tray is created before bootstrap and is meant to work with no windows open, so those entries can silently do nothing during startup or backend restart while Open, Check for Updates, and Quit still respond.
Reviewed by Cursor Bugbot for commit 341562b. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces a new macOS menu bar tray feature with ~800 lines of new code, including new Electron services, backend snapshot fetching, and agent-status menus. New features introducing user-facing behavior warrant human review. You can customize Macroscope's approvability policy. Learn more. |


There is no way to see what your agents are doing without bringing up the app window. I wanted a quick glance from the menu bar.
This adds a tray icon to the desktop app on macOS. Click it and you get a menu with the agents that are currently running, grouped by project. Each project row shows a count and a submenu with the thread titles and their current phase. Below that there are entries for opening the app, Settings, Usage, Pull Requests, Check for Updates and Quit.
How it works:
ElectronTraywrapper service and aDesktopTrayorchestrator. Both follow the same Effect service pattern as the application menu.projectThreadAwarenesspredicate, so "running" means the same thing it means for the mobile Live Activity: starting, running, waiting for approval, waiting for input.desktop:menu-actionIPC channel. The renderer handler now also understandsopen-usageandopen-pull-requests.Scope choices, happy to adjust:
Tests cover the menu model (grouping, counts, phases, empty and unavailable states) and the tray wrapper. Typecheck and lint are clean for desktop and web.
The icon in the menu bar:
Done with Claude Code (model: Claude Fable 5).
Note
Low Risk
Additive desktop UX on macOS with graceful degradation; reuses existing IPC and update flows with no auth or data-model changes.
Overview
Adds a macOS menu bar tray (darwin-only v1) so users can see live agents and open common actions without focusing the main window.
On tray click, the main process fetches a shell snapshot from the local primary backend (2s timeout, cached fallback, no background polling), builds a native menu via
trayMenuusing the sameprojectThreadAwarenessrules as mobile Live Activity, and pops it through a newElectronTray/DesktopTrayEffect service pair wired at startup. Menu entries reusedispatchMenuAction, sharedhandleCheckForUpdatesClick("tray"), and window reveal/quit plumbing.The web shell
AppSidebarLayoutnow routesopen-usageandopen-pull-requestsfrom desktop menu IPC. Unit tests cover the tray wrapper and menu model; a design spec documents scope (local env only).Reviewed by Cursor Bugbot for commit 341562b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add macOS menu bar tray icon with running agents per project
ElectronTrayin ElectronTray.ts, a scoped service that creates a single Electron tray icon and exposes apopUpMenuoperation to show a native context menu.DesktopTrayin DesktopTray.ts which, on macOS only, wires the tray icon to display a dynamic menu on click: active agents grouped by project plus quick actions (Open, Settings, Usage, Pull Requests, Check for Updates, Quit).OrchestrationShellSnapshot, grouping and sorting threads by project and filtering to active phases.open-usageandopen-pull-requestsmenu actions by navigating to the corresponding routes.Macroscope summarized 341562b.