Repository navigation
test(shell): add a visual baseline for an inline surface rendered above the message text - #261
Merged
mikzat merged 7 commits intoOct 12, 2026
Conversation
Contributor
There was a problem hiding this comment.
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.
Contributor
⚡ A2UI Composer PR PreviewYour automated preview is successfully live (commit
|
mikzat
force-pushed
the
test/inline-surface-order-visual
branch
from
October 8, 2026 23:32
caf841f to
d0f792f
Compare
mikzat
marked this pull request as ready for review
October 9, 2026 15:20
jgindin
approved these changes
Oct 12, 2026
…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
force-pushed
the
test/inline-surface-order-visual
branch
from
October 12, 2026 20:40
d0f792f to
afd7f94
Compare
… 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
force-pushed
the
test/inline-surface-order-visual
branch
from
October 12, 2026 21:05
3651e0e to
951e284
Compare
This was referenced Oct 15, 2026
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.
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 textchat-message-inline-surface-last.png: text, then the surface below itBaselines
Generated by the
visual_baselines.ymlworkflow, not locally.Two existing baselines are regenerated as well, and the specs behind them get a fix:
message-inspector-drawer.pnganda2a-full-chat-view.pngboth contain the inspector's event timestamps, so they changed on every regeneration. The validation-errors spec already pins the clock withpage.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.pngalso drops the "New Session" and share buttons from the toolbar, since #232 hides them on non-workspace routes such as/a2aand 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.