pwa: automatic update UX - no more hard refresh

- ui/version.json: server-side version marker, polled by pwa.js (load, 5 min,
  tab focus, network online); mismatch -> toast + auto reload once per version
- pwa.js: silent reload when tab hidden, guarded reload (sessionStorage) so a
  partial deploy cannot loop, ATUpdate.check() exposed for testing
- _shared.css: .mu-update-toast pill (bottom center, reduced-motion aware)
- shell js/css get ?v=<version> automatically (bump-version.py) so HTTP cache
  cannot serve stale files before the service worker takes control
- sw: cache fallback now ignores query string (precache still matches ?v= URLs)
- bump-version.py: writes version.json + verifies it in --check
- VERSION 2026.09.27.108
This commit is contained in:
Bkk1234 committed 2026-11-03 00:32:41 +07:00
1 parent 449afb923a
commit fcdab3ac80
8 files changed
+248 -50

No files matched your search

+2 -1
View File
@@ -383,5 +383,6 @@
"credits.analyticsTitle": "Analytics — inspired by Umami",
"credits.analyticsBody": "The analytics layer is written here in",
"credits.analyticsBody2": "(no dependencies) — it borrows only the privacy-first approach and the /api/send payload shape from Umami; no Umami code is copied",
"credits.analyticsLocal": "Stats live in the user's browser only (localStorage) — view or clear them on the Stats page"
"credits.analyticsLocal": "Stats live in the user's browser only (localStorage) — view or clear them on the Stats page",
"update.applying": "New version — updating…"
}