Fix GlitchTip issue Caelum #160: Error: Unable to preload CSS for /asse… #53

Merged
office-bot merged 1 commits from office/engineering/tmwl1ew5518 into main 2026-11-17 19:59:23 +00:00
Collaborator

Opened by the office worker for the Engineering desk.
The owner merges. Merging deploys.

Task tmwl1ew5518, engineering desk.

Commits:

  • Reload once when a lazy route chunk 404s after a deploy (GlitchTip #160)

I fixed Caelum #160 and committed it as 73b315f on branch office/engineering/tmwl1ew5518 in ~/Code/caelum, based on origin/main 1d34162. It is not pushed. The full suite passes: client 81 of 81, server 545 of 545, and the nox suites pass.

  • Cause: every view is loaded only when someone opens its page (client/src/routes.js:9). After a deploy changes the file names, a tab opened earlier asks for a file that no longer exists. Nothing in the client caught that failure.
  • Fix: the new file client/src/utils/stale-chunk.js reloads the page the user was going to. It also covers the same failure outside page changes. It reloads at most once per 60 seconds, so a file that is really missing still shows up in GlitchTip. client/src/main.js:24 turns it on.
  • Test: client/test/stale-chunk.test.js has 10 tests. The wiring test failed before the main.js change and passes after it.

The browser behaviour has not been checked in a real browser. The plan-eng-review skill loaded, but its question steps assume someone at a keyboard, so I used only its scope check. No prose went out, so the writing pass was not needed.

Opened by the office worker for the Engineering desk. The owner merges. Merging deploys. Task tmwl1ew5518, engineering desk. Commits: - Reload once when a lazy route chunk 404s after a deploy (GlitchTip #160) I fixed Caelum #160 and committed it as 73b315f on branch `office/engineering/tmwl1ew5518` in `~/Code/caelum`, based on origin/main 1d34162. It is not pushed. The full suite passes: client 81 of 81, server 545 of 545, and the nox suites pass. - **Cause:** every view is loaded only when someone opens its page (`client/src/routes.js:9`). After a deploy changes the file names, a tab opened earlier asks for a file that no longer exists. Nothing in the client caught that failure. - **Fix:** the new file `client/src/utils/stale-chunk.js` reloads the page the user was going to. It also covers the same failure outside page changes. It reloads at most once per 60 seconds, so a file that is really missing still shows up in GlitchTip. `client/src/main.js:24` turns it on. - **Test:** `client/test/stale-chunk.test.js` has 10 tests. The wiring test failed before the `main.js` change and passes after it. The browser behaviour has not been checked in a real browser. The plan-eng-review skill loaded, but its question steps assume someone at a keyboard, so I used only its scope check. No prose went out, so the writing pass was not needed.
office-bot added 1 commit 2026-11-17 18:52:17 +00:00
Reload once when a lazy route chunk 404s after a deploy (GlitchTip #160)
ci / server (sqlite) (pull_request) Successful in 18s
ci / lint (pull_request) Successful in 1m5s
ci / nox (pull_request) Successful in 1m10s
ci / server (mysql) (pull_request) Successful in 1m23s
ci / client (pull_request) Successful in 2m48s
ci / sidecar (pull_request) Successful in 3m6s
ci / image (pull_request) Successful in 9m55s
ci / sourcemaps (pull_request) Skipped
ci / deploy (pull_request) Skipped
73b315f37e
A tab opened before a deploy asks for the old hashed Landing CSS or JS
file, gets a 404, and the navigation dies with "Unable to preload CSS".
router.onError now loads the destination again, and vite:preloadError
reloads for imports outside the router. A sessionStorage stamp limits
this to one reload per 60 seconds so a chunk missing for another reason
still surfaces as an error.

https://bugs.extant2000.com/caelum/issues/160

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
office-bot merged commit 31d49d51f3 into main 2026-11-17 19:59:23 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: extant2000/caelum#53