Skip to content

test(examples-chat): A2UI single-bubble invariant — Phase 2c#322

Merged
blove merged 4 commits into
mainfrom
claude/aimock-a2ui-single-bubble
May 15, 2026
Merged

test(examples-chat): A2UI single-bubble invariant — Phase 2c#322
blove merged 4 commits into
mainfrom
claude/aimock-a2ui-single-bubble

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 15, 2026

Summary

Adds an end-to-end Playwright scenario that drives an A2UI v1 GenUI prompt through the harness and asserts the single-bubble invariant from #297 — exactly one assistant <chat-message> per GenUI turn, with <a2ui-surface> rendered inside it. No standalone <chat-genui-skeleton> residue.

The fixture is a real captured tool-call response from gpt-4o-mini for the "Demo: render a feedback form" prompt (Column + 5 form components). Mid-implementation the handwritten fixture failed because envelope schemas didn't validate against the python graph's strict pydantic types; switching to a real captured response sidestepped the guessing.

Sits on Phase 2b (#314).

Test plan

  • New spec passes solo locally: 1/1 in ~2.5s after harness warm-up
  • Full suite passes: 4/4 (smoke + 3 markdown + 1 single-bubble) with retry on the bullet-list flake noted in test(examples-chat): aimock structured-markdown scenarios — Phase 2b #314
  • Mock fixture validated against the real python graph's strict envelope pydantic schema (captured from real LLM, not handwritten)
  • No production code touched
  • CI green on this PR (retries on by default in CI per playwright.config.ts)

Notes for reviewers

  • toBeAttached is used in place of toBeVisible on the <a2ui-surface> locator — the bubble container has zero computed size during progressive mount and Playwright's strict visibility check flags that even when the surface is rendering correctly. The follow-up expect.poll(...).toBeGreaterThan(0) over a2ui-column count is the actual "rendered" check.
  • Plan commit (ab3c41eb) and the original handwritten fixture commit (5a0ad825) are kept in history rather than squashed — the second fixture commit (61b2692b) replaces the content with the real capture and tells the story.

blove added 4 commits May 15, 2026 09:22
Drives an A2UI v1 GenUI prompt through the harness via a mock tool-call
response carrying envelopes as args. Asserts exactly one assistant
bubble per turn (PR #297 single-bubble invariant) and the absence of
standalone skeleton bubbles. Progressive mount (chunked tool-call args)
deferred to Phase 2d.

Task 0 de-risks the mock + langgraph tool-call handoff before any
committed code lands.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

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

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment May 15, 2026 5:38pm

Request Review

@blove blove merged commit 5c024e4 into main May 15, 2026
16 checks passed
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