v2.6.1
Fixes the intermittent "a tool sometimes gets stuck / its list never loads, and a page reload fixes it" bug on the GitHub Pages site.
Fixed
- Stale-chunk hang after a deploy (root cause). Cryptex is a pure client-rendered SPA (
ssr = false,prerender = true) served from GitHub Pages and redeployed often. Every deploy rehashes the lazily-imported JS chunk filenames; a browser holding an older app shell then tries toimport()a chunk whose name no longer exists → 404 → the route never mounts → the tool stays blank → manual reload (fresh shell) fixes it. The non-determinism ("sometimes", "many tools", "reload fixes it") is the signature of this version-skew. Three coordinated fixes:app/src/hooks.client.ts(new): avite:preloadErrorlistener does a one-time guardedlocation.reload()the instant a chunk import 404s, so a stuck tool becomes a brief auto-refresh onto the fresh build instead of a dead end. Plus ahandleErrorclient hook that logs any other failure mode instead of letting it hang silently.svelte.config.js:kit.version.pollInterval = 60_000— SvelteKit polls_app/version.json(already unique per build) and flips theupdatedstore when a new deploy is detected.app/src/routes/+layout.svelte: abeforeNavigateguard forces a full-page navigation whenupdated.currentis true, so a client that already knows it is stale never attempts a dead client-side import.
- GitHub Pages deep-link 404. The static adapter fallback was
index.html, but GitHub Pages serves404.htmlfor unresolved paths. Changed the fallback to404.htmlso deep-links and no-trailing-slash URLs (e.g./cryptex-oss/emoji) fall through to the SPA shell and route correctly instead of hitting GitHub's own 404 page.
Changed
app/src/lib/workers/runInWorker.ts: added a 30s worker-reply timeout (defensive — terminates and surfaces a retryable error instead of awaiting forever if a worker ever loads but never posts back). Not implicated in the reported bug; belt-and-suspenders.svelte.config.js: removed the dead$legacy: '../js'alias (thejs/directory was deleted in v2.4.1).
Ruled out (investigated, not the cause)
- Web Worker URL resolution under the base path —
pool.tsuses the Vite-nativenew Worker(new URL(..., import.meta.url))pattern, which Vite rewrites to a correct base-aware hashed URL; workers also only engage for ≥50 KB inputs (never on tool-open). - Per-tool init / empty lists — Vault seeds load via eager
import.meta.glob(bundled, never fetched); no await-forever on open.
Tests
- 906 / 906 unit tests still pass; 0 type-check errors.
Image
ghcr.io/m4xx101/cryptex-oss:v2.6.1(multi-archlinux/amd64+linux/arm64).:latest,:v2.6,:2.6,:v2,:2all point at the same SHA.