npx skills add ...
npx skills add microsoft/vscode --skill update-screenshots
Update the committed blocks-ci screenshot hashes after the "Screenshots & Tests" check fails, or investigate a screenshot diff reported on a PR. Use when asked to update, accept, or refresh component screenshot baselines from CI. This skill should be run as a subagent.
npx skills add microsoft/vscode --skill update-screenshots
Screenshot images are not stored in the repository — they live in an external service (hediet-screenshots.azurewebsites.net), keyed by commit SHA. But a subset of fixtures is pinned by hash in test/componentFixtures/blocks-ci-screenshots.md, and that file is committed. When those hashes change, CI fails and you must update the file.
The Screenshots & Tests job in .github/workflows/component-fixtures.yml produces two independent results:
| Result | Blocking? | Action |
|---|---|---|
| Screenshot diff report (PR comment with before/after images) | No — informational | Review the visuals. Nothing to commit. |
| blocks-ci hash mismatch | Yes — fails the check | Update blocks-ci-screenshots.md and commit. |
A fixture opts into the blocking gate with labels: { kind: 'screenshot', blocksCi: true }. Only those fixtures appear in blocks-ci-screenshots.md.
The failure looks like this:
Never regenerate the hashes locally. They are hashes of the rendered PNG bytes, produced on
ubuntu-latest. Rendering on macOS or Windows yields different bytes and therefore different hashes, so locally generated values will fail CI. Always copy the values from the CI job.
Three surfaces carry the same content — use whichever is handy:
Find the failed job id with:
This gate exists to catch unintended layout regressions, so accepting new hashes without looking at the images defeats its purpose. The images are publicly fetchable by hash, so pull both the old (committed) and new (from CI) versions and compare:
Then view them, and localize the change rather than eyeballing full screenshots — the delta is often only a pixel or two:
Confirm the delta matches what the PR intends. If the fixture is unrelated to the change, or the shift is larger than expected, treat it as a regression and fix the code instead of the hashes.
Edit only the changed lines in test/componentFixtures/blocks-ci-screenshots.md, replacing the old hash in the image URL with the new one:
The file is generated by build/lib/screenshotBlocksCi.ts and compared byte-for-byte, so keep the <!-- auto-generated by CI — do not edit manually --> header, the #### <fixtureId> / image-link pairing, the blank line between entries, and the fixtureId sort order intact. Verify your edit is the exact inverse of the diff CI reported:
Then commit and push. The check re-runs and should pass; hashes on main become the new baseline after merge.
Raw captured images and the manifest for a run are uploaded as an artifact:
manifest.json maps each fixtureId to its imageHash and any render errors.
The check also fails if a fixture failed to render (Fail if fixtures had errors) or if the Playwright fixture tests failed. Those are genuine bugs — updating hashes will not help. Look for ::error::<fixtureId>: in the log, and download the playwright-test-results artifact for test failures.