agent pane: a Subagents tab in the summary card (cx-x62ev)

Closed
TE
20d ago
+1019-20

Summary

Stacked on #20514.

The summary card's Subagents title now opens a Subagents tab beside the card's Summary tab, like the right pane in the ChatGPT desktop app (bead cx-x62ev):

  • The tab lists Active 路 N (or No active subagents) and Done 路 N, newest first, nested subagents included. Waiting subagents count as active, and failed or cancelled ones count as done.
  • Each row is the transcript's own SubagentListRow (avatar with status dot, name, kind, state or current action, elapsed time). In the card it uses a compact 40px row with no border.
  • Clicking a row shows that subagent through the card's existing onOpen. In the app that is chat.subagentPane (opens beside the chat). When the host opens no pane, the subagent shows in this pane.
  • The tab's 脳 goes back to the summary and puts focus back on the Subagents title. The Summary and Subagents tabs switch between the two views.
  • The tabs are aria-pressed toggle buttons, like the gallery filters, because ui-rules bans raw tablist/tab roles in page code.

Reuse: I did not add a second row component. The tab builds SUBAGENT_ROW rows from subagents/subagentRows.ts and renders them with SubagentListRow from subagents/SubagentGroup.tsx, through SubagentPaneContext. #20718 extended that same row with progress and a stop button. #20718 is merged on feat-cmux-next, but #20514's head does not include it yet. When #20514 takes a base merge, this tab picks up #20718's progress and stop button with no extra change. The section title still uses subagentsIn and SubagentStatusList.

Also: one-line lower of scripts/cmux-next/layers-baseline.tsv. #20514's reduced-transparency fallback leaves summary.css with 0 bare backdrop-filter, so check-layers asked for the lower baseline. Without it, bun run check fails.

Not in this PR:

  • The bead's "Outputs + with the tooltip Create a file or site". There is no create action behind it yet, and a + that does nothing would be dead UI.
  • Generated colourful avatars. The tab uses the same avatar as the transcript's subagent stack (the harness mark), and changing that look for everyone needs a call.

In-app stills (side by side with ChatGPT) will follow in a comment.

Testing

  • Red, at db86bd48e9d9 (test only): CMUX_BROWSER_TESTS=1 bun test test/agent-pane-subagents-tab.test.ts gave 0 pass / 2 fail. The heading "Subagents 路 1 running" is there, but there is no button to open the tab.
  • Green at head:
    • agent-pane-subagents-tab.test.ts 2 pass
    • agent-pane-summary-panel.test.ts 7 pass
    • popup-surface 10 pass
    • agent-pane-background-tasks 2 pass
    • sources-changes 1 pass. Its first run timed out on a cold vite server and passed on rerun.
    • ui-rules 4 pass
    • subtle-elevation and popup-one-hairline 42 pass
  • vp fmt, vp check and bun run check all pass.
  • gen-strings.mjs --check passes, and check-l10n.sh reports 0 errors.
  • Localization: 4 new keys (summary.subagents.active, .ended, .noneActive, .closeTab) in all 21 locales. The tab labels reuse summary.title and summary.subagents.

Changelog

  • Added: The agent chat's summary card has a Subagents tab listing active and finished subagents; click one to open it.

馃 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds a Subagents tab to the agent chat's summary card so active and finished subagents can be reviewed without leaving the summary.

The Subagents section's title now opens a tab beside the card's Summary tab, mirroring the ChatGPT desktop app's right pane. The tab lists Active 路 N (or "No active subagents") and Done 路 N, newest first, nested subagents included; waiting subagents count as active, failed and cancelled as done. Rows reuse the transcript's SubagentListRow, compacted to 40px, and clicking a row opens that subagent via the card's existing onOpen鈥攖he chat's subagent pane, or this tab when the host opens none. Opening the tab drops the card's head counts since the tab lists them itself (they were cut off next to the two tabs). The close button returns to the summary and refocuses the Subagents title. Tabs are aria-pressed toggles because ui-rules bans raw tablist/tab roles in page code. Four new locale strings ship in all 21 locales, and the layers baseline is lowered one line since summary.css no longer has a bare backdrop-filter. SubagentsTab is allowlisted in gallery coverage until it gets an entry.