GeezerVison is showing github.com — id: service-worker offline web app — slices 2–5 (follow-on of #13918) · Issue #14774 · developing-today/code
id: service-worker offline web app — slices 2–5 (follow-on of #13918) #14774DescriptionFollow-on of #13918 (design record doc/2026-11-25_design_id_service_worker_offline_13918.md, slice 1 merged in PR #14702, merge SHA 43ef0e72f3954a51ddd6020b6ed30d546a003485).
Remaining slices from the record's §7, each landing as its own PR:
Slice 2 has no dependency and can start now. Slice 4 waits on item 21's production wiring.
Acceptance criteria
- Slices 2–5 of the ID: service-worker offline / local-first web app — design and first slice #13918 design record (§7) each land as their own PR.
- Slice 2's Playwright offline pass in
pkgs/id/e2e passes: a visited page renders from cache offline, an unvisited page shows the 503 offline page, and a new build replaces the id-shell-* / id-pages-* caches.
- Each remaining slice meets the acceptance stated for it in the design record.
Activitydeveloping-today commented on Nov 25, 2026 dezren39 commented on Nov 25, 2026 Claimed by lane 2, 2026-11-25T02:20Z (slice 2: real-browser offline pass).
Generated by Claude Code developing-today-fleet commented on Nov 25, 2026 Intake review
Related: #13918 (design + slice 1, PR #14702)
Notes: Follow-on with slice 1 already merged; the remaining slices are live work, not resolved by that merge.
Risks: Browser-cache behaviour is easy to regress silently; the e2e pass is the guard.
Suggested approach: Land slice 2 first (it is the verification harness for the rest), then slices 3–5 in record order.
🤖 Agent note · filed
- Agent: fleet monitor
- Session / ID: repo-fleet-monitor run 2026-11-25T02:14Z
- Found via: monitor reconciliation
- Task: intake enrichment (protocol §5)
- Expectation: see the Intake review comment on this issue
dezren39 commented on Nov 25, 2026 Claimed by lane 10, 2026-11-25T03:05Z (slice 3: cache-first content-addressed blobs; touches web/src/sw-policy.ts only, not lane 2's e2e slice).
Generated by Claude Code developing-today-fleet commented on Nov 25, 2026 Claimed by ITEM-WORK-271 (Archer lane), 2026-11-24 ~22:25 CST — slice 5 only: PM console.
Premise check (fresh reads this run): slice 2 is lane 2's (claim comment 7150524412; PR #14793 OPEN, unmerged — its landing still gates any same-worker follow-up on the id side); slice 3 is lane 10's (claim comment 7151577866; PR #14831 OPEN, touches web/src/sw-policy.ts only); slice 4 waits on roadmap item 21. Slice 5 is unclaimed and independent: it applies the #13918 worker contract to a different surface (pm-stack/console), no file overlap with slices 2–3.
Scope as claimed: the PM console already runs a worker (pm-stack/console/public/sw.js) built under the PM programme. This slice reconciles it against the design record's contract (§4/§5) and closes the gaps that are genuinely open there:
- an offline navigation to the console page with nothing kept and no network currently surfaces a raw browser network error — the contract (§4.3) answers an unvisited page offline with a small 503 offline page;
- on activate the worker deletes other
pm-console-* caches but never prunes kept entries an older build left that the current build's contract does not recognise — §4.2's "a new build replaces the caches", within the worker's own power.
Deliberate divergences that are the console's own settled contract, NOT gaps (recorded here so they are not re-litigated): API reads are network-first with kept copies stamped and shown with their age (the PM offline rule: last real data, marked), and offline writes queue in the outbox for the store layer to send — both are Drew-settled PM console behaviour that postdates and out-specifies the id record for this surface.
Verification: pm-stack/console test suite (test/sw.test.ts gains the two cases above) in a laptop worktree off the existing clone — named fallback, CI runs on main only. PR will use Refs #14774 (slices 2–4 remain open after this lands). developing-today-fleet commented on Nov 25, 2026 Slice 5 (PM console) complete — PR #14851 merged (merge commit 3fbbf27). Landed by ITEM-WORK-274, finisher for ITEM-WORK-271 (interrupted mid-transfer; the patch script was re-transferred in small chunks and hash-verified before running — sha256 2b93cdb05184313501f2d7b13feac13ee99b4873e3a41cf2fcdc13539ae6b1de on both the sandbox original and the laptop copy).
What landed (pm-stack/console/public/sw.js, pm-stack/console/test/sw.test.ts):
- Contract 4.3 (no copy, no network, page): the worker now answers a page navigation in that state with its own small 503 offline page — it says what happened and links back to /console/ — instead of leaving the browser's raw error. The page is never kept. Reads and files in the same state still fail as before: the app answers for those itself, and a made-up answer could be mistaken for the server's. The pre-existing test assertion that encoded the browser-says-so behaviour was updated, with the reason recorded in the test comment.
- Contract 4.2 (a new build replaces the caches): on activate, the worker now prunes kept entries the current files.json no longer names. Kept through pruning: the page, the list itself, listed files, icons/extras, /console/api/ reads, /console/health, and seen entries. When the list cannot be read (no connection, say), nothing is pruned. A new test covers the pruning and the keeps.
- The worker's header comment now covers the offline page.
Contract mapping for the rest of the console worker (verified against main by ITEM-WORK-271, unchanged by this PR): network-first with a copy shown only when the network gives no answer; only plain 200s kept; refusals and redirects never papered over — already satisfied and test-covered. The deliberate divergences stand as recorded on the claim (comment 7152826749): cached reads carry age stamps and writes go through the durable outbox queue; those are settled PM behaviour, not gaps against #13918.
Verification (laptop worktree — named fallback; CI runs on main only): bun test test/sw.test.ts — 32 pass, 0 fail. Full console suite (bun test in pm-stack/console) — 662 pass, 0 fail across 26 files.
What remains on #14774: slice 2 (lane 2, PR #14793 OPEN), slice 3 (lane 10, PR #14831 OPEN), slice 4 (waits on roadmap item 21). Slice 5 is done. dezren39 commented on Nov 25, 2026 Slice 3 (content-addressed blobs offline) landed in #14831.
Whole /blob/<hash> GETs are now served cache-first from id-blobs-v1: kept only when the server marks them immutable with a Content-Length up to 1 MiB, trimmed to the 64 most recent, and cleared by the kill switch. ?token= and Range requests still pass through. The design record's routing table and slice list are updated.
Checked remotely: tsc --noEmit, the full web vitest run (964 passed), biome lint, biome format on the changed files, and bun run build. Remaining on this issue: slice 2 (real-browser offline pass), slice 4 (offline drafts) and slice 5 (PM console).
Generated by Claude Code dezren39 commented on Nov 25, 2026 Progress: slice 2 landed in #14793.
e2e/tests/offline-service-worker.spec.ts checks the real worker in Firefox: a visited page renders from cache, an unvisited page gets the 503 offline page, the page loads after reconnect, and a newly installed worker deletes caches from other builds.
- Playwright's
context.setOffline doesn't reach a service worker's own fetches, and Firefox keeps localhost reachable offline, so the spec runs its own id serve and stops it to simulate going offline. Later slices that need "offline" should do the same.
- The same PR fixed
id serve --world failing on an unbuilt examples/roc-world checkout, which had stopped every e2e web server from starting.
Slices 3 to 5 remain open.
Generated by Claude Code developing-today-fleet commented on Nov 26, 2026 Triage verdict — Lane SD (queue task 23891), 2026-11-26
Premise + ownership check (all comments read): the prior claims on this issue were slice-scoped and are complete — lane 2 (slice 2), lane 10 (slice 3), ITEM-WORK-271/274 (slice 5). No live claim covers the remaining work, no held/user label is present, and no Drew-decision gate applies.
Verified landed:
Remaining: slice 4 only (offline drafts). Per the issue body and the #13918 design record, slice 4 goes through the IndexedDB store adapter (roadmap item 21) once wired — drafts are written locally and synced by the store layer; the worker stays a cache. That production wiring has not landed: the related store-adapter work (#12801 tenant DB store adapter in id-store, #13145 E6 remainder) is still open, and no merged wiring PR is referenced here. Slice 4 is therefore dependency-blocked, not workable as a small triage fix.
Disposition: queue task 23891 is parked with a ready condition keyed to that wiring landing (a merged PR wiring the IndexedDB store adapter into production, or closure of the store-adapter work it depends on), at which point slice 4 becomes claimable real work. The issue stays open for slice 4.
🤖 Agent note · triaged
- Agent: Archer lane SD
- Task: queue 23891 (repo-health-code-pilot, rung: queue)
developing-today-fleet commented on Nov 27, 2026 Triage verdict — Lane code-i (queue task 23891), 2026-11-27
Fresh recheck of the slice-4 dependency, since the prior park condition has now fired (#12801 and #13145 both CLOSED as COMPLETED on 2026-11-26).
Verified landed (all MERGED):
Remaining: slice 4 only (offline drafts). Per the #13918 design record §7, slice 4 goes through the IndexedDB store adapter (roadmap item 21) once wired — drafts written locally, synced by the store layer, worker stays a cache.
Dependency status, verified this run:
Disposition: task 23891 re-parked with a 24h recheck. Slice 4 becomes real, claimable work once the IndexedDB store is wired into the production web app (or an issue owning that wiring lands). Issue stays open for slice 4.
🤖 Agent note · triaged
- Agent: OpenChamber lane code-i
- Task: queue 23891 (repo-health-code-pilot, rung: queue)
dezren39 commented on Nov 28, 2026 Triage verdict — Lane 0907-C-E (queue task 23891), 2026-11-28
24h recheck of the prior park (lane code-i, 2026-11-27T13:19Z, comment 7219343657), performed after that recheck window expired. Issue body + ALL comments read; metadata/code-search only, no CI logs.
Premise + ownership: no live claim (prior claims were slice-scoped and complete), no assignees, no held/user gate. Labels: status:in-review, kind/feature, priority/normal, app/id, effort/l, meta/enriched.
Verified landed (unchanged):
Remaining: slice 4 only (offline drafts, via the IndexedDB store adapter, roadmap item 21).
Dependency recheck, verified this run via GitHub code search on current main:
IndexedDB in pkgs/id/web: 0 results. drafts in pkgs/id/web: 0 results.
indexeddb_store still appears only in the browser prototype/test surface (pkgs/id/browser/test/indexeddb_conformance.test.ts, browser_driver.ts, README/research docs) — no production import from the web app.
- No open issue tracks the browser production wiring (issue search returned none), so there is still no finer-grained ready signal.
Disposition: task 23891 re-parked back to queue. Slice 4 is dependency-blocked, not a small workable fix. Ready conditions (either fires → slice 4 becomes claimable real work):
- A merged PR wires the IndexedDB store adapter (or its successor) into the production web app under
pkgs/id/web, with a drafts path writing through the store layer; or
- An issue owning that production wiring is filed and closes.
Issue stays open for slice 4.
🤖 Agent note · triaged
- Agent: Xaltha lane 0907-C-E (charlie ADVANCE)
- Task: queue 23891
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|