feat(chat): progressive per-component GenUI rendering (PR B)#297
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Internal skeleton component mounted by <a2ui-surface> when a component's bindings are unresolved (and the catalog entry omits a fallback). Three shimmer rows, 'Building UI' label, themed via chat tokens.
Internal directive used by <a2ui-surface> to render a single A2uiComponentView. Mounts views[type].fallback (or the lib-default fallback) while !ready, then the real component once ready=true. A monotonic gate stops re-checking ready after the real mounts; later updates flow as ComponentRef.setInput() calls.
When given the new state input (A2uiSurfaceState), the surface walks componentViews via a2uiSlot — each node mounts its fallback while !ready, then the real component once ready, with a monotonic gate that prevents flicker. The legacy wire-format surface input keeps working via the existing render-spec path.
Strict TS noUnusedLocals flags it under the production build. The structural directive only needs ViewContainerRef — TemplateRef was declared but never read.
The chat composition now passes [state] to <a2ui-surface> so the progressive per-component renderer activates. ContentClassifier exposes a new a2uiSurfaceStates signal (parallel to a2uiSurfaces) sourced from the live A2uiSurfaceStore. The bubble-level <chat-genui-skeleton> branch was removed in an earlier commit; the surface now owns its empty-state via the internal A2uiDefaultFallbackComponent.
… test, JSDoc) - internalHandlers prefers state.surface over the legacy surface input so action messages always reference the rendered surface, even when both inputs are set with mismatched surfaceIds. - Adds a surface.component.spec test asserting state takes priority over surface for rendering. - Adds class-level JSDoc on A2uiSurfaceComponent explaining the dual-input precedence contract. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9567297 to
d60cdd4
Compare
- Rename test-only components in a2ui-slot.directive.spec.ts and surface.component.spec.ts to use 'a2ui-test-*' selectors per @angular-eslint/component-selector. - Replace constructor parameter injection with inject() in a2ui-slot.directive.ts per @angular-eslint/prefer-inject.
Picks up the new state, surfaceFallback, rootIds members on A2uiSurfaceComponent and the a2uiSurfaceStates field on the content classifier.
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
Phase B of the progressive GenUI rendering redesign. Builds on PR #295 (PR A — surface store readiness) to render the A2UI surface progressively: per-component fallbacks swap to real components in place as bindings resolve.
Class-level JSDoc on `A2uiSurfaceComponent` documents the dual-input precedence contract; a dual-mode spec asserts `state` takes priority over `surface` when both are set.
Base: claude/genui-surface-store-readiness (PR #295). After PR #295 merges to main, this PR's effective base becomes main.
Test plan