Skip to content

test(shell): add a visual baseline for an inline surface rendered above the message text - #261

Merged
mikzat merged 7 commits into
a2ui-project:mainfrom
mikzat:test/inline-surface-order-visual
Oct 12, 2026
Merged

mikzat merged 7 commits into
a2ui-project:mainfrom
mikzat:test/inline-surface-order-visual

Conversation

@mikzat

@mikzat mikzat commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #256, which made the inline surface card follow the order the agent sent its parts. The unit specs cover the ordering, but nothing checked what the bubble actually looks like; this adds the visual test jgindin suggested there.

What it covers

The test drives the mock agent through two turns, surface-then-text and text-then-surface, with the inline frames pointed at the local Angular guest so their pixels come from this checkout. Once both guest frames have drawn, it snapshots each agent bubble on its own (the history scrolls to the newest message, so a single screenshot of the scroll container would crop the first bubble):

  • chat-message-inline-surface-first.png: surface rendered above the text
  • chat-message-inline-surface-last.png: text, then the surface below it

Baselines

Generated by the visual_baselines.yml workflow, not locally.

Two existing baselines are regenerated as well, and the specs behind them get a fix: message-inspector-drawer.png and a2a-full-chat-view.png both contain the inspector's event timestamps, so they changed on every regeneration. The validation-errors spec already pins the clock with page.clock.setFixedTime, which keeps timers and the stream running; the other two now do the same, so these baselines are stable from here on. a2a-full-chat-view.png also drops the "New Session" and share buttons from the toolbar, since #232 hides them on non-workspace routes such as /a2a and that baseline had not been regenerated since.

Baselines that came back different only by antialiasing noise (at most 0.05% of pixels, well under the 2% threshold) are left as they are on main.

@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 adds a new visual regression test to verify that inline surfaces are rendered above or below text content in the correct order as sent by the agent. Feedback was provided to use the canonical MIME type application/a2ui+json instead of the legacy application/json+a2ui in the test helper payload.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

⚡ A2UI Composer PR Preview

Your automated preview is successfully live (commit 951e284):
👉 Launch PR Preview

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

@mikzat
mikzat force-pushed the test/inline-surface-order-visual branch from caf841f to d0f792f Compare October 8, 2026 23:32
@mikzat
mikzat marked this pull request as ready for review October 9, 2026 15:20
…ve the message text

a2ui-project#256 made the inline surface card follow the order the agent sent its
parts, so a surface that arrives before the text now renders above it.
The unit specs cover the ordering, but nothing checks what the bubble
actually looks like, and jgindin flagged it as a good candidate for a
visual test.

The new test drives the mock agent through two turns, surface-then-text
and text-then-surface, waits for both guest frames to draw, and
snapshots each agent bubble on its own so the first one is not cropped
by the history's scroll-to-bottom.
Adds the two new baselines from the visual_baselines workflow run and
takes the six existing ones it regenerated along with them. Five of
those differ only in wall-clock timestamps and antialiasing (well under
the 2% threshold). a2a-full-chat-view.png also drops the New Session
and share buttons from the toolbar: a2ui-project#232 hides them on non-workspace
routes such as /a2a, and that baseline had not been regenerated since,
so this catches it up with what the shell renders today.
…mestamps

The inspector drawer baseline and the full chat view baseline both
contain the inspector's event timestamps, so they changed on every
regeneration. The validation-errors spec already pins the clock with
page.clock.setFixedTime, which keeps timers and the stream running;
do the same in the other two.
Four regenerated baselines differed from main by at most 0.05% of
pixels with nothing above the antialiasing noise floor, well under the
2% threshold, so leave them as they are on main.
Workflow output; both now show 11:24:22 AM and will stay that way.
@mikzat
mikzat force-pushed the test/inline-surface-order-visual branch from d0f792f to afd7f94 Compare October 12, 2026 20:40
… main

Only the two baselines whose specs pin the clock change; the rest came
back different by antialiasing noise alone and stay as they are on main.
@mikzat
mikzat force-pushed the test/inline-surface-order-visual branch from 3651e0e to 951e284 Compare October 12, 2026 21:05
@mikzat
mikzat merged commit 8155592 into a2ui-project:main Oct 12, 2026
13 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.

2 participants