Skip to content

ci(visual): add a manual workflow to refresh snapshot baselines - #234

Closed
AustinAbbott wants to merge 1 commit into
masterfrom
claude/project-thread-vgrd8j
Closed

AustinAbbott wants to merge 1 commit into
masterfrom
claude/project-thread-vgrd8j

Conversation

@AustinAbbott

Copy link
Copy Markdown
Owner

Requested by Austin · project thread

Why

#222 (lock file maintenance) fails 2 of 8 screenshots: the blog-post page is 6px taller on desktop and mobile. I built master and that branch locally, and the generated HTML and CSS for /blog/react-key/ are identical. The difference comes from the newer Chromium in Playwright 1.63 → 1.65.1, not from the site. The baselines need regenerating, and they must come from the CI runner image to match.

What changes

  • New .github/workflows/update-snapshots.yml (manual workflow_dispatch, input: branch):
    1. Refuses to run against master.
    2. Checks out the branch on ubuntu-24.04, then installs, builds and runs npm run test:visual:update.
    3. Commits any changed PNGs under tests/ to that branch.
    4. Starts visual.yml on the branch. Pushes made with GITHUB_TOKEN don't trigger workflows, so without this the required Visual snapshot tests check would never report on the new commit.
  • visual.yml gains a workflow_dispatch trigger so step 4 can start it. Its push and PR triggers are unchanged.
  • The README's "Update snapshots" section documents the workflow.

The branch name passes through env, not inline ${{ }} in shell, so it can't inject commands. Only users with write access can run workflow_dispatch.

After merge

Run Actions → Update visual snapshots with renovate/lock-file-maintenance, then review the 2 updated PNGs in #222 before you merge it. Note: once a non-Renovate commit is on that branch, Renovate stops rebasing it.

Testing

  • Both workflow files parse as YAML.
  • The new workflow can't run until this PR is merged, because workflow_dispatch only lists workflows on the default branch. Its first real run will be on chore(deps): lock file maintenance #222.

Generated by Claude Code

Dependency bumps such as a newer Playwright/Chromium can shift rendering
by a few pixels with no site change. Baselines must come from the CI
runner image, so add a workflow_dispatch job that regenerates them on
ubuntu-24.04, commits them to the chosen branch, and re-runs Visual so
the required check reports on the new commit. Visual gains a
workflow_dispatch trigger for that re-run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DryVDkBwDf6F74RBXDMsk4
@AustinAbbott AustinAbbott self-assigned this Nov 22, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying dev-blog with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1b2ed80
Status: ✅  Deploy successful!
Preview URL: https://555c02e6.dev-blog-10f.pages.dev
Branch Preview URL: https://claude-project-thread-vgrd8j.dev-blog-10f.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants