SIGN IN SIGN UP

fix(chat): add visible keyboard-accessible expand control for collapsed user messages (#3744)

* fix(chat): add visible keyboard-accessible expand control for collapsed user messages

Collapsed long user messages were clamped to two lines with no visible
or keyboard-accessible way to expand them: both collapse controls
rendered only in the expanded state, and expanding relied on clicking
the clipped text itself.

- UserTextPart: render an expand button (arrow-down-s) when a collapsed
  message is actually truncated, in both the message-level and legacy
  single-part paths; share the expand logic between the button and the
  click-on-text handler
- UserContextPart: give collapsed context cards role=button, tabIndex,
  Enter/Space handling, and a trailing chevron so the affordance is
  visible and keyboard-reachable
- add chat.message.userText.expandAria to all 12 locales
- cover truncation gating and the controlled-path expand in a focused
  test

Closes #3742

* test(chat): drop dead ResizeObserverStub interface from truncation test

eslint's no-unused-vars attributed the interface's usages to the
same-named inner class, so the declaration was dead weight and failed
CI lint. Type the observers list with the minimal shape the test uses.

* test(chat): cover collapsed context card keyboard expand

The Enter/Space handler added for collapsed context cards had no
automated coverage; exercise it end to end through readContextPart ->
UserContextPart collapsed branch -> onExpandMessage.

* test(chat): move the expand-control test to the OpenCode 2 client and add the Dutch string

---------

Co-authored-by: bashrusakh <bashrusakh@users.noreply.github.com>
L
Leonid committed
55bc0ba2de104a8fd5bccf05c6fc5822ba0f2590
Parent: 1e8b2c2
Committed by GitHub <noreply@github.com> on 9/28/2026, 9:31:53 PM