Agent chat: a long name gives way after the preview, so the chevron stays in view

Merged
TE
3d ago
+22-6

Follow-up to #34464, from its review. Leo's ask there:

idk why names are ellipses'd so early plus the weird chevron spacing thing

#34464 took the 40%/45% caps off names and stopped them shrinking. That left a gap: in a narrow pane, a long name could push the chevron and the status off the row.

What changes

  • A name still keeps its natural width while the message's first line has room to give.
  • Once the first line is gone, the name is cut instead of the chevron or status. It does this with a flex-shrink of 0.0001: below a layout unit while the preview still has room, and all of the remaining overflow once the preview is gone.
  • A received line's toggle never shrinks below the chevron's own room.
  • A send's file name is cut with an ellipsis, the same way the preview is.
  • The declined message line's chevron now uses the rows' 14/1.2, like every other row chevron.
  • Left as they were: the Details and Raw toggles inside an opened card. They're in-card controls, not row disclosures, so they keep 12/1.4.

This is a restyle only. Nothing is removed or switched off.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Fixes long agent names pushing the chevron and status off the message row in narrow panes.

  • Names keep their natural width while the preview gives way first; once the preview is gone, the name is cut instead of the chevron or status.
  • A received line's toggle gives way before its sender's name, shrinking down to the chevron's own room but never under it.
  • A send's file name is ellipsized like the preview.
  • The declined line's chevron now matches the rows' 14/1.2.