Repository navigation
Transcript: a note between tool rows is estimated from its wrapped lines - #31181
Conversation
activityStepHeight gave a note folded between tool rows (turns.ts mergeShortNotes, conversation.css .cv-tool-note) one 20px line; a note that wraps drew taller until measured. Estimate it from its text on 20px lines at the row's width, as replies are. Fixes #31148. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
|
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 web and size checks: green Shipped in:
|
|
Owned by an agent session · session |
|
Found 6 test failures on Blacksmith runners: Failures
|
Conflicts resolved keeping both sides (base merged, no rebase). Agent-Session: https://cmux.com/deeplink/agent?id=aid-159afad10a5ab45ea16c
|
Review (codex gpt-6-astra high, next-review): BLOCK at 33f6374 BLOCK at 33f6374 Visual verdict: no images; Leo tries the build
|
A newline in a short note draws as a space in .cv-tool-note, so the estimate no longer reserves a second line for it (review BLOCK at 33f6374). 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
…he model The base merge scaled the tool rows and note gap (chromeScale), so the test measures wraps against the one-line note instead of hard-coded pixels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-92fa78a91e29868c5eaa
|
Fixed the BLOCK at 33f6374 in 7190324: a note is measured with its whitespace collapsed, as |
…note-height-estimate # Conflicts: # webviews/src/agent-session/acpmux/model.ts
|
Review (codex gpt-6-astra high, next-review): SHIP at dcee8e4 SHIP at dcee8e4 Visual verdict: no regression across all 16 gallery pairs; visible differences are spinner animation. No correctness findings. Tests could not be rerun locally because Bun and dependencies are unavailable. Follow-ups: none |
A newer verdict blocks 259bdac (no independent SHIP at the head).
|
Review (next-review patch-id; carried): SHIP at 259bdac The independent SHIP at dcee8e4 carries to this head: the PR's own change ( |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes #31148 (follow-up from the review of #30400).
model.tsactivityStepHeightestimated a note folded between tool rows (turns.tsmergeShortNotes, drawn as.cv-tool-note) as one 20px line plus the 12px note gap above and below. A note that wraps draws taller than that until it is measured, so the scroll height could step once it scrolled into view. The note is now estimated from its text at the row's width with the file'stextHeight(a new optional line-height argument gives the note's 20px lines), as replies are. The width is threaded throughfoldedRunSteps/foldedGroupHeight. Prepared texts are cached and cleared past 256, as the other estimate caches are; only notes are measured, so there is no new per-row or per-token work.Red/green (
rowEstimates.test.ts, new case "a note folded between tool rows is estimated as the lines it wraps to at the column's width"):bun run check: https://github.com/manaflow-ai/cmux/actions/runs/41332871351Spec: design/chat-transcript.md is unchanged; the note's drawn rhythm is unchanged, only its estimate.
Related: leo-workspace#1929 (grid.md's copy button 28/6 vs shipped 24/4) was settled in a notes PR; #29639 is #31176.
Risk: small, estimate only (first-layout heights of folded runs with notes).
Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the transcript's scroll-height estimate for a note folded between tool rows. The estimate previously assumed a single 20px line, so the scroll height stepped when a wrapping note scrolled into view. The note is now estimated from its flattened text at the column's width on 20px lines, matching how
.cv-tool-notedraws:white-space: normalcollapses newlines and space runs to single spaces. Prepared note texts are cached and cleared past 256 entries, and only notes are measured, so there's no per-row or per-token cost. The new test measures wraps against the model's one-line height so it holds under the base merge'schromeScale.Written for commit 259bdac. Summary will update on new commits.