# Verification Tactics — Components and Fetched Pages
<!--
ref: @protocol/verification-tactics
tags: [verification, storybook, playwright, screenshots, webfetch, ui]
triggers: [verifying a UI component, screenshot a component, storybook iframe, does this component look right, WebFetch returned thin content, bot-stripped page, page came back as a summary, did the change actually render, no browser extension connected, the app needs auth to see the change, component has no story]
trigger_prompt: When you need to confirm a UI change actually renders, or when a fetched page comes back stripped, thin, or summarised instead of real.
category: core
complements: [@protocol/ui-verification-protocol]
audience: [agent-author, claude-code-user]
version: 5
updated_at: 2026-11-04T03:54:03.244Z
-->

Three loops that replace claiming-it-works with seeing-it-work: screenshot components before declaring them done, mount them yourself against fixtures when there is no story and no way in, and fall back to a real browser when a fetch returns junk.

## Screenshot the component before calling it done

**Write the component and its story together, then look at the rendered pixels.** "The code looks right" is not verification of a visual artifact.

The loop:

1. Write the component and its story in the same change. A component without a story has no cheap way to be viewed in isolation.
2. Start the component workbench (Storybook or equivalent).
3. Screenshot the isolated render — Storybook exposes one per story at `/iframe.html?id=<story-id>`, which avoids the surrounding UI chrome.
4. **Actually open the image.** This is the step that gets skipped, and skipping it makes the whole loop decorative.
5. Iterate on what you see, not on what you intended.

Isolation is the point: `/iframe.html` renders the component alone, so layout problems belong to the component rather than to the page around it.

## No story, no auth, no backend: mount it yourself

**The two loops above both assume a way in — a story that already exists, or a
page you can reach.** The common blocker is neither: the component has no story,
the screen sits behind a login, the backend is not running, or the browser
extension is not connected. That is the moment a change ships unverified, and
"the tests are green" fills the gap.

A green unit suite is not evidence about rendering. Tests exercise the functions
a template calls; they do not exercise the template, the framework's prop
coercion, or whether a control that rendered is a control that does anything.

**The loop.** Mount the component yourself, in a real browser, against fixtures:

1. Add a throwaway entry point in the app's own source tree, so the real
   bundler, aliases, and styles apply. A dev server that already builds the app
   will serve one extra HTML file plus one script.
2. Mount the component with hand-written fixtures covering the shapes that
   differ — the populated case, the degraded case, the empty case. Fixtures beat
   live data here: you can author the rare shape that production has three of.
3. Stub only what mounting requires — a router, whatever global a service
   singleton expects. Network calls can be left to fail; a component that
   survives a failed fetch is a thing worth knowing.
4. Drive it headlessly and **assert on the DOM, not on a screenshot**. Click the
   tabs, open the popovers, read back the text and the counts. Screenshots need
   eyes; a DOM dump is greppable, diffable, and works in a terminal.
5. Delete the entry point. It was scaffolding.

**Why the DOM and not the code.** Measured on one such pass, three defects that a
full green suite had not touched:

- A boolean prop passed as a bare attribute arrived as `''`, which is falsy.
  Every write on the affected path silently took the wrong branch, and one
  button never rendered at all. Nothing in the type system or the tests sees
  this — the framework's coercion rules are the contract, and they only run in
  a render.
- A button rendered on a host that could not service it. The tap would have
  posted an empty payload and failed silently: a dead affordance, invisible to
  anything that does not enumerate what is actually on screen.
- Two labels in one row of controls written in different vocabularies. Only
  reading them side by side surfaces it.

All three are the same class: **facts about the rendered result that no test of
the inputs can reach.** That is the class this loop exists to catch, and it is
why "I could not open a browser" is a reason to build one of these, not a reason
to ship blind.

## When a fetch returns junk, use a real browser

**A fetched page that comes back thin, stripped, or pre-summarised is not evidence about the page.** Many sites serve reduced content to non-browser clients, and some fetch tools return a model-written summary rather than the document.

Tell-tales: suspiciously short content, no markup where markup should be, prose that reads like a summary of the page instead of the page, or a bot wall.

**How to apply.** Escalate to a real browser — drive the page with a browser-automation tool and read the rendered DOM. Do not fall back to what you remember about the site; a remembered page is not an observation, and the gap between them is exactly what you were trying to check.

The same rule applies when verifying your own deployed changes: fetch-tool output is a claim, a rendered browser view is evidence.

## Every live check carries a known-good control

When you drive a deployed product to prove a fix, check a known-good address or case next to the broken one, in the same harness and in the same run. Then read the control first. **If the control fails, the harness is wrong, not the product.** Fix the harness before you believe anything it says about the bug.

Why: a verifier that models the system slightly wrong produces failures that read exactly like product defects. Three that happened in one session:

- Reusing one browser context across phases. A cached version number made every later save a version conflict, which looked like a dead keyboard shortcut. The conflict guard was doing its job.
- Diffing what was stored against the literal that was posted. The API had lifted the leading heading into the title field, so the diff showed loss where nothing was lost.
- Asserting an element taken from the bug report's symptom table. The element only exists for signed-out readers, so its absence was evidence of being signed in, not of the bug.

In each case it was the control failing that gave it away. The control is cheap: one extra address per run. Give each phase a fresh context, assert on the signal the bug is actually about, and diff against what the system stores, not what you sent.

---

*Related: `@protocol/shell-and-runtime-traps` · `@protocol/silent-signal-and-evidence-traps` · `@content/web/huggingface/2026-11-23-cua-see-self-evolving-evals` · `@content/youtube/tiago-forte/i-connected-claude-to-everything-then-i-saw-the-gap` · `@content/youtube/nate-herk/how-anthropic-engineers-actually-prompt-fable-5`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*