visual-regression
Skill22 starsChanged 43 days agoMITView on GitHub
Work with the Ladle visual-regression check — read a failing `visual` CI run, decide whether a pixel diff is a regression or an intended redesign, and adopt CI-produced baselines into the PR. Use when the `visual` workflow fails, when a PR needs updated component snapshots, when adding or changing a `*.stories.tsx` file, or when someone asks to update/refresh/accept UI snapshots.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- DnsQueen/orcinus-skillstheir own version, first seen Nov 8, 2026
- HsuanYuLee/polaristheir own version, first seen Nov 5, 2026
- ravidsrk/agent-skillstheir own version, first seen Nov 1, 2026
- CaduS0uza/qa-supremetheir own version, first seen Sep 10, 2026
- mlopscommunity/Coding-Agents-Conference-skillstheir own version, first seen Mar 4, 2026
- alekspetrov/navigatortheir own version, first seen Oct 31, 2025
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- alekspetrov/navigator★ 355same name
- qf-studio/navigator★ 355same name
- mlopscommunity/Coding-Agents-Conference-skills★ 38same name
- HsuanYuLee/polaris★ 5same name
- CaduS0uza/qa-supreme★ 1same name
- DnsQueen/orcinus-skills★ 1same name
- ravidsrk/agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- bus-live-testSkill
- marketing-screenshotSkill
- releaseSkill
- terminal-perf-testSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Before adopting, verify the repository, branch and exact run commit.
- Very specific: line 32
When visual fails, the job regenerates the complete baseline set inside the container and uploads it as the visual-snapshots artifact.
- Very specific: line 85
Use the fixed fixtures in src/test/fixtures.ts.
- Very specific: line 89
No randomness, no network, no setTimeout-driven reveal.
- Distinctive: line 90
Keep the rendered component inside the viewport.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Visual regression for Ladle stories
The visual workflow screenshots every Ladle story and compares it byte for
byte against a committed baseline in
apps/desktop/tests/visual/__screenshots__/. One PNG per story id.
The rule that governs everything here
Adopt baselines from the pinned CI environment. They are only reproducible inside the
pinned Playwright container that CI uses (mcr.microsoft.com/playwright — the
tag lives in scripts/vr-ci.sh). A macOS or bare-Linux checkout renders
different glyphs and antialiasing, so a locally produced PNG is guaranteed to
fail on the next push while looking correct in the diff.
playwright.config.ts enforces this: --update-snapshots throws unless
CI=true, and updateSnapshots: "none" makes a missing baseline a hard
failure rather than a silent write. Do not work around either guard.
Adopting new baselines
Before adopting, verify the repository, branch and exact run commit. Inspect
git status --short -- apps/desktop/tests/visual/__screenshots__ for existing
edits and untracked files. Do not overwrite them. The acceptance script
replaces the entire directory: identify that target, preserve local work, and
obtain approval for replacement if it is not already authorized.
When visual fails, the job regenerates the complete baseline set inside the
container and uploads it as the visual-snapshots artifact. Adopt it with:
scripts/vr-accept.sh # newest `visual` run for the current branch
scripts/vr-accept.sh 1234567890 # or a specific run idIt downloads the artifact, replaces __screenshots__ wholesale (so baselines
for deleted stories disappear too), and stages the result. Then commit:
test(desktop): update story baselines for <what changed>The script warns when the run's headSha differs from local HEAD. If it
does, push first and re-run — otherwise you commit baselines describing a
different tree.
Deciding first, adopting second
vr-accept.sh is mechanical; the judgement is yours. Before running it, look
at what actually changed:
VR_REPORT_DIR=$(mktemp -d "${TMPDIR:-/tmp}/gravity-visual.XXXXXX")
gh run download <run-id> --name visual-report --dir "$VR_REPORT_DIR"The Playwright HTML report has expected/actual/diff for every failure. Read the diffs and classify:
- Intended — the PR changes that component, spacing, or token. Adopt.
- Unintended blast radius — a shared token or a rule in
src/styles/moved something the PR never meant to touch. Fix the CSS, don't adopt. - Non-determinism — the same story flips between runs. Adopting hides it.
Find the source (a live
Date, an unpinned locale, a loading font, an animation) and make the story deterministic instead.
Say which category each diff falls into when you report back. "Snapshots updated" without that judgement is not a review.
Adding a story
New stories have no baseline, so the first CI run after adding one fails with
snapshot doesn't exist. That is the expected bootstrap: push, let it fail,
run scripts/vr-accept.sh, commit the new PNGs.
Determinism requirements for stories
The suite pins timezoneId: "UTC", locale: "en-US", a 1024x720 viewport and
deviceScaleFactor: 1. Stories must supply the rest:
- Use the fixed fixtures in
src/test/fixtures.ts. Their timestamps are frozen at 2024-05-01, which keepsfmtTimestamp/fmtShortTimeoff theirisToday()branch. A story that builds a date fromnew Date()will pass once and fail forever after. - No randomness, no network, no
setTimeout-driven reveal. - Keep the rendered component inside the viewport; content below the fold is not captured.
Running the comparison yourself
You can run the real check locally if Docker is available — this uses the same container as CI, so it is safe:
scripts/vr-ci.shWhat you must not do is pnpm vr:update on your machine. pnpm vr alone
(outside the container) will also report false diffs; it exists for the
container to call.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

