Agent chat: a finished subagent's name takes its row, the chevron right after it
Leo, 2026-11-03, on a transcript row "Subagent finished: [Fix defaults-snapsho] ›", the name cut at about a third of a wide pane with a lone chevron at the far right:
this is pretty bad spacing and formatting
i thought we made this stuff smaller
and later, on "Subagent finished: [Push stranded lane ref] › 4m 1s": "weird indenting /cut off text?"
A finished subagent's name chip now takes the room its row has and is cut with an ellipsis only at the row's edge. The chevron sits right after the chip, as on the other rows, and the duration stays at the line's end. The row keeps its 22px one-line height.
- Cause:
AgentTag.csscaps every tag atmax-width: 40%(from #29754). On this row, 40% of the sentence cut the name. #32867 put the chevron right after the sentence, but the sentence still kept the uncut name's width, so the empty part of it stood between the cut chip and the chevron. Regressing PRs: #29754 (the cap) and #32867 (the layout that made the gap visible). - Fix (
subagents/subagents.css, only on the subagent-done row): the chip has no cap and shrinks as a block box with an ellipsis. What follows the name (a stop reason or a failure) is now its own span (SubagentDoneLine.tsx) and is cut first, so a long error never squeezes the name to an empty pill. The review caught that case. - Gallery:
agent-pane.subagent-done, with a long title (the pick), a short title, a narrow pane, a failure with a long error, a 60% cap (version B) and the base's look (before).
Design spec: leo-workspace design/transcript-spacing.md (rule 3, one-line rows 22 tall) and design/chat-transcript.md ("Chevron after the label", "Session link chip"). cmux-design-references has no Claude or ChatGPT capture of a finished-subagent row. The chevron placement follows the ChatGPT chevron rule from #32867.
Test
cmux-ci test --setup playwright -- bash -c 'cd webviews && bun test test/subagent-done-chip-width.test.ts'
- Red on base (test commit 0ccefd2, before the fix): 4 of 5 fail. The chip is narrower than the old cap, the chevron is far from the chip, and the content overflows.
- Green at the fix (pre-rebase dc3ead4): passes, with
bun run check,transcript-chevron-after-label,RowGrammarandTranscriptActivityRow, 62 tests in all.
Observed / Not run
- Observed: the fleet runs above,
scripts/web-lint.sh(heavy checks left to CI on this host) andprepush-gate.py. - Not run: a nightly or DEV build. The failed-with-long-error test was added after the base run, so its red on base was not recorded. A run at the rebased head was started.
Changelog
- Fixed: A finished subagent's name in the agent chat is no longer cut short with a gap before its chevron.
Agent session: agent session
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the finished-subagent chat row so the name chip fills the row's width instead of being cut at a fixed 40% cap, with the chevron right after the chip and the duration at the line's end.
- The chip is now a block box that shrinks with an ellipsis at the row's edge; the old cap left a gap between the cut name and the chevron.
- A stop reason or failure after the name is its own span that is cut first, so a long error no longer squeezes the name to an empty pill.
- Adds a gallery entry and a Chromium test covering long names, short names, narrow panes, and failures with long errors.