Repository navigation
fix(app): bump vite to 8.3.5 to fix blank site (runtime chunk cycle) - #12235
Merged
Merged
Conversation
Vite 8.1.6 (Rolldown 1.1.5) placed Rolldown's CJS-interop runtime in the app's theme chunk, which imports mui while mui imports the runtime back. The cycle left the helper uninitialized and every page crashed with "t is not a function". Vite 8.3.5 (Rolldown 1.2.15) emits the runtime as its own chunk. The lockfile is deduplicated so vitest shares it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013gWuDKsb8J8uqXsHdmhHqs
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The dependency changes are internally consistent, the reported build and browser checks support the fix, and no blocking issues were identified.
No open issues 🎉
What changed in this PR
Updates the frontend build dependencies to fix the blank-page regression introduced by #12225, without changing application code or chunk configuration.
Changes:
- Bumps Vite from 8.1.6 to 8.3.5, bringing in Rolldown 1.2.15 to eliminate the runtime-helper chunk cycle.
- Keeps the app and Vitest on the same locked Vite version and updates related dependencies.
- Adds a changelog entry explaining the outage and fix.
| File | Description |
|---|---|
changelog.d/vite-runtime-chunk-cycle.md |
Documents the blank-page regression and its resolution. |
app/yarn.lock |
Locks the updated Vite, Rolldown, and related dependencies. |
app/package.json |
Pins Vite to 8.3.5. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 of 5 tasks
MarkusNeusinger
added a commit
that referenced
this pull request
Oct 22, 2026
…merges (#12236) ## Summary - On 2026-10-22 vite 8.1.6 (#12225) passed every PR check and its deploy, and left every page on anyplot.ai blank for about 45 minutes (Rolldown chunk cycle, `TypeError: t is not a function` at module load; fixed by #12235). Nothing in CI or the post-merge routine ran the bundle. - New `scripts/site-smoke.mjs`: loads `/`, `/plots` and `/scatter-basic` in headless Chromium and fails on a status other than 200, an uncaught page error, or an empty `#root`; checks `api.anyplot.ai/health`. It never downloads a browser (CHROME_PATH, the cloud container's Chromium, or the Playwright MCP's). - **Before the merge:** the `app-image` job of `ci-image.yml` runs it against the built gate-off container with the runner's Google Chrome, whenever the container's inputs change (`package.json`, `yarn.lock`, `vite.config.ts`, ...), which is every frontend dependency bump. - **After the merge:** a new `CLAUDE.md` rule (owner request, 2026-10-22) with the recipe in `/open-pr` §4 and the Dependabot batch command: after every merge, once its deploys finish, run the smoke against production; a FAIL is an incident and stops further merges. The Dependabot command also merges lock-file PRs one at a time and smokes after each `app/` bump. The incident narrative is in `.claude/guardrails.md`. ## Plan N/A. The owner asked on 2026-10-22, after the outage, for a rule or skill so a blank site never goes unnoticed again. ## Test plan - [x] Local app image built like CI (`VITE_API_URL=https://api.anyplot.ai`), gate-off container on :8081, `SITE=http://localhost:8081 API=none MIN_TEXT=50 node scripts/site-smoke.mjs /`: OK (`text=2736`, one CORS console error reported as a warning) - [x] Same against an image built from 20c1457 (vite 8.1.6, the broken state): `FAIL ... text=0 ... pageerror: t is not a function`, exit 1 - [x] Against production: all four checks OK - [x] `uv run pytest tests/unit/workflows` (766 passed), `uv run ruff check .`, changelog check - [ ] This PR's own `Build app image and smoke the origin gate` run exercises the new step on the runner (ci-image.yml changes trigger the job) - No live verification loop exists for `.github/workflows/` beyond this PR's own run; the CLAUDE.md rule has no twin in `.github/copilot-instructions.md`, which does not carry the merge routine. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
themechunk, which importsmui, whilemuiimports the helper back. The chunk cycle leaves the helper uninitialized:TypeError: t is not a functionatassets/mui-*.js:1.viteto 8.3.5 (Rolldown 1.2.15), which emits the helper as a separaterolldown-runtimechunk with no imports, so the cycle is gone.manualChunksand nativecodeSplitting.groupscannot steer the runtime module (it is never offered to group matchers), so a config-only fix wasn't possible on 8.1.6.yarn.lockso vitest'svite@^6 || ^7 || ^8range resolves to the same 8.3.5 instead of keeping 8.1.6.Test plan
/,/scatter-basic,/gain-curveall blank with the page error above).vite buildon 8.1.6:mui→theme→muiimport cycle indist/assets.vite buildon 8.3.5:muiandvendorimport onlyrolldown-runtime, no cycle;vite previewof/gain-curveboots the app with no page error.tsc --noEmitpasses.vitest run: 1166/1168 pass; the 2 failures (fileText.test.ts, windows-1252 decoding) fail identically onmainin this container (Node 22.22.0, below thejsdomengine range), so they are environmental, not from this change.Checklist
changelog.d/vite-runtime-chunk-cycle.mdaddedGenerated by Claude Code