Prompt
I'm building a component library and need a fast way to approve screenshot changes
Latest observation
Oct 27, 2026
OpenAI APIWeb search: off
A good fast path is to make screenshot diffs easy to review, hard to miss, and quick to approve. For a component library, I’d recommend this workflow:
Recommended setup
Use a visual regression tool that supports:
- baseline screenshots
- diff images
- interactive approval
- CI gating
Common choices:
- Chromatic if you use Storybook
- Playwright for custom screenshot tests
- Percy for hosted visual reviews
- Loki if you want a lighter-weight OSS option
Fast approval workflow
- Run screenshot tests in CI
- PR triggers screenshot generation.
- Compare against stored baselines.
- Post diffs directly in PR
- Show before/after images inline.
- Group changes by component/story.
- Use a simple approval command
- Example: comment like
/approve-screenshots - Or a merge button in the visual testing UI.
- Example: comment like
- Allow targeted approvals
- Approve only specific changed components.
- Avoid forcing full-suite re-approval when one token changed.
- Make diffs deterministic
- Freeze animations
- Mock dates/timezones
- Use fixed fonts and viewport sizes
- Disable network variability
Practical best practices for component libraries
- Test stories in multiple states: default, hover, disabled, error, loading.
- Keep screenshot sizes and breakpoints standardized.
- Use a small set of canonical themes to avoid noisy diffs.
- Prefer per-component baselines over one huge screenshot per page.
- Add a review rule for intentional design changes:
- include screenshot updates in the same PR
- require a short note in the PR description
If you want the quickest approval loop
The fastest low-friction setup is usually:
Storybook + Chromatic + GitHub PR checks
Why:
- review happens in the browser
- diffs are visually clear
- approval is very quick
- it fits component-library workflows well
If you want to automate approvals more
You can add:
- label-based approvals like
visual-ok - a script that updates baselines only when a maintainer approves
- branch protection rules requiring one visual reviewer
If you want, I can suggest a concrete setup for your stack, like:
- Storybook + Chromatic
- Playwright + GitHub Actions
- next.js component library
- monorepo setup