Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request transitions the A2UI specification, catalogs, samples, and end-to-end tests from version v0.9 to v1.0, updating components, schemas, and data bindings (such as using @path and @call). It also introduces a helper to attach catalog schemas. Feedback on the changes identifies an issue in the findPrototypeGetter helper within samples/shared/attach-catalog-schema.ts, where starting the prototype chain search from the prototype instead of the object itself can cause eager evaluation of own getters; a code suggestion is provided to start the search from the object itself.
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
Start the getter search in findPropertyGetter at obj so own getters and own data properties properly resolve or shadow inherited prototype getters. Track base schema resolvers in a WeakMap to prevent wrapper stacking on repeated attachment, and gracefully tolerate frozen or non-configurable catalogs and component objects. Addresses review feedback on #324.
f388a8c to
af82fb6
Compare
wrenj
left a comment
There was a problem hiding this comment.
LGTM — sample renderers, generated demos, and E2E/visual suites are cleanly migrated to v1.0 alongside v0.9 compatibility coverage. Leaving three minor non-blocking notes inline.
| { | ||
| id: 'root', | ||
| component: { | ||
| Canvas: { |
There was a problem hiding this comment.
nit (non-blocking): In this v1.0 fixture, root still uses the v0.9 nested wrapper syntax component: { Canvas: { ... } } while its siblings use v1.0 flat string component fields. getCanvasInfo in surface-partitioner.ts already supports flat { id: 'root', component: 'Canvas', cardTitle: '...', children: [...] }, so using the flat form here would keep flightA2uiPayload pure v1.0.
There was a problem hiding this comment.
+1 — same nested component: { Canvas: { ... } } wrapper in shell/e2e/a2a-multi-frame-surfaces.e2e.ts:49-58 and shell/e2e/guest-frame-sends.e2e.ts:117-126.
There was a problem hiding this comment.
Addressed in e9ff9ec4: flattened the v0.9 nested { component: { Canvas: { ... } } } wrapper to canonical A2UI v1.0 { id: 'root', component: 'Canvas', ..., children: ['header_text', 'flight_card_ana', 'flight_card_jal', 'confirm_btn'] } in shell/src/app/agent-chat/test/mock-a2a-agent.ts and { id: 'canvas', component: 'Canvas', ..., children: ['canvas_text'] } in shell/e2e/a2a-multi-frame-surfaces.e2e.ts and shell/e2e/guest-frame-sends.e2e.ts.
mikzat
left a comment
There was a problem hiding this comment.
Nice migration across the sample renderers, showcase demos, and E2E suites. Before merging, two items look worth addressing: trimming the examples/example injection in attachCatalogSchema (which adds ~12 KB of duplicate JSON to every Copilot system prompt) and restoring variant: 'caption' in chat-message.visual.ts + regenerating the four snapshot PNGs via visual_baselines.yml. Everything else below can be handled here or in a follow-up.
Two notes on lines outside the diff:
shell/e2e/guest-frame-sends.e2e.ts:293, 366-369:delayCatalog()doesn't hold anything back anymore — Lit and React now pass two v1.0 catalogs in memory ([basicCatalog, mcpCatalog]), soPreviewBridge.resolveCatalognever fetches<renderer>/catalog, andpublic/catalogwas deleted. To keep exercising the "typed input survives the first catalog resolution" race, delay theGET_CATALOG/A2UI_CATALOGpostMessage exchange (or use a stub renderer that fetches its catalog over HTTP) and update the comment on lines 366–368.- Nit (
bridge/src/mcp/README.md:87,samples/shared/demos/README.md:13,samples/shared/demos/index.ts:25): These still reference the deletedbasic-with-mcp.catalog.tsand describe the showcases asv0.9/'v0.9'; worth updating to the v1.0 setup.
af82fb6 to
5e93f98
Compare
5e93f98 to
902451c
Compare
Start the getter search in findPropertyGetter at obj so own getters and own data properties properly resolve or shadow inherited prototype getters. Track base schema resolvers in a WeakMap to prevent wrapper stacking on repeated attachment, and gracefully tolerate frozen or non-configurable catalogs and component objects. Addresses review feedback on #324.
902451c to
d074720
Compare
Start the getter search in findPropertyGetter at obj so own getters and own data properties properly resolve or shadow inherited prototype getters. Track base schema resolvers in a WeakMap to prevent wrapper stacking on repeated attachment, and gracefully tolerate frozen or non-configurable catalogs and component objects. Addresses review feedback on #324.
- Remove scripts/normalize-demo-headings.{mjs,test.mjs} and heading
normalization hooks in scripts/generate-demos.mjs and demos README
- Reset Monaco errors before checking invalid function-call marker line
in multi-renderer-v1-workspace.e2e.ts
- Remove unused v0.9 EV charging sample constants from e2e/samples.ts
- Support custom schema titles in attachCatalogSchema per sample app
- Align Stage 6 E2E specs with shared fixtures, resetStorageOnce, and
RENDERER_URLS.angular origin, and update ng-basic-catalog bridge mocks
d074720 to
59fdac2
Compare
Start the getter search in findPropertyGetter at obj so own getters and own data properties properly resolve or shadow inherited prototype getters. Track base schema resolvers in a WeakMap to prevent wrapper stacking on repeated attachment, and gracefully tolerate frozen or non-configurable catalogs and component objects. Addresses review feedback on #324.
- Remove scripts/normalize-demo-headings.{mjs,test.mjs} and heading
normalization hooks in scripts/generate-demos.mjs and demos README
- Reset Monaco errors before checking invalid function-call marker line
in multi-renderer-v1-workspace.e2e.ts
- Remove unused v0.9 EV charging sample constants from e2e/samples.ts
- Support custom schema titles in attachCatalogSchema per sample app
- Align Stage 6 E2E specs with shared fixtures, resetStorageOnce, and
RENDERER_URLS.angular origin, and update ng-basic-catalog bridge mocks
59fdac2 to
63dc9be
Compare
3021640 to
47d9383
Compare
Start the getter search in findPropertyGetter at obj so own getters and own data properties properly resolve or shadow inherited prototype getters. Track base schema resolvers in a WeakMap to prevent wrapper stacking on repeated attachment, and gracefully tolerate frozen or non-configurable catalogs and component objects. Addresses review feedback on #324.
- Remove scripts/normalize-demo-headings.{mjs,test.mjs} and heading
normalization hooks in scripts/generate-demos.mjs and demos README
- Reset Monaco errors before checking invalid function-call marker line
in multi-renderer-v1-workspace.e2e.ts
- Remove unused v0.9 EV charging sample constants from e2e/samples.ts
- Support custom schema titles in attachCatalogSchema per sample app
- Align Stage 6 E2E specs with shared fixtures, resetStorageOnce, and
RENDERER_URLS.angular origin, and update ng-basic-catalog bridge mocks
47d9383 to
fd60ea5
Compare
Start the getter search in findPropertyGetter at obj so own getters and own data properties properly resolve or shadow inherited prototype getters. Track base schema resolvers in a WeakMap to prevent wrapper stacking on repeated attachment, and gracefully tolerate frozen or non-configurable catalogs and component objects. Addresses review feedback on #324.
- Remove scripts/normalize-demo-headings.{mjs,test.mjs} and heading
normalization hooks in scripts/generate-demos.mjs and demos README
- Reset Monaco errors before checking invalid function-call marker line
in multi-renderer-v1-workspace.e2e.ts
- Remove unused v0.9 EV charging sample constants from e2e/samples.ts
- Support custom schema titles in attachCatalogSchema per sample app
- Align Stage 6 E2E specs with shared fixtures, resetStorageOnce, and
RENDERER_URLS.angular origin, and update ng-basic-catalog bridge mocks
fd60ea5 to
3cd4f3a
Compare
Start the getter search in findPropertyGetter at obj so own getters and own data properties properly resolve or shadow inherited prototype getters. Track base schema resolvers in a WeakMap to prevent wrapper stacking on repeated attachment, and gracefully tolerate frozen or non-configurable catalogs and component objects. Addresses review feedback on #324.
- Remove scripts/normalize-demo-headings.{mjs,test.mjs} and heading
normalization hooks in scripts/generate-demos.mjs and demos README
- Reset Monaco errors before checking invalid function-call marker line
in multi-renderer-v1-workspace.e2e.ts
- Remove unused v0.9 EV charging sample constants from e2e/samples.ts
- Support custom schema titles in attachCatalogSchema per sample app
- Align Stage 6 E2E specs with shared fixtures, resetStorageOnce, and
RENDERER_URLS.angular origin, and update ng-basic-catalog bridge mocks
3cd4f3a to
716a462
Compare
- Migrate shared showcase demos (01_flight, 02_system, 03_checkout, 04_workflow) to canonical A2UI v1.0 createSurface messages with inlined components, dataModel, and v1.0 basic catalog schema. - Update scripts/generate-demos.mjs to ingest basic catalog examples from @a2ui/web_core v1_0 and validate all messages and components against A2uiMessageSchema and BASIC_COMPONENTS schemas. - Update scripts/normalize-demo-headings.mjs and tests to preserve v1.0 Markdown heading prefixes (#-######) on Text components while only stripping duplicate markers on legacy heading variants. - Regenerate samples/shared/demos/demos.json containing 46 validated A2UI v1.0 demos.
- Move usages.ts from samples/lit-basic-catalog/src/usages.ts to samples/shared/usages.ts using git mv to preserve 100% rename history (R100). - Rename basic-with-mcp.catalog.ts to sample-basic.catalog.ts in samples/ng-basic-catalog/src/app to preserve 100% rename history (R100) back to main. - Update import paths in lit and ng basic catalog entry points.
- Migrate ng-basic-catalog to A2UI v1.0 canonical APIs and adopt Constructable Stylesheets via injectBasicCatalogStyles() in main.ts. - Extract shared attachCatalogSchema helper in samples/shared with full JSDoc to encapsulate component example enrichment. - Introduce SampleBasicCatalog in sample-basic.catalog.ts. - Import COMPONENT_USAGES from samples/shared/usages.js to provide a single source of truth across all sample renderers. - Retire legacy assets/catalog.json and assets/usages.ts barrel shim. - Update test suites for v1.0 multi-catalog handshake.
- Migrate Lit and React sample renderers to A2UI v1.0 catalog protocol. - Wire multi-catalog support using basic catalog and MCP functions. - Attach component usages for Composer gallery integration. - Migrate sample usage definitions to v1.0 Markdown and binding formats. - Remove legacy public/catalog directory artifacts from both samples. - Add unit tests validating v1.0 catalog schemas, demos, and usages.
- Author multi-renderer-v1-workspace.e2e.ts asserting clean v1.0 rendering across Angular, Lit, and React live sample renderers. - Verify Monaco schema validation for v1.0 canonical calls, bindings, and cross-catalog functions, while flagging invalid properties. - Extend v09-compat-regression.e2e.ts with v1.0 <-> v0.9 live switching and PROTOCOL_VERSION_MISMATCH error handling and recovery. - Update function-rpc-journeys.e2e.ts to exercise live renderer RPC round-trips and immediate < 1s NO_AGENT_CONNECTED rejection. - Update DEMO_CARD_COUNT to 46 in demo-wall-helpers.ts and update sample-backed test fixtures and visual snapshots for A2UI v1.0.
Start the getter search in findPropertyGetter at obj so own getters and own data properties properly resolve or shadow inherited prototype getters. Track base schema resolvers in a WeakMap to prevent wrapper stacking on repeated attachment, and gracefully tolerate frozen or non-configurable catalogs and component objects. Addresses review feedback on #324.
…hemas, and e2e fixtures
- Remove scripts/normalize-demo-headings.{mjs,test.mjs} and heading
normalization hooks in scripts/generate-demos.mjs and demos README
- Reset Monaco errors before checking invalid function-call marker line
in multi-renderer-v1-workspace.e2e.ts
- Remove unused v0.9 EV charging sample constants from e2e/samples.ts
- Support custom schema titles in attachCatalogSchema per sample app
- Align Stage 6 E2E specs with shared fixtures, resetStorageOnce, and
RENDERER_URLS.angular origin, and update ng-basic-catalog bridge mocks
Extract assertValidV10Demos into samples/shared/usages-test-helper.ts and reuse it across lit-basic-catalog, ng-basic-catalog, and react-basic-catalog specs.
716a462 to
5a648a3
Compare
Capture the resolved URL and generation before awaiting checksum computation or IndexedDB operations in CatalogManagement, and abort continuations if the active renderer changes or the service destroys. Prevents a prior renderer's in-flight catalog from overwriting the next renderer's IndexedDB cache or settling its handshake state.
Description
Summary
04_workflow) to canonical A2UI v1.0
createSurfacemessages; updatescripts/generate-demos.mjsto ingest@a2ui/web_corev1_0 basic catalogexamples and validate against
A2uiMessageSchema/BASIC_COMPONENTS;regenerate
samples/shared/demos/demos.json(46 demos).usages.tstosamples/shared/usages.tsand renamebasic-with-mcp.catalog.tstosample-basic.catalog.tswithgit mvtopreserve rename history.
ng-basic-catalogto A2UI v1.0 canonical APIs withinjectBasicCatalogStyles(), add a sharedattachCatalogSchemahelper andSampleBasicCatalog, and retire the legacyassets/catalog.jsonandassets/usages.tsshim.with multi-catalog support (basic catalog + MCP functions), remove legacy
public/catalogartifacts, and add unit tests for v1.0 catalog schemas,demos, and usages.
multi-renderer-v1-workspace.e2e.ts, extendv09-compat-regression.e2e.tswith live v1.0 <-> v0.9 switching and
PROTOCOL_VERSION_MISMATCHrecovery, update
function-rpc-journeys.e2e.tsfor live renderer RPCround-trips, set
DEMO_CARD_COUNTto 46, and refresh fixtures and visualsnapshots.
feat(samples,shell): restore A2UI v0.9 alongside v1.0 #334 restores v0.9 alongside v1.0; merge it together with this PR.
CatalogManagementagainst staleA2UI_CATALOGasync continuationsafter a renderer switch (
15a2f138): captures the resolved URLs andresolution generation before checksum/IndexedDB awaits and aborts before
reading/writing IndexedDB or settling handshake signals if the active renderer
changed or the service was destroyed, preventing an outgoing renderer's
in-flight catalog from overwriting the next renderer's cache/state (which
caused
slack-assistant.e2e.tsrenderer-switch tests to need retries in CI).Commits
53 files changed, 2205 insertions(+), 4684 deletions(-)
Stack
Stacked PR 6/7 — base:
pr5-shell-v1-0-copilot-rpc-a2a→ merge in orderpr1 → pr7.
Each PR in the stack must be merged before the next one, or the next one
must be rebased onto the updated base after its predecessor merges.
Full stack (merge in this order):
pr1-e2e-stabilizationpr2-upgrade-a2ui-depspr3-bridge-v1-0pr4-shell-v1-0-corepr5-shell-v1-0-copilot-rpc-a2apr6-samples-demos-v1-0pr7-qa-cleanuppr8-restore-v0-9-renderers(feat(samples,shell): restore A2UI v0.9 alongside v1.0, stacked on fix(shell,slack): harden cross-frame validation, catalog sync, and RPC routing #325)pr9-cancel-handshake-on-unregister(fix(shell): cancel catalog handshake when its frame unregisters, stacked on feat(samples,shell): restore A2UI v0.9 alongside v1.0 #334)Verification
Run at the tip of the stack (
pr6-samples-demos-v1-0,15a2f138):corepack yarn testpasses across all workspaces (scripts: 48,a2ui-bridge: 331,lit-basic-catalog: 16,ng-basic-catalog: 22,react-basic-catalog: 17,react-slack-catalog: 196,a2ui-composer-shell: 2759)corepack yarn build,corepack yarn lint,corepack yarn tsc, andcorepack yarn prettier:checkall exit 0--workers=1 --retries=0:e2e/slack-assistant.e2e.ts --repeat-each=10passes (160/160), and the 6 core specs (e2e/function-rpc-journeys.e2e.ts,e2e/guest-frame-sends.e2e.ts,e2e/v09-compat-regression.e2e.ts,e2e/slack-renderer.e2e.ts,e2e/a2a-multi-frame-surfaces.e2e.ts,e2e/a2a-inline-surface-order.e2e.ts) pass (44/44)Pre-launch Checklist