Spaces:
Running
Running
Commit History
11 days ago
-
fix(cache): root-cure the stale-shell class — SW never serves the HTML shell again
ahmdelbaz28-uxOwner reports (2026-11-22): 'المتصفح الآخر يفتح نسخة قديمة' + desktop infinite loading. Hard evidence found in the generated sw.js: 1. vite-plugin-pwa DEFAULTS navigateFallback to index.html -> NavigationRoute(createHandlerBoundToURL) served the PRECACHED shell cache-first on every navigation. A profile with an old SW opened a one-deploy-behind app forever. index.html is now excluded from globPatterns AND navigateFallback: undefined (explicit Object.assign override) — NavigationRoute is GONE from the emitted sw.js; every navigation revalidates the shell (no-cache + cache-nuke token). 2. cache-nuke.js: the 2-nuke-per-session cap permanently disarmed long-lived tabs. A proven-healthy load (token == buildId == stored) now restores the full budget, so the NEXT deploy can heal again. +2 regression tests (12/12). 3. Worker edge proxy: HTML shell CDN-Cache-Control 30s -> no-store. A pre-deploy shell served from an edge PoP referenced DELETED hashed assets (…97b6407
17 days ago
-
fix(recovery): self-healing desktop recovery + edge-challenge resilience
ahmdelbaz28-uxRoot cause of 'desktop won't load' (2026-11-16, measured live): - The qzz.io provider edge (outside our control) serves flagged clients '403 + cf-mitigated: challenge' on the document AND ~26 tRPC calls — XHRs can never solve an interactive challenge, so the shell rendered while all data died; flagged desktops loop in the challenge page. - Locally, recovery was DEAD CODE: index.html's self-heal called __nukeAndReload which cache-nuke.js never defined; a stale HTML shell with a poisoned localStorage buildId passed the version check forever. This commit (all layers, loop-proof by construction): - cache-nuke.js v3: single recovery owner — stale-shell token check (?v= vs /api/version), per-session nuke cap (2) + Arabic guidance banner, one-shot edge-challenge recovery navigation, __nukeAndReload actually exported; inflight guard kills the double-trigger race - index.html: early listener now catches RESOURCE errors (script 404) and unhandledrejection (lazy chunks); boot-s…b452688