ci: ship the built themes to the PR visual gate - #5477
Merged
Conversation
The gate reads each theme's dist/source.mjs — a theme's component map is what defineTheme returns, not a literal in its source — and pr-visual only downloaded the Storybook artifact, so every run since #5396 died on 'Theme butter is not built'. build-storybook already builds them, so it uploads them rather than pr-visual paying for a second full build.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cixzhang
enabled auto-merge (squash)
August 25, 2026 03:44
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pr-visualhas failed on every PR since it landed in #5396 — #5468 and #5466 both fail at the identical step with:loadThemeOverridesreads each theme's builtdist/source.mjs, because a theme's component map is the product ofdefineThemerather than a literal in its source. The job downloads the Storybook artifact, which does not carry it, and never builds anything.The job is
continue-on-error, so nothing was blocked — the signal was just dead.Why not
pnpm buildin the jobThat is what
release-gate.ymldoes, and it works, but it costs a full build (~1 min locally, longer on a 2-core runner) on every component PR — which destroys the thing that makes a per-PR gate defensible: a median PR is ~16 shots, about 10 seconds.build-storybookalready runspnpm build, so the artifact is free. Filtering (pnpm -F "@astryxdesign/theme-*..." build) does not work: themes take@astryxdesign/coreas a peer dependency, so the filter cannot reach it and the build fails on a missingcore/dist/theme/index.js.Verified
The upload glob's common ancestor is
packages/themes, so entries are<theme>/dist/…and the download restores them in place. Simulated the round trip locally: with the dists removedloadThemeOverridesthrows exactly the CI error, and after restoring the artifact it returns all seven themes.Suggested by the session that owns
.github/scripts/visual-gate/**.