fix(sw): bump the cache version for the F13 bundle

The shell is served cache-first and CACHE_VERSION had sat at v1 through four
commits that changed main.js, so a returning reader kept the old bundle: none of
the new UI reached them and the page looked simply unchanged. sw.js says to bump
it on any shell change and I did not.

Also tells the reader why the game list holds only tracked games when they have
none of their own yet — the list is nine games we cover with no hint that a game
of theirs has to exist before an event can be filed under it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Lucas Winther
2026-08-17 18:34:34 +02:00
co-authored by Claude Opus 5
parent 0a25cce9ce
commit 7130a94b21
2 changed files with 15 additions and 1 deletions
+10
View File
@@ -215,6 +215,16 @@ export function EventForm({
</select> </select>
</label> </label>
{/* Otherwise the list is nine games we track and no sign of why none of
them is theirs — the reader who came here to add a game we don't cover
has no way of knowing they need to make it first. */}
{Object.keys(customGames).length === 0 && (
<p className="mt-1.5 text-xs leading-relaxed text-faint">
These are the games we track. To file this under a game of your own,
cancel and add the game first.
</p>
)}
<label className={`${labelClass()} mt-3`}> <label className={`${labelClass()} mt-3`}>
What is it What is it
<input <input
+5 -1
View File
@@ -14,7 +14,11 @@
* Bump CACHE_VERSION on any shell change; old caches are deleted on activate. * Bump CACHE_VERSION on any shell change; old caches are deleted on activate.
*/ */
const CACHE_VERSION = "event-clock-v1"; // v2: reader-authored games and events (PRD F13) changed main.js. The shell is
// served cache-first, so without this bump a returning reader keeps the old
// bundle and none of the new UI reaches them — the page looks unchanged and
// nothing anywhere says why.
const CACHE_VERSION = "event-clock-v2";
// Paths are derived from the registration scope, so the same worker is // Paths are derived from the registration scope, so the same worker is
// correct at a domain root and under a subpath (GitHub Pages) alike. // correct at a domain root and under a subpath (GitHub Pages) alike.
const BASE = new URL("./", self.registration.scope); const BASE = new URL("./", self.registration.scope);