Repository navigation
Conversation
Angular materializes a streaming json-render spec on every chunk, so elements and their string props render while the message streams, and chat-generative-ui seeds spec.state path by path. React kept only elements whose JSON had finished and seeded state once the whole object had, so elements popped in one at a time. PR #1604 described that behavior but gave no safety reason for it. generativeUi.progressive (off unless set) renders an element once its type has finished, lets its string props grow as they stream, and applies other props, child IDs, visible and repeat only once each has finished. on bindings apply only once the whole element has, so no action runs with half-written params. A spec's own state is seeded one top-level path at a time; the own store is rebuilt rather than written, so seeding reports no stateChange, and a value a view already wrote is kept. A finished spec renders the same either way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blove
enabled auto-merge
November 18, 2026 01:19
This branch has not been 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.
Summary
Angular's
parse-tree-store.tsmaterializes the partial spec on every push, so generated-UI elements and their string props render while a message streams, andchat-generative-ui.component.tsseedsspec.stateinto the store path by path. React'sgenerative-ui.tsxkept only elements whose JSON node wascompleteand seededstateonly once the whole object finished, so elements popped in one at a time.Gap check: this was not a stated safety decision. #1604, which introduced it, describes the behavior ("each element appears as its JSON finishes") but gives no reason, and no comment or doc explains it. The only related docs line says the cockpit example waits for a confirmed layout.
This adds an opt-in
progressiveflag toMessageGenerativeUi(Chat/MessageListgenerativeUi). It is opt-in because it changes what views receive mid-stream, and React library defaults stay unchanged.With
progressive: true:typestring has finished, so a half-typed type never flashes the fallback. String props grow in place. Other props, child IDs,visibleandrepeatapply once each has finished, and an element whosevisibleorrepeatis still open waits.onbindings apply only once the whole element has finished, soemitdispatches nothing against partial params.spec.stateseeds one top-level path at a time. The per-message store is rebuilt with the new paths under what is already there, so seeding emits nostateChangeand a value a view already wrote is kept (Angular's untouched rule). A supplied sharedstorestill does not receive spec state, as today.Docs: README section and one line in the React generative-UI guide (no contractions).
Verification
stateChange); no handler runs from an element whose JSON is open, including after itsoncloses; the finished render matches the defaultinnerHTML.onbindings fails the handler test; restored.NX_DAEMON=false npx nx run-many -t test lint type-tests -p reactpasses (1531 tests; lint 0 errors).node scripts/react-parity/inventory.mjs --check --drift warnpasses. There are no new exports or files, andMessageGenerativeUiis type-only.node --test scripts/react-parity/verify-packages.spec.mjs: 103 pass, 0 fail.npx vitest runinapps/website: 1967 pass, and the docs content rules pass. Two files fail for environment reasons and still fail when rerun alone with a 120s timeout:generate-api-docs.spec.ts(the symlinkednode_modulesresolves outside the worktree) andapi/ingest/route.spec.ts(posthog-nodeis missing from the sharednode_modules). Neither touches this change.🤖 Generated with Claude Code