Skip to content

feat(react): add an opt-in source disclosure under transcript surfaces - #1620

Open
blove wants to merge 1 commit into
blove/react-transcript-interactive-specsfrom
blove/react-transcript-source-details
Open

blove wants to merge 1 commit into
blove/react-transcript-interactive-specsfrom
blove/react-transcript-source-details

Conversation

@blove

@blove blove commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Stacked on #1617 (both change libs/react/src/chat/generative-ui.tsx). This PR targets that branch for now so the diff shows only this change; it moves to main once #1617 has merged.

Summary

The Angular chat puts a closed "Details" disclosure under each generated surface, showing the message content it was built from. React had no equivalent. generativeUi.sourceDetails on MessageList and Chat adds it, opt-in:

  • sourceDetails: true renders <details class="tp-chat-generative-ui__source"> after the surface, with the summary "Details", a heading ("Layout source" for a spec, "Response source" for A2UI) and the message content in a <pre>.
  • sourceDetails: { summary, spec, a2ui } replaces that text (new exported type MessageSourceLabels).
  • A placeholder, and a message left as text, get no disclosure.

Styles mirror the Angular rule: muted 12px text, and a source block capped at 280px that wraps and scrolls.

Verification

  • npx nx run-many -t test,type-tests,lint,build -p react,content,core: passed (82 React test files, 1396 tests).
  • Mutation check: with the disclosure disabled, 3 of the 5 new specs fail (the other two assert its absence); restored, all pass.
  • node scripts/react-parity/verify-packages.mjs, verify-boundaries.mjs, inventory.mjs --check --drift warn: passed (baseline drift is informational).
  • node --test scripts/react-parity/{verify-packages,runtime-consumer,inventory}.spec.mjs: 169 pass.
  • node scripts/react-parity/verify-langgraph-candidate.mjs: passed (verified-candidate).

Not checked in a browser: the styles are untested visually.

🤖 Generated with Claude Code

generativeUi.sourceDetails adds a closed Details disclosure under each spec
or A2UI surface in the transcript, showing the message content the surface
was built from. Labels replace its text. It is off unless set, and a
placeholder or a message left as text gets none.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Nov 16, 2026 6:34am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview – threadplane — 16c1ff6a Deployed Nov 16, 2026 by vercel[bot]
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