feat: add Storybook visual snapshot auto-update workflow for new components
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- github-actions, playwright, storybook, typescript
Research direction
Start with the visual job in .github/workflows/ci.yml, then read e2e/visual-regression.spec.ts-snapshots/ and the existing pnpm test:visual command. Check how git diff --name-only origin/main...HEAD -- '*.stories.tsx' identifies changes and how actions/github-script can report them. Done means new or modified stories produce a reviewable artifact and comment while existing baseline changes still fail and unaffected PRs remain clean.
Written by the indexing model from the issue text.
Description
Description
In the last 14 days, 3 bugs were filed for "UI does not match design spec" after PRs merged (#1229, #1233, #1264). These regressions are caught post-merge by the UI Verifier automation, but the fix cycle (bug issue → fix PR → review → merge) adds latency. The existing CI visual job compares Storybook screenshots against committed baselines, but new or modified stories that lack baseline snapshots pass silently — the visual regression test only fails when an existing baseline changes, not when a new component looks wrong.
Adding a CI step that detects new/modified *.stories.tsx files in the PR diff and flags them for manual baseline review would catch these regressions pre-merge.
Acceptance Criteria
- CI
visualjob detects when a PR adds or modifies*.stories.tsxfiles - When new stories are detected, the job generates screenshots and uploads them as a PR artifact for review
- When existing story baselines change, the job fails (existing behavior preserved)
- A PR comment is posted listing new/changed stories with a link to the artifact for visual review
- No false positives on PRs that don't touch stories
-
pnpm lint && pnpm typecheck && pnpm testpass
Dependencies
None
Technical Notes
- The existing
visualjob in.github/workflows/ci.ymlbuilds Storybook and runspnpm test:visualagainst committed baselines ine2e/visual-regression.spec.ts-snapshots/. - Playwright's
--update-snapshotsflag can generate new baselines. The workflow could run this for new stories only and upload the results. - Use
git diff --name-only origin/main...HEAD -- '*.stories.tsx'to detect changed story files. - The PR comment can use
actions/github-scriptto post a summary. - This is an enhancement to the CI pipeline, not a code change — low risk of breaking existing functionality.
Approval Required
This is classified as HIGH risk because it modifies the CI pipeline behavior and could affect merge velocity if misconfigured (false positives blocking PRs). Comment "approved" to release it to the automation queue.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from gitpod-io/memo
-
enhancement needs-human priority:3
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
bug needs-human priority:1
Difficulty 1/5 Under an hour Newbie friendliness 25/100
-
enhancement needs-human priority:3
Difficulty 5/5 Over a week Newbie friendliness 42/100
-
enhancement needs-human priority:3
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
enhancement needs-human priority:3
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·