GuidesUpdated

How do I test an AI-built UI before merging it?

Check the running page across viewports, interaction states, console and network errors, keyboard use and the latest PR diff before merge.

On this page

A passing build means the code compiled. A UI acceptance check asks whether a person can use the feature in the states that matter. This checklist is small enough to run on every real PR.

Canopy review workspace with agent findings and a code diff
Canopy review workspace with agent findings and a code diff

Choose the states before opening Preview

From the original request, list one normal path, one failure or empty path, and any permission or loading state. Use realistic text and data.

For a settings form: save a valid name and refresh, submit an empty name, and make the API fail on save. Use a test account and disposable values so the check is repeatable.

Example acceptance matrix for one small agent-built feature.
StateActionEvidence to keep
Valid saveEnter a new name, save, then refreshConfirmation, persisted value, successful request
Invalid inputSubmit an empty nameText error by the field and no unintended save
API failureMake the save request fail in a test setupError state, editable form, failed request and response status

Check more than one viewport

Open the service in Canopy Preview at desktop and narrow mobile widths. Check wrapping, clipping, tap targets, forms, sticky controls and scrolling. Record the width and state for each finding.

Exercise every interaction that matters

Activate the primary action by click and keyboard. Try invalid and valid input, and refresh when persistence matters. Tab through the form and confirm focus stays visible, per W3C's focus guidance. A validation error should name the field and explain the problem in text, as W3C's error-identification guidance requires. After a failed save, check where focus goes and that you can retry without losing input.

Look for runtime errors

Check the console and network activity, both shown in Canopy Preview, for failed requests or odd statuses. A spinner can hide a failed API call; record the request and status before asking for CSS changes.

Tie the result back to the PR

Read the latest diff and checks after the visual pass, and repeat any fixed reproduction on the newest commit. Screenshot comparisons help with stable states, but rendering varies by environment and they don't replace interaction testing. Your merge note should say what was verified and what wasn't.

Copyable resources

Copyable UI acceptance checklist

Use on the latest PR commit; note any check that doesn't apply.

[ ] The normal path matches the request.
[ ] One failure or empty state is understandable.
[ ] Desktop and a narrow viewport checked at recorded widths.
[ ] Long text and realistic data don't clip or overlap.
[ ] Primary action works by pointer and keyboard; focus stays visible.
[ ] Loading, success and error states exercised where relevant.
[ ] Console and network failures investigated.
[ ] Final PR diff and checks match the running result.
[ ] Remaining risks and untested states written down.

Frequently asked questions

Does a screenshot test prove the UI works?

No. It compares rendered output for selected states. Interactions, network behavior, accessibility and untested states still need checks.

What if the build passes but Preview is broken?

That's a failed acceptance check. Inspect services, console, network and the latest diff before asking for a focused fix.

More questions and answers →

Sources and further reading