Skip to content

feat(samples): migrate samples, demos, and E2E suites to A2UI v1.0 - #324

Open
jgindin wants to merge 10 commits into
pr5-shell-v1-0-copilot-rpc-a2afrom
pr6-samples-demos-v1-0
Open

jgindin wants to merge 10 commits into
pr5-shell-v1-0-copilot-rpc-a2afrom
pr6-samples-demos-v1-0

Conversation

@jgindin

@jgindin jgindin commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

Summary

  • Migrate the shared showcase demos (01_flight, 02_system, 03_checkout,
    04_workflow) to canonical A2UI v1.0 createSurface messages; update
    scripts/generate-demos.mjs to ingest @a2ui/web_core v1_0 basic catalog
    examples and validate against A2uiMessageSchema / BASIC_COMPONENTS;
    regenerate samples/shared/demos/demos.json (46 demos).
  • Move usages.ts to samples/shared/usages.ts and rename
    basic-with-mcp.catalog.ts to sample-basic.catalog.ts with git mv to
    preserve rename history.
  • Migrate ng-basic-catalog to A2UI v1.0 canonical APIs with
    injectBasicCatalogStyles(), add a shared attachCatalogSchema helper and
    SampleBasicCatalog, and retire the legacy assets/catalog.json and
    assets/usages.ts shim.
  • Migrate the Lit and React sample renderers to the v1.0 catalog protocol
    with multi-catalog support (basic catalog + MCP functions), remove legacy
    public/catalog artifacts, and add unit tests for v1.0 catalog schemas,
    demos, and usages.
  • Migrate sample-backed E2E and visual suites to v1.0: add
    multi-renderer-v1-workspace.e2e.ts, extend v09-compat-regression.e2e.ts
    with live v1.0 <-> v0.9 switching and PROTOCOL_VERSION_MISMATCH
    recovery, update function-rpc-journeys.e2e.ts for live renderer RPC
    round-trips, set DEMO_CARD_COUNT to 46, and refresh fixtures and visual
    snapshots.
    feat(samples,shell): restore A2UI v0.9 alongside v1.0 #334 restores v0.9 alongside v1.0; merge it together with this PR.
  • Guard CatalogManagement against stale A2UI_CATALOG async continuations
    after a renderer switch (15a2f138): captures the resolved URLs and
    resolution 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.ts renderer-switch tests to need retries in CI).

Commits

eaa3d34b feat(samples): migrate shared showcase demos and scripts to A2UI v1.0
1d23fa98 refactor(samples): move usages and rename sample catalog
366f2730 feat(samples): upgrade basic sample catalogs to A2UI v1.0
7222c5c5 feat(samples): migrate Lit and React sample renderers to A2UI v1.0
7b0f53a0 test(e2e): migrate sample-backed E2E and visual suites to A2UI v1.0
47bc4f7c fix(samples): resolve catalogSchema getter from instance
e9ff9ec4 fix(samples,shell): address review comments on v1.0 demos, catalog schemas, and e2e fixtures
37aa44b5 fix(samples,e2e): address PR #324 review feedback
5a648a35 test(samples): share v1.0 demo assertions across catalog specs
15a2f138 fix(shell): drop stale A2UI_CATALOG async continuations

53 files changed, 2205 insertions(+), 4684 deletions(-)

Stack

Stacked PR 6/7 — base: pr5-shell-v1-0-copilot-rpc-a2a → merge in order
pr1 → 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):

Verification

Run at the tip of the stack (pr6-samples-demos-v1-0, 15a2f138):

  • corepack yarn test passes 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, and corepack yarn prettier:check all exit 0
  • Headless Playwright E2E specs with --workers=1 --retries=0: e2e/slack-assistant.e2e.ts --repeat-each=10 passes (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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread samples/shared/attach-catalog-schema.ts Resolved
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

⚡ A2UI Composer PR Preview

Your automated preview is successfully live (commit 15a2f13):
👉 Launch PR Preview

Note: This environment will be wiped automatically when the PR is merged or closed.

jgindin added a commit that referenced this pull request Nov 10, 2026
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.
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from f388a8c to af82fb6 Compare November 10, 2026 20:40

@wrenj wrenj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread scripts/generate-demos.mjs Resolved
{
id: 'root',
component: {
Canvas: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+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.

@jgindin jgindin Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread shell/e2e/v09-compat-regression.e2e.ts Resolved

@mikzat mikzat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]), so PreviewBridge.resolveCatalog never fetches <renderer>/catalog, and public/catalog was deleted. To keep exercising the "typed input survives the first catalog resolution" race, delay the GET_CATALOG/A2UI_CATALOG postMessage 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 deleted basic-with-mcp.catalog.ts and describe the showcases as v0.9 / 'v0.9'; worth updating to the v1.0 setup.

Comment thread samples/shared/attach-catalog-schema.ts Resolved
Comment thread shell/e2e/function-rpc-journeys.e2e.ts Resolved
Comment thread shell/e2e/v09-compat-regression.e2e.ts Resolved
Comment thread samples/ng-basic-catalog/angular.json Resolved
Comment thread samples/ng-basic-catalog/src/main.ts Resolved
Comment thread samples/shared/demos/01_flight.json Resolved
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from af82fb6 to 5e93f98 Compare November 13, 2026 17:53
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from 5e93f98 to 902451c Compare November 13, 2026 18:01
jgindin added a commit that referenced this pull request Nov 13, 2026
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.
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from 902451c to d074720 Compare November 13, 2026 19:22
Comment thread scripts/generate-demos.mjs Resolved
Comment thread shell/e2e/samples.ts Resolved
Comment thread shell/e2e/copilot-assistant.e2e.ts Resolved
Comment thread shell/e2e/function-rpc-journeys.e2e.ts Resolved
@mikzat mikzat mentioned this pull request Nov 15, 2026
6 of 7 tasks
@jgindin
jgindin added this pull request to stack #332 November 16, 2026 13:16
jgindin added a commit that referenced this pull request Nov 16, 2026
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.
jgindin added a commit that referenced this pull request Nov 16, 2026
- 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
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from d074720 to 59fdac2 Compare November 16, 2026 21:21
jgindin added a commit that referenced this pull request Nov 16, 2026
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.
jgindin added a commit that referenced this pull request Nov 16, 2026
- 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
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from 59fdac2 to 63dc9be Compare November 16, 2026 21:43
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch 4 times, most recently from 3021640 to 47d9383 Compare November 17, 2026 02:20
jgindin added a commit that referenced this pull request Nov 17, 2026
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.
jgindin added a commit that referenced this pull request Nov 17, 2026
- 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
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from 47d9383 to fd60ea5 Compare November 17, 2026 17:09
jgindin added a commit that referenced this pull request Nov 17, 2026
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.
jgindin added a commit that referenced this pull request Nov 17, 2026
- 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
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from fd60ea5 to 3cd4f3a Compare November 17, 2026 17:23
jgindin added a commit that referenced this pull request Nov 19, 2026
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.
jgindin added a commit that referenced this pull request Nov 19, 2026
- 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
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from 3cd4f3a to 716a462 Compare November 19, 2026 18:07
- 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.
- 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.
@jgindin
jgindin force-pushed the pr6-samples-demos-v1-0 branch from 716a462 to 5a648a3 Compare November 20, 2026 14:56
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.
jgindin added a commit that referenced this pull request Nov 24, 2026
Restore basic-with-mcp.catalog.ts verbatim from 231273e and add
companion v0.9 spec files (temporarily skipped) from 231273e.

This branch has not been deployed

No deployments
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.

3 participants