Transcript: more room around notes between tool calls

Merged
TE
4d ago
+208-3

Leo, 2026-11-01: "the thoughts in between tool calls probably want a bit more padding"

What changed

A short interim note the agent writes between two runs of calls is folded into the run as a quiet line (turns.ts mergeShortNotes, drawn as .cv-tool-note in TurnRows.tsx). It had 3px to the tool rows around it, so in an opened run it sat tight against "List …" above and "Ran 2 commands" below.

  • .cv-tool-note now has --cv-note-gap above and below it: the 12px plain status gap (--cv-status-gap-plain, the transcript's inner gap in design/grid.md 5.5). That is the room a longer reply between two runs already has (cmux#29124), so a note and a reply between tool rows read the same.
  • model.ts activityStepHeight estimates a note as its 20px line plus the gap on both sides, so estimated heights match drawn ones.
  • Unchanged: the gaps between consecutive tool rows, the status rows between replies (12/12 from #29124), the icon column, subagent rows, prompts and final replies, colours and type.

Design: leo-workspace design/chat-transcript.md (rows between replies, grouped steps); the spec gets a "Notes between tool rows" entry in a follow-up leo-workspace PR.

Gallery

agent-pane.interim-prose-gap: a running turn's opened run (a command, a note, "Ran 2 commands" opened, a note, a command). Variants: shipped (12px), tight (before, 3px), snug (8px, the message gap), roomy (16px, the turn gap). I picked 12 because it is the same room a longer reply between two runs has, so the two kinds of interim prose stay consistent; 8 is barely more than the rows' own leading, and 16 is the turn gap, which would make a note read like a turn boundary inside one run.

Verification

cd webviews && CMUX_BROWSER_TESTS=1 bun test test/transcript-interim-prose-gap.test.ts (Chromium, light and dark), on the build fleet through cmux-ci test:

  • Red at the test commit 65867b889e9b: each note had 3px above and below it (note -> Ran 2 commands: 3px, not 12px, and so on).
  • Green at the fix: 12px on all four sides of the two notes, and every other gap in the run matches the tight variant.

Also on the fleet at the fix: rowEstimates.test.ts (21 pass), transcript-row-alignment.test.ts (2 pass, light and dark), and bun run check:pieces (lint, format, type check) clean.

Observed / Not run

  • Observed: the fleet runs above.
  • Not run: no native build or Mac capture; this is a webview CSS and estimate change.

Changelog

  • Changed: Short notes between tool calls in the agent transcript have more room above and below them.

šŸ¤– Generated with Claude Code

Agent session: agent session


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


Summary by cubic

Short notes the agent writes between tool calls in the transcript now have 12px of room above and below them, matching the spacing a longer reply between two runs already has, instead of 3px.

  • Updates the note's CSS margin to use the plain status gap (--cv-note-gap, 12px) and adds gallery variants comparing 3, 8, 12, and 16px.
  • Updates activityStepHeight in model.ts to estimate a note as its 20px line plus the gap on both sides.
  • Adds a browser test measuring the gaps around notes in light and dark themes.