fix(agent-chat): connect compact messages to shared presentation

TE
6d ago
+349-43

Received agent messages now use the shared sender identity and Markdown renderer. Their normal actions and waiting-message menu share one compact geometry, and opening a menu keeps both groups visible. The sender's session name leads; its machine stays secondary.

Landing: coordinator reports this PR’s own react-apps-check shards green and permits landing after the final repair gets SHIP with no red of its own. This remains a small stacked binding PR; never merge its dependency-aggregate base. Retarget only the binding commits to feat after parents land.

Leo, 2026-10-27: "We need to have these more centralized, or at least, like, account for cases where, you know, formatting gets a bit f***ed up by agent messages sent back and forth"; "why did you still not remove that, like, weird space on the right?"

This is a small stacked integration PR. Its base, nx-transcript-integration-deps-1027 at 00c0dec1114aa915e0962882b866b1dfcce7c410, exists only to make this binding diff reviewable. Never merge the dependency aggregate. nx-chat owns retargeting this PR to feat-cmux-next once the parents land, with only these binding changes carried forward.

Parents:

PRReviewed/verification input
#26082, inline PR pills0eae1baeed95adf02c5b2e7ddc06341b9352d9eb
#26096, remove floating Copy5971858b50b717a212763fec9b056eb2ed78c334
#26368, explicit shell/session identity4d7bb4943641e44792ba5f0460369c6de1144345
#26370, composer edge8530cdb7e6fd579ddb849f63172ae08a2786fc70
#26373, compact received and queued messages2a7ce36edff1715e832e7d3ba3b4a9868729746e
#26374, shared action rows583f651837a33804c37b48c95c207c522f610fe8
#26375, sender identityb89c8a190086f258c7879a9230a60857e890c933
#26376, recorded send meaning4da8cc63b41c2cf616342809f5f4ca54dd36370b

The binding retains sender navigation, reply drafts, Find, anchored expansion, unsigned/deduplicated message text, quiet commit references, timestamp decoration and the existing host policy for files/images. Queued action wrappers and Copy payloads come from the parents. No mode or rail behavior changes.

Gallery: agent-pane.message-presentation compares compact/plain status, expanded Markdown, clock and pill status alternatives, the former boxed expansion, and a mixed recorded-send replay. The selected treatment keeps the existing Claude Code received-message reference's compact line and our glass/type; the parent PRs contain the design comparisons.

Verification

  • Test-first sender/context regression: 3 passed, 3 failed at d18c1c64bd43f0 before binding.
  • Focused sender, queue actions and message-media tests: 15 passed, 0 failed, 69 assertions after binding.
  • Full bun run check passes at 41d9765a9efba54c85466d683cef69013b57b7cc (formatting, lint, typecheck and guards).
  • Mixed Chromium gallery acceptance: 6 passed, 0 failed, 102 assertions at that head. It checks 760px and 360px/125% zoom in both themes, one Copy, semantic Markdown, session-first identity, contiguous action spacing, and menu-open visibility.
  • Captures below use synthetic fixture content. Before: 58bce797c9a84b42f3de1088fcd495fa18768f55 with only the identical gallery fixture added. Original after captures: 41d9765a9efba54c85466d683cef69013b57b7cc; the PR-link repair captures below are from the repair revision. No private reference screenshots are published.

Before and after

StateBeforeAfter
Compact, darkBefore: dark mixed transcriptAfter: dark compact transcript
Compact, lightBefore: light mixed transcriptAfter: light compact transcript
Hover, darkBefore: floating Copy overlaps statusAfter: one Copy and expanded Markdown
Hover, lightBefore: duplicate Copy in light themeAfter: one Copy in light theme
Pin and menu-open states, both themes
StateDarkLight
Pointer on PinPin hovered, darkPin hovered, light
Read after this step menuStep menu open, darkStep menu open, light
Read after this turn menuQueue menu open, darkQueue menu open, light

PR-link layout repair

Removed the redundant wrapper around the complete actions fragment. ReceivedActions still groups the icon buttons, and PullRequestDock is again a direct child of the received line so its existing flex and shrink rules apply.

The four new Chromium layout cases fail before the fix because the dock is nested. At 1965d3d1a926caccccea14a4aa4e27c3fc866c3b, all 10 received/queued layout cases pass (120 assertions), including both themes and 360px/125% zoom and 760px widths; the full web check and prepush gate pass. The gallery adds received-pr-links for this path.

WideNarrow
PR links, darkPR links at 360px, dark
PR links, lightPR links at 360px, light

Menu-open visibility repair

At ed8c5139bc1633a5a3696ca62e0870e9920b7a35, a shared received-line selector keeps all received action groups visible while a descendant menu trigger is expanded. It uses the trigger’s existing ARIA state, adds no timers or React state, and resets automatically when the menu closes. The PR dock remains a direct child.

The regression fails with the old CSS in both themes, then passes while checking every group for 16 painted frames after leaving the row. Full Chromium suite: 10 passed, 124 assertions; web lint and prepush pass.

DarkLight
All actions remain visible with Send now openAll actions remain visible, light theme

Changelog

Fixed: Agent messages share sender identity, Markdown rendering and compact action geometry.

Agent session: agent session