From 72622f3dfba79149521ac5098352aa60f0497629 Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Sun, 21 Jun 2026 11:53:58 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20SW=20cache=20bust=20=E2=80=94=20add=20JS?= =?UTF-8?q?=20modules=20+=20locales=20to=20STATIC=5FASSETS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: cacheFirstStatic() in sw.js was caching viewer.js, i18n.js, auth.js, dashboard.js, and locale JSON files under the old CACHE_VERSION. Even after rebuild, the old SW served stale cached files without data-i18n attributes, so dashboard stayed in French. Changes: - sw.js: add js/viewer.js, js/i18n.js, js/auth.js, js/dashboard.js, js/app.js, locales/en.json, locales/fr.json to STATIC_ASSETS so they are versioned with CACHE_VERSION and properly invalidated - CACHE_VERSION already bumped to v5 in previous commit Manual fix for existing clients: Chrome → F12 → Application → Service Workers → Unregister Or: chrome://serviceworker-internals/ → Unregister Then Ctrl+Shift+R to hard-refresh --- frontend/sw.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/sw.js b/frontend/sw.js index e7a3d2e..d28b879 100644 --- a/frontend/sw.js +++ b/frontend/sw.js @@ -10,7 +10,14 @@ const STATIC_ASSETS = [ '/static/index.html', '/static/app.js', '/static/style.css', - '/static/manifest.json' + '/static/manifest.json', + '/static/js/viewer.js', + '/static/js/i18n.js', + '/static/js/auth.js', + '/static/js/dashboard.js', + '/static/js/app.js', + '/static/locales/en.json', + '/static/locales/fr.json' ]; /* ── Install ── */