fix(next): received agent messages start as one-line strips

Closed
TE
7d ago
+112-141

Received agent messages now start as a single compact row: sender chip, first-line preview with an ellipsis, and the existing disclosure chevron. Clicking the preview row or pressing the chevron opens the existing full Markdown card in place; the same action collapses it again while useAnchoredCollapse preserves the transcript position from #24085.

Leo (2026-10-26): “Man, I hate seeing these big previews. Just, like if I want to see them, I'll expand them. But just have it be that they are minimized from the start. Just one line. Like if you receive a message, fine. But I don't need to, like, see the, the big executives that are just showing, like, one line of it, one strip. Boom, that's it, that's all I need.”

This replacement is received-message-only. User prompts, assistant replies, sent agent-message rows, menus, and the shared header/action markup are unchanged. The old broader #25271 candidate is intentionally superseded because it also changed sent rows; it is being closed by nx-chat after this replacement opened.

The row estimate reserves one line while closed and the full Markdown body once opened, so long messages do not create a preview-sized layout jump. Focused unit/browser regressions cover default compact state, disclosure open/close, keyboard access, code controls, and row-height parity. Gallery variants show the same received fixtures with global Minimal Mode on and off.

Design reference: cmux-design-references/apps/claude/live/transcript-collapsed-agent-message.png (quiet sender chip, one-line transcript disclosure, full content on demand).

Observed / Not run

  • Hosted run 40418787300, source 13861ad8f3bda273a680e6471a4619997435701e: all 47 focused unit/browser tests passed; scripts/web-lint.sh --new-only --base 0afa8d9d32412c5cf76ba221d9432a9479e089d8 passed in 55.6 s. Five layer findings also occur on base.
  • python3 scripts/cmux-next/prepush-gate.py and git diff --check passed.
  • Independent Astra xhigh review found one remaining P2 in the shared App integration: the obsolete drawnMinimal effect still drops received-row measured heights when global Minimal Mode changes. This PR is held for that isolated removal and fresh exact-head review.
  • Capture-only run 40419390009 completed, but delivered no PNG markers. Actual before/after publication remains pending; a successful wrapper is not a capture receipt.

Changelog

Changed: received agent messages start as one-line strips and expand in place.

Agent session: agent session