Repository navigation
Agent chat: a long tool output that wraps past eight rows collapses with Show more - #24463
teamleaderleo wants to merge 2 commits into
Conversation
…ses with Show more A tool block already showed its first eight lines under a fade with Show all N lines (#23413), but it counted newlines only: a one-line JSON result or a minified log line wrapped to dozens of rows with no cap and no toggle. Those are now cut at eight rows too, with Show more, and Show less closes them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray
|
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)
Probably yours: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: cmux-next checks (god files, concurrency, crash safety, l10n); NEW: Gallery before/after for
States
Pick other states with a |
|
Owned by transcript-parity on cosmic-gray · session |
|
Owned by nx-chat on big-red · took over from session 01a16030 |
|
Found 25 test failures on Blacksmith runners: Failures
...and 15 more test failures. View all on Blacksmith: run 39903556961, run 39903556998, run 39903556878
|
|
|
|
|
|
|
|
Bead |
Four looks for a long tool output's collapse (8 rows + fade + link, the shipped one; 6 + fade + bar; 10 + hard cut + chip; 15 + fade + link), compared in the new agent-pane.tool-output-collapse gallery entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16030-bf28-7072-b1f6-b83bbd0beacc&host=cosmic-gray
|
|
|
Orphaned: no activity for 69 h, and no lane holds a lease on it. The orphan sweep could not merge |
|
Stale (13d, conflicts); rebuild fresh from feat-cmux-next if still wanted |
|
Stale (13d, conflicts); rebuild fresh from feat-cmux-next if still wanted. Added to nx-chat stale backlog. |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Leo's words (2026-10-22 21:28Z): "also the tool calling i think there should be more of like a "show more" type thing for long outputs or whatnot..."
Leo-ask: ask-c57e055a4e
What base already does
#23413 (merged 2026-10-21 15:59Z, after the 03960f5 nightly Leo's app runs) already collapses a tool block longer than eight lines:
That covers a call's output, a command's Shell block and an edit's diff.
The gap this fixes
The cap counted newlines only. Output wraps by default, so a result with a few long lines (a one-line JSON result, a minified log line) wrapped to dozens of rows with no cap and no toggle.
Change
message.morestring (21 locales, from cmux NEXT agent chat: long prompts collapse to ten lines with Show more; pasted blocks are chips #23431's long prompts). No new strings.useWrapsPast) lives in BlockParts.tsx. In ToolRow.tsx and ShellBlock.tsx only theusePreviewinputs and the card's root attributes change; the<pre>lines that Agent chat: long lines in diff and command cards show a thin scrollbar at rest #23967 and Agent chat: tool results show their content, not the JSON envelope around it #24030 edit are untouched.Before / after (synthetic gallery fixtures,
agent-pane.tool-output-collapse, Linux Chromium)Light:
. The line-cut case is unchanged: 
Live before/after:
scripts/gallery-compare.sh→/compare/tp-tool-output-showmore/on the gallery host (tailnet).Versions tried (gallery experiment
tool-output-collapse, Compare arms)I picked fade-link because it is closest to Claude Code and the Codex app, which show a few lines and then a quiet "Show more" under the block. It is also the look #23413's line-cut blocks and #23431's long prompts already use, so the transcript keeps one collapse.
The other arms stay in the gallery for comparison. Nothing changes for anyone by default beyond the wrapped-rows cut.
Performance
[data-preview="cut"]max-height, nowvar(--cv-preview-rows, 8)).scrollHeightplus one computed style, in a layout effect, when that block's own text, wrap or line count changes. No per-frame loop, and nothing per token for any other row.ResizeObserveron that block's own body, so a narrower or wider chat re-reads it. Stop condition and cleanup: it is disconnected when the block's text changes, when it stops wrapping or fits by line count, and when it unmounts.Find
The text is drawn whole and only clipped, so Find counts it. A Find reveal bumps
reveal, which opens the block, as for line-cut blocks (tested).Tests
webviews/test/transcript-wrapped-output-preview.test.tsxcovers:wholeblock is never cut;Observed / Not run
vp fmt --checkandvp linton the changed files: clean;vp fmt --checkflagssrc/pages/settings/components/HostSections.tsx;Changelog
Fixed: A long tool output whose lines wrap past eight rows now collapses with Show more in agent chats.
Agent session: cosmic-gray
🤖 Generated with Claude Code