Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit eee3543c9e35953c9cb782e3d79d287df798ac79
parent 75934c00a67813b8495cd06a3b22d78537054c7c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sat, 26 Sep 2026 23:17:01 -0400

export: both service workers drop the /kofi-symbol.svg rule; /icons/ stays network-first in shell-v2

site-sw.js's header comment and both workers' routing are back to slice O's
parent. SHELL stays "shell-v2" and VERSION stays "v1": no cache renamed,
nothing evicted. serviceWorkerRouting.test.ts loses the Ko-fi case per worker.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mcommon/lib/archive/serviceWorkerRouting.test.ts | 11-----------
Mexport/service-worker/site-sw.js | 7++-----
Mexport/service-worker/sw-hub.js | 4+---
3 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/common/lib/archive/serviceWorkerRouting.test.ts b/common/lib/archive/serviceWorkerRouting.test.ts @@ -129,17 +129,6 @@ for (const file of ["export/service-worker/site-sw.js", "export/service-worker/s assert.equal(sw.cached("shell-v2", "/icons/icon.svg"), undefined); }); - test(`${file}: the footer's /kofi-symbol.svg is network-first in shell-v2 — an installed app draws it offline`, async () => { - // Not under /icons/: it is a static file of its own, on every page's - // footer. Without its own rule it fell through to the network, so an - // offline launch drew an empty link where the mark should be. - const sw = loadWorker(file); - assert.equal(await sw.request("/kofi-symbol.svg", { online: true, network: "mark" }), "mark"); - assert.deepEqual(sw.fetched, ["/kofi-symbol.svg"]); - assert.equal(sw.cached("shell-v2", "/kofi-symbol.svg"), "mark"); - assert.equal(await sw.request("/kofi-symbol.svg", { online: false }), "mark"); - }); - test(`${file}: /_next/static/ stays cache-first`, async () => { const sw = loadWorker(file); sw.seed("shell-v2", "/_next/static/chunks/app.js", "cached chunk"); diff --git a/export/service-worker/site-sw.js b/export/service-worker/site-sw.js @@ -8,8 +8,7 @@ * Caches: * SHELL — app shell: hashed /_next/static/* (immutable, cache-first) + HTML * navigations (network-first, cache fallback) + /icons/* (network- - * first: they follow the site's accent, which a redeploy can change) - * + the footer's /kofi-symbol.svg (network-first, the same rule). + * first: they follow the site's accent, which a redeploy can change). * PAGES — every published JSON document: the per-channel shard trees * (manifest.json + page-NNNN.json), the site-wide flat trees * (summaries, stats) and the root documents (corpus.json, site.json, @@ -105,9 +104,7 @@ self.addEventListener("fetch", (event) => { event.respondWith(cacheFirst(req, SHELL)); return; } - // The footer's Ko-fi mark is a static file of its own (/kofi-symbol.svg, - // on every page): the same rule, so an installed app still draws it offline. - if (url.pathname.startsWith("/icons/") || url.pathname === "/kofi-symbol.svg") { + if (url.pathname.startsWith("/icons/")) { event.respondWith(networkFirst(req, SHELL)); return; } diff --git a/export/service-worker/sw-hub.js b/export/service-worker/sw-hub.js @@ -94,9 +94,7 @@ self.addEventListener("fetch", (event) => { event.respondWith(cacheFirst(req, SHELL)); return; } - // The footer's Ko-fi mark is a static file of its own (/kofi-symbol.svg, - // on every page): the same rule, so an installed app still draws it offline. - if (url.pathname.startsWith("/icons/") || url.pathname === "/kofi-symbol.svg") { + if (url.pathname.startsWith("/icons/")) { event.respondWith(networkFirst(req, SHELL)); return; }