Visual baseline: save or diff
compare_to_baselineCompare a web page's current render against a saved visual baseline to detect pixel drift and layout changes. Returns a variance score, dimension drift, and a delta overlay for regression checking.
Instructions
Visual regression checkpointing. set_baseline renders the URL at the given breakpoint and saves a lossless PNG baseline; diff_against_baseline re-renders and pixel-diffs against it, returning a variance score, dimension drift, and a red-on-grayscale delta overlay that is also saved to disk. fullPage covers the whole scroll height as a separate baseline. Scroll is reset to the top first, so earlier interactions cannot misalign the comparison.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL to open, e.g. http://localhost:5173. | |
| action | Yes | set_baseline saves the current render under the name; diff_against_baseline compares against it and returns drift metrics plus a delta overlay. | |
| reload | No | Reload even if the URL is already open (default reuses it, so it can be stale after an edit). | |
| fullPage | No | Capture the whole scrollable page instead of the visible fold. Clipped at 7900px, and the truncation is reported. | |
| viewport | Yes | Breakpoint: mobile 393x852, tablet 768x1024, desktop 1440x900, ultrawide 1920x1080. | |
| baselineName | Yes | Baseline name, e.g. 'homepage'. Stored per-viewport under .agent-eyes/baselines/. | |
| maxVariancePct | No | CI gate for diff_against_baseline: FAIL when variance exceeds this percentage (0.5 = 0.5% pixel drift). Omit to report without a verdict. |