From 98541c5cf0333f9f8ac4eb1838c7bd1d79a22730 Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Wed, 21 Oct 2026 03:40:54 +0000 Subject: [PATCH] sw.js carries a build stamp; the shots workflow writes the commit into it so installed apps notice every update Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01K6897PWcUEwHiqZMcVnNF6 --- sw.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw.js b/sw.js index 2ca8288..c1b9c18 100644 --- a/sw.js +++ b/sw.js @@ -1,6 +1,8 @@ // gandora's service worker: the shell is cached so the app opens and the library plays with no signal. // Tracks live in IndexedDB already; the DJ and new renders need the network and the page says so. -const SHELL = "gandora-shell-v1"; +// REV is stamped by the shots workflow on every push, so an installed app sees each update as a new worker. +const REV = "dev"; +const SHELL = "gandora-shell-" + REV; const FILES = ["/", "/index.html", "/brain.js", "/favicon.svg", "/manifest.json", "/icons/icon.svg"]; self.addEventListener("install", (e) => { e.waitUntil(caches.open(SHELL).then((c) => c.addAll(FILES)).then(() => self.skipWaiting())); }); self.addEventListener("activate", (e) => { e.waitUntil(caches.keys().then((ks) => Promise.all(ks.filter((k) => k !== SHELL).map((k) => caches.delete(k)))).then(() => self.clients.claim())); });