cmux NEXT agent chat: the Subagents tray starts collapsed, its chevron at the right edge

AU
3d ago
+186-47

Fixes https://github.com/manaflow-ai/cmux/issues/27908

What changed

The Subagents tray above the composer in cmux NEXT agent chats:

  • Starts folded. Once the tray has a header (more than one line, running or ended), it starts folded to that header, however few lines it has. Before, three lines or fewer opened by default. Your open or fold holds while the chat is on screen. One line on its own has no header and still shows that line.
  • The header chevron sits at the right edge. It used to end 40px from the tray's edge, with an empty stop column after it (#27263 added that column to line the header up with the rows' reserved Stop column), while View all's chevron ended at the 8px row padding. Now every trailing chevron (the header's, each line's and View all's) ends at the tray's right edge. A line's status column is now: state, Stop's track, then the chevron. The stop slot sits over Stop's track, so a running line keeps its Stop button just left of its chevron.

Files: subagents/SubagentTray.tsx (fold default, header drops its stop spacer), subagents/AgentLine.tsx (stop track and chevron track in the tray columns), subagents/subagents.css (column widths, stop slot position).

Regression test

webviews/test/subagent-tray-columns.test.ts (browser lane, gallery agent-pane.subagent-tray/between-turns, dark and light) now checks that:

  • the header starts with aria-expanded="false" and draws no list;

  • after it opens, the header's chevron and every line's chevron end 8px from the tray's right edge;

  • Stop sits before its line's chevron.

  • Red on the test-only commit c20b86bf0e1714d2ecf5720740830ae3ec4bbbd4: fleet step f134dfc9e93b58fe2356bff9 (scripts/ci/run-webviews-tests.sh, CMUX_WEB_TEST_FILES=test/subagent-tray-columns.test.ts) failed in dark and light: expect(head.getAttribute("aria-expanded")).toBe("false"), received "true"; the tray started expanded.

  • Green on the head b46af2c1cd749d611545f866bc63114e8387868c: fleet step 3954180f6d66339c63e317ef, same script, the 11 affected files subagent-tray-columns, subagent-tray, running-strip, agent-pane-agents-pill, agent-pane-working-counts, subagent-tray-motion, subagent-tray-layout, summary-background-work, inspector-subagent-card-stays, inspector-dead-clicks, chat-inspector all pass (and pass at 127a44bf3bd, step 3cac3d894be61baace1bec6f). agent-pane-dock-gutters.test.ts times out at 127a44bf3bd, and times out the same way alone on the base tip a1f302795f5 (step 9f6ecbd8842d35a7e3f54a13): a base finding, not this PR. test/browser/gallery-control-surfaces.test.ts passes at 127a44bf3bd (step 489f13e8d65d51aa2697c764); b46af2c1cd7 changes only a gallery play and formatting.

The unit, gallery and browser tests that read an open tray now open it first (subagent-tray.test.tsx, running-strip.test.ts, agent-pane-agents-pill.test.ts, agent-pane-working-counts.test.ts, the SubagentTray and SubagentTrayMotion gallery plays). There is also a new gallery variant, panel-two-at-rest, that shows the tray as it first appears.

Observed / Not run

Observed:

  • The red and green fleet runs above.
  • A tagged dev build 27908-subagents-card-collapsed of b46af2c1cd7 (fleet job 683cefd04a75448a07510777), driven on a capture mini (debug seed_rows fixture subagents). When two subagents start, the tray shows folded to its header, with the chevron at the right edge. After the header opens, its chevron, the Running line's Stop and chevron, and the Done line's chevron all sit in one right-edge column:

Capture steps-40c4250531 at b46af2c1cd74 (fleet build, capture mini, text checked for private data)

LightDark
lightdark

Capture steps-30b22eebb2 at b46af2c1cd74 (fleet build, capture mini, text checked for private data)

LightDark
lightdark
  • Correctness review (subagent) of 2ec0343edb1 and again of 127a44bf3bd; b46af2c1cd7 adds only an openTray in the codex-lineage gallery play and vp fmt: no blocking findings (see the PR comments).

Not run:

  • bun run check (Oxlint, type check) locally: this agent host doesn't run heavy checks (CMUX_LOCAL_HEAVY_CHECKS=0). The web lint (fast) job checks it.
  • A live scrollbar setting of "always show": the list's scrollbar narrows its lines, so their chevrons would then sit left of the header's. With macOS's default overlay scrollbars, nothing shifts. Not covered here.

Changelog

  • Changed: In cmux NEXT agent chats, the Subagents tray above the composer now starts collapsed, and its chevron lines up with the row and View all chevrons at the right edge.

🤖 Generated with Claude Code