Skip to content

feat(react): show A2UI actions by their label in the transcript - #1641

Open
blove wants to merge 3 commits into
mainfrom
blove/react-a2ui-action-label
Open

blove wants to merge 3 commits into
mainfrom
blove/react-a2ui-action-label

Conversation

@blove

@blove blove commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An A2UI action that an application sends as the next user turn showed as raw {"version":"v0.9","action":…} JSON in the React transcript. Angular shows the pressed control's label.

  • Chat and MessageList now show a user message that is a serialized A2UI action as action.label ("Search flights"), or the action name in plain words when there is no label (bookingSubmit reads "Booking submit").
  • On by default, as in Angular (decided by Brian on 2026-11-17). a2uiActionLabels={false} shows the message as sent.
  • The stored message is unchanged; assistant and tool messages, other user messages and custom renderMessage rows render as before.
  • The label is rendered as text, never as Markdown or markup.
  • No new export, so the parity baseline and package pins are untouched.

Behaviour change

An existing React app that sends actions as user messages and relies on the built-in row will see the label where it saw JSON. The React cockpit A2UI examples assert on request bodies, not on the bubble's JSON.

Verification

  • npx nx run-many -t test,type-tests,lint -p react: 100 files, 1,532 tests pass (9 new), rerun after the default changed.
  • npx nx run-many -t build --projects=core,content,react and node scripts/react-parity/verify-packages.mjs passed before the default changed; not rerun after.
  • Website: npx nx test website did not complete cleanly on my machine (load average above 500; five 5-second timeouts in specs unrelated to this change). Those specs and docs-content-rules.spec.ts pass when run alone. Not checked in a browser.

🤖 Generated with Claude Code

A2UI action sent as the next user turn rendered as its serialized JSON in
React. Chat and MessageList take an opt-in a2uiActionLabels switch that shows
the pressed control's label instead, or the action name in plain words when
the message carries none. Other messages and custom renderMessage rows are
unchanged.
@blove
blove enabled auto-merge November 17, 2026 23:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant