Repository navigation
Show who each agent works with in a panel on its chat or terminal - #34891
Conversation
Main's lineage projection only walked terminal panes, so workers running in the chat UI never got a parent link and listed flat in the sidebar. It now also projects chat workers, keyed by their visible chat row, and resolves a chat creator or coordinator to that chat's visible row instead of its handle or private mailbox pane key.
b80bb4b to
7d1cabf
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8adc8c8e-8a8c-4f0b-9924-16f52cb0031c
Files selected for processing: 55-
src/main/runtime/orchestration/crew/crew-mounted-render.test-fixture.tssrc/renderer/src/assets/terminal.csssrc/renderer/src/components/AgentMessageAvatar.tsxsrc/renderer/src/components/native-chat/NativeChatAgentMessageCard.tsxsrc/renderer/src/components/native-chat/NativeChatResolvedView.context-menu.test.tsxsrc/renderer/src/components/native-chat/NativeChatResolvedView.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.crew-pane.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/native-chat-agent-message-sender-source.tssrc/renderer/src/components/native-chat/native-chat-agent-message-sender-view.tssrc/renderer/src/components/native-chat/native-chat-split-shortcut.tssrc/renderer/src/components/native-chat/native-chat-structured-stop-controls.tssrc/renderer/src/components/native-chat/use-orchestration-crew.test.tsxsrc/renderer/src/components/native-chat/use-orchestration-crew.tssrc/renderer/src/components/orchestration-crew/CrewAgentIcons.test.tsxsrc/renderer/src/components/orchestration-crew/CrewAgentIcons.tsxsrc/renderer/src/components/orchestration-crew/CrewRowDetails.tsxsrc/renderer/src/components/orchestration-crew/CrewRowMenu.tsxsrc/renderer/src/components/orchestration-crew/CrewRowView.tsxsrc/renderer/src/components/orchestration-crew/NativeChatCrewPanel.tsxsrc/renderer/src/components/orchestration-crew/OrchestrationCrewPanel.fixture.tsxsrc/renderer/src/components/orchestration-crew/OrchestrationCrewPanel.test.tsxsrc/renderer/src/components/orchestration-crew/OrchestrationCrewPanel.tsxsrc/renderer/src/components/orchestration-crew/TerminalCrewPortals.test.tsxsrc/renderer/src/components/orchestration-crew/TerminalCrewPortals.tsxsrc/renderer/src/components/orchestration-crew/crew-menu.test-fixture.tssrc/renderer/src/components/orchestration-crew/orchestration-crew-follow.tssrc/renderer/src/components/orchestration-crew/orchestration-crew-subscription.tssrc/renderer/src/components/orchestration-crew/use-crew-menu-focus.tssrc/renderer/src/components/orchestration-crew/use-terminal-crew-identity.tssrc/renderer/src/components/sidebar/worktree-card-agent-summary.tssrc/renderer/src/components/status-bar/icons.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneSurface.tsxsrc/renderer/src/components/terminal-pane/terminal-handle-copy.tssrc/renderer/src/components/terminal-pane/terminal-pane-element-file-drop.test.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/activate-ai-vault-structured-session.tssrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/agent-icon-glyphs.tsxsrc/renderer/src/lib/agent-type-icon.tsxsrc/renderer/src/lib/open-agent-message-sender.test.tssrc/renderer/src/lib/open-agent-message-sender.tssrc/renderer/src/runtime/runtime-crew-subscribe.tssrc/renderer/src/web/preload-api/web-runtime-crew-subscription.tssrc/renderer/src/web/preload-api/web-runtime-environments-api.tssrc/renderer/src/web/web-runtime-client.tssrc/renderer/src/web/web-runtime-connection-auth.tssrc/renderer/src/web/web-runtime-connection-socket.tssrc/renderer/src/web/web-runtime-connection-transport.tssrc/renderer/src/web/web-runtime-connection-waiters.tssrc/renderer/src/web/web-runtime-crew-follow.test.tsxsrc/renderer/src/web/web-runtime-crew.test-fixture.tssrc/renderer/src/web/web-runtime-dedicated-subscription.tssrc/renderer/src/web/web-runtime-subscription-contract.tssrc/shared/orchestration-crew-mounted.test-fixture.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
The panel overlaid the whole chat body, so with it open the composer's send button sat underneath it. The frame now wraps only the transcript; the queued drafts, prompt cards and composer stay where main puts them.
Orca writes its failure notices (a worker stopped without reporting, a chat agent error, a terminal exit) as the worker's own escalation, with terminal, task and dispatch IDs and CLI syntax meant for the coordinator agent. The panel showed that text as the row's second line. Only the panel reads this query, so escalations are skipped there and the row shows the agent's last real message. An agent's own Blocked escalation is skipped too; it still reaches the coordinator's inbox.
Opening a row whose agent is gone showed "This agent is no longer available." Use the existing reasons instead: the chat is no longer on this host, or the terminal has exited.
A terminal's chat view still mounted the orchestration panel over the whole chat, so it covered that view's composer and send button. Both chat hosts now wrap their transcript in the same frame, which takes the panel's props.
Besides failure notices, the latest line could pick up an empty setup receipt (a blank line that also moved the row) or a lifecycle message Orca rewrote to "Orca rejected this worker_done: ...". The panel's query now admits only conversational types with a body and without the lifecycle rejection marker, before choosing each peer's latest.
A row with no message fell back to the worker's internal launch stage
("input accepted", "worker report queued") as its second line, and
Details repeated it as Progress. The row now has no second line until
the agent says something, and Details drops Progress; the status icon
already shows the state.
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
6a8ca390-f7ad-427a-8fee-353bea887fd9
Files selected for processing: 9-
src/main/runtime/orchestration/crew/crew-query.tssrc/main/runtime/orchestration/crew/crew-read-model.test.tssrc/renderer/src/components/native-chat/NativeChatResolvedView.context-menu.test.tsxsrc/renderer/src/components/native-chat/NativeChatResolvedView.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/orchestration-crew/CrewRowDetails.tsxsrc/renderer/src/components/orchestration-crew/CrewRowView.tsxsrc/renderer/src/components/orchestration-crew/NativeChatCrewPanel.tsxsrc/renderer/src/i18n/locales/en.json
Files with no reviewable changes: 2-
- src/renderer/src/components/orchestration-crew/CrewRowDetails.tsx
- src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
The panel no longer admits empty-body messages as a row's latest; the test's history message now carries the words a peer would send.
In a short split or under a tall composer, the transcript can be shorter than the panel's header, which then painted over the composer. The chat frame now clips the panel to the transcript; terminals are unchanged.
The crew's Open failures were English literals. They now go through translation, and a gone or outdated chat uses main's existing texts.
Settings > Experimental > Orchestration panel (experimentalOrchestrationPanel). Off mounts nothing: the chat frame, the terminal-hosted chat's identity lookup and the terminal pane portals all gate where they mount, and toggling applies live without remounting the transcript.
CI on the merged head failed because main moved agent-session-conversation-view under shared/agent-session/lifecycle; the crew mounted-render fixture now imports it from there.
The message card's avatar and its single-sender hook are back to main's code; the panel keeps its own list hook. The panel's code now loads only when it first mounts, behind the setting.
Brings main's Hermes-compatible plugin fingerprint (#37370) so the stacked PR's mobile check can pass.
Problem and change
When agents work together, the person watching can't see who manages whom, what each one is doing, or which one is waiting on them. This PR adds an Orchestration panel to each agent's chat or terminal pane.
Experimental and off by default. Turn it on in Settings → Experimental → Orchestration panel ("Shows which agents each agent is working with, beside its chat or terminal."). The switch applies live, with no restart. While it is off, nothing of the panel shows or runs; see "Effect with the setting off" below.
Closed: a small tab sits on the pane's right edge, just under the pane's title buttons. It shows the panel icon, the lineage icon with the number of workers (only when there are any), then one group per status in the order needs you, working, idle, failed. Each group shows the sidebar's own status icon, up to three overlapping agent icons and "+n" for the rest. The tooltip and accessible name read "Orchestration: 3 workers, 1 needs you, 1 working, 1 idle", with proper singular and plural forms.
Open: the panel lists Managed by, Managing and Talking with. Each row is one card: the sidebar status icon and agent icon, the task in plain words (or the agent's name when there is no task), and Details, Open and More buttons. The second line is the agent's latest message with its age ("15h ago"), or "Waiting for you · " in amber. Within each section, the most recent message comes first. Details shows the task, the latest message or question, and its direction. The panel starts directly under the tab bar and the pane's title buttons, which stay usable, and the rows scroll. In chats, the panel ends above the composer, so the composer and Send are never covered. Escape closes it.
Mention actions are added by #34836. Answer, Show messages and Stop are follow-up work, outside this PR.
Effect with the setting off
Every change in this PR, for a user who has not turned the setting on:
What a row's second line shows
Only an agent's own words. Orca's failure notices (for example "Worker term_… ended its turn without sending worker_done … orchestration send --to dispatch:ctx_…"), empty setup receipts and lifecycle messages Orca rewrote ("Orca rejected this worker_done: …") are skipped, and the row shows the agent's previous message. A row whose agent hasn't said anything has no second line; worker launch stages ("input accepted") are not shown anywhere.
Intended: a message sent with only a subject and no body isn't shown either; Orca's setup receipts have no body, and agents are told to always send one. Intended: an agent's own "Blocked: …" escalation is skipped too. Orca's notices are stored as the worker's escalation, with nothing that tells them apart, and that message still reaches the coordinator's inbox. The coordinator accepted this trade-off; a design panel settled the rule for the other two shapes.
Design and compatibility
This uses #34890's read-only host view and the existing navigation, menu and status components; the status icons are exactly the sidebar's. The common pattern selects relationships and sender identity from canonical records, and display readiness never decides whether an action is allowed. An older host without this support keeps its existing launch path and shows no panel.
Intended: the open panel overlays the transcript or terminal output under it (320px wide); it does not reflow the content. Known on main and not changed here: in a chromeless terminal-hosted chat, the chat's cover hides the pane's drag strip.
The shared menu primitives are unpatched. Intended, accepted Windows limitation tracked in STA-13079: after a disabled menu item, the first outside click can be ignored; the second closes it. Escape and focus behavior are still required.
Validation
The setting: a native chat test turns it off, on and off again and checks that nothing of the panel mounts and no crew subscription starts while it is off, that the panel appears live when it is turned on without replacing the transcript, and that the subscription is released when it is turned off. A terminal test does the same for every pane, including that no terminal identity lookup or crew read runs while it is off. A loading test checks that a failed load leaves the pane as it was and that the next mount loads again. Main's own message-card and store fan-out tests cover the restored avatar lookup unchanged.
Real-app run on a fresh profile with a Claude native chat that dispatched a Codex terminal worker: with the setting off there was no panel in the coordinator chat, the worker terminal or the worker's chat view; Settings → Experimental showed "Orchestration panel" off, and settings search found it; turning it on showed the panel live in all three, with the composer clear and the draft kept; turning it off hid it live. Screenshots are in the review status comment.
Renderer tests cover the closed tab's grouping and plural counts, most-recent-first sorting, live status from the sidebar's sources (with one store subscription and a per-row render contract), panel mounting on chat and terminal panes, Escape and collapse, menus and Open. A read-model test feeds a real recorded Orca notice, an agent's own escalation, an empty setup receipt and a rejected report, and checks the row keeps the agent's real message; the query-plan test checks the message indexes still apply.
Real-app screenshot runs with Claude and Codex agents (through #34836's builds, which contain this head) checked: the closed tab and open panel; both chat views with the composer clear; a 50px transcript; the latest line after a real worker-stop notice; split panes and title-strip buttons; the find bar; and no "crew" wording. Screenshots are in the review status comment.
Component fixtures:
orchestration-crew/OrchestrationCrewPanelwith 2, 5 and 10 workers, a manager plus 3, managed-by only, peer only and a wide native chat, each collapsed and expanded.