cmux-next agent pane: an opened received message shows its text; the envelope is under Details

Merged
TE
16d ago
+225-15

An opened "Received message from …" line now shows only the sender's words. The prompt as the agent got it (cmux's [cmux agent message] header, Message id, the delivery note and the end marker, or a Claude Code <cross-session-message> envelope) sits behind a Details toggle under the message. This is Leo's feedback: the expanded message still showed the raw envelope.

Leo's screenshot also showed "Sent now · stopped the turn" under the card. That screenshot is the card from before #22761, and #22761 already removed the steer line under a received message. Nothing more to remove here.

Changes

  • IncomingMessageCard.tsx: the raw prompt pre is behind a Details button (aria-expanded, aria-controls).
  • conversation.css: the Details button has the line's dim text, and the text brightens on hover or focus. There is no hover box.
  • Localizable.xcstrings: new message.details ("Details"), in all 21 locales, taken from the existing turn.failure.details translations.
  • Gallery agent-pane.incoming-message: new details variant.

Testing

Regression command: cd webviews && bun test test/agent-pane-suggested-tasks.test.ts (browser lane).

  • Base, at the test-only commit: "a prompt with agent_message provenance…" and "a Claude Code cross-session message…" fail. The opened card contains [cmux agent message] and from-mode=.
  • Head: expected to pass. CI's browser lane is the first run.

Observed / Not run

  • Observed: scripts/web-lint.sh and prepush-gate.py passed.
  • Not run locally: the browser tests and the gallery (no test runs on Leo's Mac).
  • Localization: the one new key has all 21 locales, and no other catalog changed.

Changelog

  • Changed: An opened message from another agent shows just its text; the full prompt the agent received is under Details.

Agent session: cosmic-gray

🤖 Generated with Claude Code


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


Summary by cubic

An opened "Received message from …" line now shows only the sender's words, per Leo's feedback that the expanded message still showed the raw envelope. The full prompt as the agent got it (cmux's [cmux agent message] envelope, or a Claude Code <cross-session-message> envelope) waits behind a Details toggle under the message.

Changes

  • IncomingMessageCard.tsx: the raw prompt pre sits behind a Details button (aria-expanded/aria-controls), styled in conversation.css with the line's dim text and a brighter hover/focus state.
  • Localizable.xcstrings: new message.details string in all 21 locales, taken from the existing turn.failure.details translations.
  • Gallery agent-pane.incoming-message gains a details variant; tests now check the opened card shows only the body until Details is clicked.
  • Find in Chat now opens Details automatically when a match appears only in the envelope (such as a message id), since Find searches the whole prompt.
  • The "Sent now · stopped the turn" line in Leo's screenshot predates #22761, which already removed the steer line under a received message; nothing more to remove there.