Topic 4 of 4 · 4 min read
Verifying an agent's claim that the UI is done
Goal: Check an agent's 'done, matches the design' report against screenshots and a manual run, and name the evidence still missing.
Treat "done, matches the design, fully responsive" as a claim, and accept it only when screenshots and a manual run show the evidence. An agent reports what it believes, not what it has checked.
Check yourself · 1 of 3
An agent reports: "UI complete, fully responsive." It attaches one desktop screenshot. What is missing?
Why it matters
Coding agents such as Claude Code, Codex and Cursor often cannot see the screen. They read code, run tests and write a confident summary. A report like "implemented the settings page to match the design, responsive on all breakpoints" may mean they added one media query and never rendered the page. Unit tests passing says nothing about how it looks. And a fluent summary reads like proof.
How to do it
- Split the report into claims. "Matches the design", "responsive", "handles errors", "accessible" are four separate claims.
- Ask what evidence each claim needs. Matches the design needs side-by-side screenshots at the design width. Responsive needs screenshots at phone, tablet and desktop. Handles errors needs the error state shown. Accessible needs a keyboard pass and an automated scan.
- Ask the agent to produce it. Give it a way to run the page, take screenshots (for example with Playwright) and attach them. Then look at them yourself.
- Do a manual run. Open the real page, click the main path, break it on purpose, resize it.
- Write down what is still missing. "Evidence for dark mode: none. Evidence for the long-name state: none."
- Accept in parts. Mark each claim proven, disproven or unproven.
Before and after
Weak review: "Agent says it matches the design. Merged."
Fixed review: "Claim: matches design. Screenshot at 1440 attached, header and cards match; footer not shown. Claim: responsive. Only 1440 screenshot given; I ran 375 and the table overflows. Claim: tests pass. Yes, but none of them render the page. Missing: error state, dark mode, keyboard pass."
For engineers, the evidence should be a command anyone can rerun:
npx playwright test settings.spec.ts --update-snapshots=none
What goes wrong
- Accepting screenshots of one state as proof of all states.
- Screenshots from the wrong build, such as a stale dev server.
- Reading "tests pass" as a visual claim.
- Asking "are you sure?" The agent will say yes again. Ask for evidence, not confidence.
Examples
One claim, three outcomes
Agent report: "Invoice page matches the design and works on mobile." Review: matches the design at 1440, proven by a screenshot. Works on mobile, disproven; at 375 the totals table scrolls sideways. Dark mode, never mentioned and unproven.
Screenshot of the wrong thing
The agent attaches a screenshot of the new page. The URL bar shows a staging branch from last week and the old heading is visible. The evidence exists but describes a different build. Ask for a fresh capture from the build under review.
Key points
- Split a done report into separate claims: design match, responsiveness, error handling and accessibility.
- Each claim needs its own evidence, such as screenshots at several widths, an error-state capture or a keyboard pass.
- Passing unit tests say nothing about how the screen looks unless a test renders and compares it.
- Asking an agent if it is sure produces more confidence, not evidence; ask for screenshots or a command to rerun.
- End the review by naming what is proven, disproven and still unproven.
Common mistakes
- Merging on the agent's summary without opening the page.
- Accepting a single screenshot as proof of every state and width.
- Treating a green test run as proof of visual fidelity.
- Asking the agent to confirm its own work instead of producing evidence.
Check yourself · 2 of 3
An agent says all tests pass for a new screen. Which conclusion is justified?
Check yourself · 3 of 3
What is the strongest way to challenge a done report from an agent?
Practice items, not counted towards your mastery.
Start here
- Visual comparisons (Playwright docs) (opens in a new tab)DocsFree
How screenshot assertions create baselines, set thresholds and mask unstable areas.
- Visual tests (Storybook docs) (opens in a new tab)DocsFree
Catching visual changes per component and state, and reviewing them before they merge.
- axe-core (Deque) (opens in a new tab)ToolFree
The open-source rules engine that checks rendered pages for contrast, labels and other accessibility faults.