Repository navigation
Transcript: more room around notes between tool calls - #30400
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
…d below Leo, 2026-11-01: "the thoughts in between tool calls probably want a bit more padding" A short interim note folded into a run of calls (turns.ts mergeShortNotes) had 3px to the tool rows around it. It now has --cv-note-gap, the 12px plain status gap a longer reply between two runs has; model.ts estimates the note with the same numbers. Gallery variants compare 3, 8, 12 and 16px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Gallery before/after for
States
Pick other states with a Passes: CI passes on CI passes on Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base ffcf61c; does not block Shipped in:
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41330433296 at e0fa06f failed: cmux-next crash ends the app. |
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="webviews/src/agent-session/acpmux/model.ts">
<violation number="1" location="webviews/src/agent-session/acpmux/model.ts:977">
P2: This estimate assumes every short note is one line, but `mergeShortNotes` accepts up to 160 characters and `.cv-tool-note` wraps them. Compute the wrapped line count from the transcript width, including explicit line breaks, before adding the two 12px gaps; otherwise later virtual rows are initially placed too high and can jump when measured.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| function activityStepHeight(item: AcpmuxActivity): number { | ||
| const tool = item.tool; | ||
| if (!tool) return 26; | ||
| if (!tool) return item.kind === "note" ? NOTE_LINE + 2 * NOTE_GAP : 26; |
There was a problem hiding this comment.
P2: This estimate assumes every short note is one line, but mergeShortNotes accepts up to 160 characters and .cv-tool-note wraps them. Compute the wrapped line count from the transcript width, including explicit line breaks, before adding the two 12px gaps; otherwise later virtual rows are initially placed too high and can jump when measured.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At webviews/src/agent-session/acpmux/model.ts, line 977:
<comment>This estimate assumes every short note is one line, but `mergeShortNotes` accepts up to 160 characters and `.cv-tool-note` wraps them. Compute the wrapped line count from the transcript width, including explicit line breaks, before adding the two 12px gaps; otherwise later virtual rows are initially placed too high and can jump when measured.</comment>
<file context>
@@ -968,9 +968,13 @@ const TOOL_RUN_BOTTOM = 4;
function activityStepHeight(item: AcpmuxActivity): number {
const tool = item.tool;
- if (!tool) return 26;
+ if (!tool) return item.kind === "note" ? NOTE_LINE + 2 * NOTE_GAP : 26;
const mcp = mcpCall(tool);
if (mcp) {
</file context>
|
Found 6 test failures on Blacksmith runners: Failures
|
|
Review (next-review patch-id; carried): SHIP at f1f3a6e The independent SHIP at c041f57 carries to this head: the PR's own change ( |
|
Review (codex, router-review): SHIP at f1f3a6e Reviewer: codex gpt-6.1-sol xhigh, fast tier. Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at f1f3a6e Visual verdict: Inspected all 16 supplied before/after pairs; they are identical. None show the changed note spacing. No correctness bugs found. Tests could not run locally because Bun and dependencies are unavailable.
Follow-ups:
|
…se-padding # Conflicts: # webviews/src/agent-session/acpmux/model.ts
…t step draws on the live line #29938 draws a running turn's latest step on its own live line, outside .cv-tool-run, so the fixture's last command left the run and the second note had no row below it. One more call keeps it between two run rows. transcript-interim-prose-gap.test.ts: red after the base merge (3 of 4 note gaps found), green with this (4 of 4 at 12px, light and dark). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (codex, router-review): SHIP at 161b964 Reviewer: codex gpt-6-astra high, fast tier. Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at 161b964
Follow-ups:
|
, #31228, repo picker) into transcript rhythm Conflict resolution keeps the grid values: - --cv-reply-room and --cv-note-gap are 0 on the grid, because the stack's block gap is the room under a reply and around a note. - chromeHeight keeps the grid's zero-height reply chrome. - The inbox group head uses toolRowHeight() with base's foldsThreads. - Both sides' trailing CSS is kept, so the repo picker stays. - The design token baseline is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review BLOCK at 5cedb24: #30400 estimates a note as its 20 line plus 12 above and below, but on the grid .cv-tool-note has no margin (the run's block gap is the room), so each note was overestimated by 24. NOTE_GAP is 0, matching --cv-note-gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base's transcript-interim-prose-gap (#30400) holds a 12px note gap. On the grid a run stacks rows and notes with the 24 block gap, which gives a note more room than base's 12 and the same room as between any two blocks. The test now reads the grid token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add shared layout grid tokens and validate their CSS and Swift copies Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * test(webviews): measure gallery grid lines from runtime tokens Add warning-level surface scenes, baseline/cap-height text measurements, named optical offsets, and recoverable per-line JSON evidence. Missing mounts and unknown selector coverage fail. Browser measurements and full checks are delegated to the parent fleet run; scoped lint, formatting, browser lane discovery, gallery IDs, and TypeScript syntax checked locally. Agent-Session: https://cmux.com/deeplink/agent?id=aid-b562541d72b66523f655 * Add transcript rhythm tokens and role-based grid measurement selectors Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * Keep selector fallback valid when the marked surface is the target itself Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * test(webviews): align grid scenes with shared surface roles Use stable surface IDs across variants and ink-only role hints with selector fallbacks. Add existing plus, mode, project and tray scenes plus a 31-row expanded subagent fixture. Retain transcript action coverage and leave toolgroup/rhythm implementation to its owner. Scoped lint/format and gallery entry discovery passed; browser measurement remains delegated to parent fleet integration. Agent-Session: https://cmux.com/deeplink/agent?id=aid-b562541d72b66523f655 * Identify repeated grid scenes by their measured root Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * Add shared transcript between-turn gap token Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * Run layout grid validation in NEXT checks and scale the base unit Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * Run layout grid drift check in the webviews warning branch Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * Keep sidebar trailing marks fixed across densities Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * test(chat): reproduce transcript column and block rhythm drift Agent-Session: https://cmux.com/deeplink/agent?id=aid-539c2a9f2e69febb66f6 * Add canonical composer foot gap token and measure against it Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * fix(chat): centralize virtual transcript block rhythm and columns Agent-Session: https://cmux.com/deeplink/agent?id=aid-539c2a9f2e69febb66f6 * Measure visible placeholder ink and emit each grid scene baseline Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * test(webviews): correct card grid fixture selectors Read card fixture JSX: command permission body is its scope line; inline summary omits popover fold and close controls; glance inspector sections have distinct body labels and only Context/Connectors supply header icons. Scope absence diagnostics by fixture/section without changing coverageFailure assertions. Scoped format/lint, gallery discovery, and diff checks passed. Browser validation remains with parent fleet run. Agent-Session: https://cmux.com/deeplink/agent?id=aid-b562541d72b66523f655 * test(chat): cover turn boundaries, opened cards and count geometry Agent-Session: https://cmux.com/deeplink/agent?id=aid-539c2a9f2e69febb66f6 * Set composer foot gap token to four points Agent-Session: https://cmux.com/deeplink/agent?id=aid-2bd8d22f53cb987a8eea * test(chat): rhythm hover scene and cards fixture covers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-ac5053f7854c8635a4d0 * fix(chat): gap precedence, waiting indicator, foot gap, count spacing and trailing chevrons One gap per adjacent pair, most specific first (waiting rule, composer, turn, block). The waiting indicator takes the block gap on both sides; the composer gap is the block gap after a message so its action row fits. The quiet row sits var(--grid-gap-foot) under the composer box. Count summaries part verb and count with one space and tabular figures. The user action row is positioned again inside .cv-user__body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-ac5053f7854c8635a4d0 * fix(chat): the last turn footer keeps the block gap to the composer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-ac5053f7854c8635a4d0 * fix(chat): received message chevron ends on col-right like every tool row Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-ac5053f7854c8635a4d0 * test(chat): rhythm and estimate checks on base's received, steps and status rows Base now leads a received message with its sender, reads a count summary whole, draws no per-reply action row and centres status rows with its own gaps. The rhythm test measures those rows where base draws them; the estimate tests expect the grid's 28 rows with no status room. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(chat): carets sit inline after their label (#28018), not on col-right Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): a disclosure caret stays inline after its words (#28018) Review BLOCK at e0c3d9b: the rotor margin-inline-start auto pushed a sub-session caret to the line end. The rhythm test now checks each caret sits at most one grid gap after its words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): transcript gaps scale with Interface Size in the virtual placement Review BLOCK at 18cf6d8: the CSS grid tokens multiply by --cmux-interface-scale, but layoutConversation and placeRows placed the gaps unscaled, so at 125% the footer action row laid in a 24 gap overlapped the next row. The gaps (and the tail gap) now take the same factor, read once per pass; kept rows reuse their gaps only at the same scale. The rhythm test adds a 1.25x case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): measured placement reads the live Interface Size, kept rows only at their own Review BLOCK at 1691838: placeRows copied a kept prefix placed at another scale and stamped the estimate's scale. It now reads gridScale() itself, keeps a prefix only at the same scale, and a unit test covers 100% to 125% with kept rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(chat): hold transcript-spacing to the grid action row (28 control laid in the gap) Base #30297 measured a 24px meta row 4px under the bubble. design/grid.md lays a message's action row in the gap with 28 controls and no layout height, so the test now measures that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): row estimates scale grid lengths with the Interface Size Review BLOCK at b1de39a: gaps scaled with --cmux-interface-scale but the estimates still used raw grid metrics (action row 28, tool row, page edge), so at 125% rows drawn 35 were estimated 28. layoutConversation now sets the scale once per pass and those lengths multiply by it; the page edge reads gridScale(). A unit test covers 100% to 125%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): scale the remaining grid-derived estimates (bubble, block and list gaps) Review BLOCK at 5d643f0: the Markdown block gap, tool-run gaps between activity items, and the prompt bubble's padding and sides were still raw grid lengths, and listHeight left out the inner gap .cv-list now draws between items. All of them multiply by the per-pass Interface Size now, and the unit test also covers a two-call run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): folded run estimates include the block gap between children Review BLOCK at 84dc1b7: foldedRunSteps and foldedGroupHeight summed child heights without the --grid-gap-block that .cv-tools, .cv-tool-run and .cv-tool-group draw between them, so an expanded or partly folded run was estimated one 24 gap short per adjacent child. Both add (n - 1) block gaps at the per-pass Interface Size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(chat): folded run lines are stacked with the block gap The tool stacks (.cv-tools, .cv-tool-run, .cv-tool-group) draw --grid-gap-block between their lines, which 66ddd56 now estimates. The unit test counted lines with no gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): one-line notes and activity lines estimate one grid row; notice lines span the row After the base merge: - A legacy activity line keeps the footer slot's one line. Base #30561 measured it as text. - Session-start and standalone notes estimate one 28 grid row instead of 37. Review at 66ddd56. - Restore #29965's .acpmux-row--line .cv-tools rule, so a notice's tool line keeps the icon and text columns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): centre the footer in the turn gap on the action control token itself Review at 45df014: the turn-gap footer rule read --cv-meta-row. On this branch that is var(--grid-transcript-action-control) (28), but base's value is 24, so naming the 28 control directly takes the ambiguity away. The value does not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(chat): a note's estimate takes the grid's zero note gap Review BLOCK at 5cedb24: #30400 estimates a note as its 20 line plus 12 above and below, but on the grid .cv-tool-note has no margin (the run's block gap is the room), so each note was overestimated by 24. NOTE_GAP is 0, matching --cv-note-gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(chat): a note between tool rows has the run's block gap on the grid Base's transcript-interim-prose-gap (#30400) holds a 12px note gap. On the grid a run stacks rows and notes with the 24 block gap, which gives a note more room than base's 12 and the same room as between any two blocks. The test now reads the grid token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
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.tsmergeShortNotes, drawn as.cv-tool-noteinTurnRows.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-notenow has--cv-note-gapabove 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.tsactivityStepHeightestimates a note as its 20px line plus the gap on both sides, so estimated heights match drawn ones.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 throughcmux-ci test:note -> Ran 2 commands: 3px, not 12px, and so on).tightvariant.Also on the fleet at the fix:
rowEstimates.test.ts(21 pass),transcript-row-alignment.test.ts(2 pass, light and dark), andbun run check:pieces(lint, format, type check) clean.Observed / Not run
Changelog
🤖 Generated with Claude Code
Agent session: agent session
Need help on this PR? Tag
@codesmith-botwith 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.
--cv-note-gap, 12px) and adds gallery variants comparing 3, 8, 12, and 16px.activityStepHeightinmodel.tsto estimate a note as its 20px line plus the gap on both sides.Written for commit 161b964. Summary will update on new commits.