gallery: subagent rows, running tray and split pair green on base

Merged
TE
2d ago
+36-11

Gallery health is red on every push to feat-cmux-next (base run 41623839244). This fixes the subagent rows, running tray and subagent split states.

What was red, why, and the fix

Geometry [icon-column] row thinking-live: the lead edge at x 44, the column is at 40 (4 px): agent-pane.subagents#agents-pill, #card-closed, #card-open-pane, #many, #summary, #two-batches, #card-waiting, #running, #card-kinds, #card-outside-click, #child-back, #mixed, #card-collapsed, #codex, #pane-open.

  • Culprit: #33157 ("every status row's words on one column"). It put the live line's words on the text column on purpose: "The live line keeps the shared icon slot empty: its words start on the text column every iconed status row's words start on, never 24px left of them on the icon column" (conversation.css .cv-worked--live, padding-inline-start: var(--cv-tool-text-inset)).
  • Cause: the line has no icon, so gallery/invariants.ts took its first word (prose column 20 + 24 = 44) as its lead edge. In these states the only other visible top-level rows are a subagent card's rows, whose avatar glyphs sit at 40, so 44 came out "4 px off" that column. Before #33157 the words sat at 20, too far from 40 to count.
  • Fix: the live line marks its empty slot (data-lead-slot). The checker reads that row's lead edge from its box start, which is the prose column (20), as the design intends. No CSS change and #33157's design stays. In an ordinary transcript the line now reads on the column, as it did before #33157.

Broken play: waitFor did not hold within 5000 ms: agent-pane.subagent-tray-names#one-plus-one, #long-narrow.

  • Culprit: #33104 added the entry. Its scene is a finished turn (a completed summary row, isWorking: false), and its one subagent plus one command was meant to give a headed tray. Since #23104, runningTray.ts trayItems shows a command that only the transcript knows about only while a turn runs, and the gallery has no process registry. So the tray had one line, no header, and .acpmux-running-tray__head never appeared.
  • Fix: the scene is a running turn (isWorking: true, no summary row), as in subagent-tray#one-agent-two-commands. This also makes five read "+3 more" as its note says.

Broken play threw: the parent pane's play failed: agent-pane.subagent-split-pair#default.

  • Culprit: #32825 (the pair) together with #32591's narrow-pane rule ("a narrow pane narrows it and waits to open"; agent-pane.session-info-narrow-pane "saved-open"). The pair's left pane is about 380px wide, so the saved open state leaves Session Info closed, and the parent's waitFor(shownPanel) timed out.
  • Fix: the parent play clicks the Session Info toggle when the panel is closed, using the same pattern as session-info-narrow-pane#opened. The standalone 760px parent already has it open and clicks nothing.

Layout shift agent-pane.subagent-tray#one-agent-two-commands 0.0149 vs 0 (click .acpmux-running-tray__head).

  • #33104 added the head click to this play (the folded bar names items, so the counts are only read when open). Opening the tray grows it upward over the composer, so its header and lines move up while the list unfolds. The other opening tray states already carry rows for this (panel-two 0.04142, expand-on-composer 0.04098), and running-stop-boxed and running-stop-solid shift the same 0.015 to 0.02 with no row. The 0 row was recorded before the play opened the tray, so it was simply wrong for that change. The new row is the worst measured value, 0.01487.

Not in this PR

  • agent-pane.chat-inspector#subagents-open (0.0542 vs 0) and #subagents-busy-more (0.0785 vs 0.0079) share their cause with every Session Info disclosure click (#tasks-finished, #workflow-finished, #workflow-agent-failed and #grid-expanded shift the same way, already red at e1eb90839e), so the chat-inspector base-red work owns them.
  • The "Mended; drop from invariant-baseline.json" warnings for agent-pane.subagents center-line rows are warnings and are left for a baseline pass.

Risk

Low. Two gallery fixtures and plays, one checker branch for a marked row, a data attribute on the live line, and one shift-baseline row. No product behaviour changes.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Fixes the red gallery health on feat-cmux-next: subagent rows, running tray fixture, and split pair play now pass.

Bug Fixes

  • The running turn's live line keeps its icon slot empty by design (#33157); gallery/invariants.ts now reads its lead edge from its box start (data-lead-slot) instead of its words, which sat 4px off a subagent card's avatar column.
  • The subagent-tray-names fixture scene now uses a running turn so its transcript-only command appears as a tray line and the tray gets its header.
  • The split pair parent play opens Session Info via its toggle when the narrow pane keeps the saved-open state closed.
  • Updated shift-baseline.json for subagent-tray#one-agent-two-commands, which opens the running tray since #33104 and grows upward like the other opening tray states.

No product behavior changes; the diff is limited to gallery fixtures, plays, and the checker.