Repository navigation
feat(react): render generated UI carried by a message in the transcript - #1604
Merged
Merged
Conversation
MessageList and Chat take an opt-in generativeUi option. With a registry, an assistant message whose content is a json-render spec renders through RenderSpec in place of its text, element by finished element, with the GenerativeUiSkeleton until the root element has arrived. With renderA2ui, content after the A2UI marker is handed to the application together with the placeholder. A view that throws gives way to the message text.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 15, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Angular
chatclassifies each assistant message's content and renders a json-render spec or A2UI surfaces inside the transcript. ReactMessageListandChatonly rendered Markdown, so a spec message showed as raw JSON. React already had the pieces (RenderSpec,A2uiSurface,createA2uiSurfaces,GenerativeUiSkeleton) but nothing composed them into the message list.This adds an opt-in
generativeUioption toMessageListandChat. Nothing changes without it.registry(plusfunctions,fallback): an assistant message whose content is a json-render spec renders throughRenderSpecin place of its text. While it streams,GenerativeUiSkeletonstands in until the root element has arrived; then each element appears as its JSON finishes, and views getloadinguntil the message completes. The spec's ownstatefeeds bindings, and a{ "statePath": … }prop is read as a state binding (as the Angular normaliser does).renderA2ui: content after the---a2ui_JSON---marker is handed to an app function as{ messageId, source, streaming, skeleton }. Half a marker mid-stream renders nothing rather than flashing as text.skeletonLabelreplaces the placeholder text.renderMessagekeeps full ownership.The chat entry does not import the A2UI entry or packages;
verify-boundaries.mjspasses.Left for later
libs/react/src/a2ui/message-surface.spec.tsxshows that composition working end to end withA2uiSurface. Shipping it means a JSONL envelope reader that does not pull the optional@threadplane/a2uipeer into a runtime import, so it is its own PR.RenderSpectoday).Verification
libs/react/src/chat/message-list-generative-ui.spec.tsx(13) andlibs/react/src/a2ui/message-surface.spec.tsx(1).generativeUibranch inmessage-list.tsxdisabled, 7 of the 14 fail; restored, all pass.npx nx run-many -t test,type-tests,lint,build -p react,content,corenode scripts/react-parity/verify-packages.mjsnode scripts/react-parity/inventory.mjs --check --drift warnnode scripts/react-parity/verify-boundaries.mjsnode --test scripts/react-parity/{verify-packages,runtime-consumer,inventory}.spec.mjs(169 pass)All run on this branch after merging
mainat #1601. Not run:verify-langgraph-candidate.mjs(no fixture or entry import change), and no browser check of the styles.🤖 Generated with Claude Code