fix(chat): one-line activity rows sit 22 apart again (#27580 regression)

Merged
TE
4d ago
+86-42

Leo, 2026-11-02, on a transcript where consecutive one-line tool rows ("Ran 3 commands, read a file", "Ran 3 commands", "Read HQ#5724 token design", the live row) sat about 48-52px apart top to top:

"well now there's sometimes too much spacing between tool calls"

Regressed by #27580 (squash 044769ae): it drew every tool, notice, inbox and message line on the grid's 28 list row and put the 24 block gap between each one, both between transcript rows (transcriptGap) and inside a run (.cv-tools, .cv-tool-run, .cv-tool-group gap). The settled design is leo-workspace design/chat-transcript.md "One-line row pitch" (#29965; Leo, 2026-11-01: "doesn't make sense for these to be spaced differently"): every one-line row is the tool rows' 22px line, and consecutive ones are 22 apart top to top.

What changes:

  • --cv-tool-row-height is 22 again; received lines and disclosure lines use it.
  • Run stacks list their lines flush (gap 0); a note keeps the block gap above and below it (--cv-note-gap), so #30400's room around a note holds.
  • transcriptGrid.ts: a step row (a tool run or an isLineRow line, MARK_STEP) after another step row takes no gap. The 24 block gap applies only between prose or a card and a run of one-line rows. Gaps never add.
  • model.ts estimates match: 22 lines, no in-run gaps, the note gap. rowEstimates.test.ts expects 22.

Tests (cmux-ci at this head, base reds from react-apps-check run 41362440478): agent-pane-step-rows, transcript-thought, incoming-message-disclosure-browser, agent-pane-suggested-tasks, agent-pane-working-counts red at base; results at head in a comment. transcript-row-pitch-browser, transcript-rhythm, transcript-interim-prose-gap, continuationSpacing stay green.

Not in this PR: #29124's centred status rows (STATUS_GAP, zeroed by #27580). They go in a follow-up so this one lands first.

Risk: transcript spacing only (CSS tokens, the layout's gap rule, the estimator).

Agent session: agent session

šŸ¤– 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

Restores one-line activity rows (tool calls, notices, inbox, and message lines) to 22px apart top to top. PR #27580 regressed this by drawing each row on the 28px grid row with a 24px block gap between them, so consecutive rows sat about 50px apart.

  • Tool rows, received lines, and disclosure lines are 22px again; run stacks list their lines flush.
  • The running turn's live line joins a run below it flush; under its own prompt it still waits the block gap.
  • The block gap now applies only around a run of one-line rows, preserving the room around note rows.
  • transcriptGrid.ts and the height estimator match the new spacing; rowEstimates tests expect the 22px line, and transcript-rhythm asserts the live line sits flush under its run.
  • agent-pane-working-counts resolves var() token heights through a probe instead of parseFloat, which was NaN on the token chain.

Regression context

Leo, 2026-11-02, on a transcript where consecutive one-line tool rows sat about 48–52px apart top to top: "well now there's sometimes too much spacing between tool calls". The settled design (design/chat-transcript.md "One-line row pitch", #29965) is every one-line row on the tool rows' 22px line, consecutive ones 22px apart. Status rows (#29124) go in a follow-up; risk is transcript spacing only — CSS tokens, the layout's gap rule, and the estimator.