From 5c6e85db41db63775c0cae358a3fbdd9f045b9bc Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 10:34:00 +0000 Subject: [PATCH 1/2] Drop the gesture teardown nothing can call attachGestures returned a closure that removed its listeners and put the canvas's touch-action back. Both callers, js/app.js and dev/index.html, call it as a bare statement and throw the return value away, and no test, spike or script imports attachGestures, so nothing in the repo can ever reach that closure. priorTouchAction existed only for it. Runtime coverage agrees: precise V8 coverage unioned across every state the app has (the question, card, way, list, room and its day nav, the buildings, picker and browse screens, every refusal, the evening gate, offline and cold boots, boot failure, ?dev=1 and /dev/, desktop with a fine pointer) records zero calls of it. Nothing about how the map handles a finger changes. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J1FPsM3kXNTAGmu8tYszr3 --- js/map.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/js/map.js b/js/map.js index 22b1fa3..49c11e0 100644 --- a/js/map.js +++ b/js/map.js @@ -624,7 +624,6 @@ const TAP_MS = 300; // pinch over the map zooms the whole page on iOS and the two fight. export function attachGestures(canvas, { onPan, onZoom, onTap } = {}) { const pointers = new Map(); - const priorTouchAction = canvas.style.touchAction; canvas.style.touchAction = 'none'; let rect = null; @@ -706,15 +705,4 @@ export function attachGestures(canvas, { onPan, onZoom, onTap } = {}) { canvas.addEventListener('pointercancel', up); canvas.addEventListener('wheel', wheel, { passive: false }); window.addEventListener('resize', invalidate); - - return () => { - canvas.removeEventListener('pointerdown', down); - canvas.removeEventListener('pointermove', move); - canvas.removeEventListener('pointerup', up); - canvas.removeEventListener('pointercancel', up); - canvas.removeEventListener('wheel', wheel); - window.removeEventListener('resize', invalidate); - canvas.style.touchAction = priorTouchAction; - pointers.clear(); - }; } From 08099911a1e4fdcc876dc20980c9d3ab72b759b0 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 10:36:18 +0000 Subject: [PATCH 2/2] Re-measure the shell after the gesture teardown came out `git show HEAD: | gzip -9 -c | wc -c` over the shell list: 168,778 bytes, data 116,297. js/map.js went from 9,540 to 9,466. The README's rounded shell figure moves from 164 to 165 KB with it; most of that drift was already on main, which measured 168,852 before this branch. Shell cache restamped. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J1FPsM3kXNTAGmu8tYszr3 --- README.md | 2 +- sw.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 382c883..a32eb87 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,7 @@ sits at the bottom, then **Add to Home Screen**. iOS 26 defaults to that Compact layout, which is why the app offers you both. On Android, Chrome has **Install app** in its menu. -Installed, the whole app is 164 KB of shell and about 112 KB of schedule, gzipped, and +Installed, the whole app is 165 KB of shell and about 112 KB of schedule, gzipped, and none of it is fetched again to answer a question. Turn the network off, open it, and it still ranks rooms. That matters because the moment you want it most is the moment you are in a basement with one bar. diff --git a/sw.js b/sw.js index 9dbfb58..613155e 100644 --- a/sw.js +++ b/sw.js @@ -7,8 +7,8 @@ // One cache would either re-download the room index on every deploy or pin an // installed icon to last month's app.js forever. // -// Measured on 2026-09-16 over the committed blobs, which is the copy Pages serves: -// `git show HEAD: | gzip -9 -c | wc -c`. Shell 167,466 bytes, data 115,160. +// Measured on 2026-10-10 over the committed blobs, which is the copy Pages serves: +// `git show HEAD: | gzip -9 -c | wc -c`. Shell 168,778 bytes, data 116,297. // Run it exactly as written, through the pipe. `gzip -9 -c ` with the // name as an argument stores each basename in the gzip FNAME header and reads // 176 bytes higher across these seventeen files, which is most of a percent of @@ -88,7 +88,7 @@ // placeholder is __BUILD_ID__, and a committed sw.js still carrying it means the // stamp did not run. scripts/test/sw.test.mjs fails on exactly that. Spelled out // rather than built from CACHE_PREFIX, because the stamper rewrites this line. -const SHELL_CACHE = 'vacant-shell-c09a7c8'; +const SHELL_CACHE = 'vacant-shell-5c6e85d'; const DATA_CACHE = 'vacant-data-v1'; // CacheStorage is per origin, not per path, and enesyilmazcode.github.io also