You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
id(phase-14): shells v1 slice 1 — PWA offline read model + catch-up in the browser shell (#6296) #10927
Implement the mobile web/PWA shell's offline read model from the record: journal-snapshot offline read (offline = reader, not writer), a snapshot store, reconnect by last-applied journal sequence with re-snapshot on divergence, and push as a re-sync hint via an F12.5 capability provider. Done = the slice's conformance run plus behavioral checks for the join / view screens / chat / offline-read / reconnect workflow, per the record's gate.
Source record: doc/2026-11-10T20-40-00Z_design_more_shells_v1/2026-11-10T20-40-00Z_design_more_shells_v1.md (merged via PR #8243), §"Follow-on slices". Parent design issue: #6296. Core topic: #6279. Plan of record: #6312.
Binding constraints from the record's review findings (2026-11-14, PR #8243): conformance alone is not a completion gate — behavioral checks for the shell's required workflow are also required; catch-up reconstructs the rendered view from the client projection and host view (the journal event suffix alone can omit entries and redact seeds); reconnect must detect a rewritten journal (history-identity check, or a fresh snapshot when continuity is unprovable); provider declaration in v1 uses the F12.4 registry/manifest out of band.
Sequencing stop rule from the record: F12.10 scheduling/quotas #1067 is still open and binds the hosted side. Every v1 shell is local-first; if an implementation slice reaches a hosted surface before #1067 lands, stop and name #1067 rather than inventing quota behavior.
Filed by queue triage task 18464 (lane any-k, 2026-11-17) completing the #6296 deliverable's breakdown half.
Pickup — xaltha (fleet seat), via fleet agent next shortlist rung. Claim-check done: no assignees, no open PR references this issue, only comment is the filing bot's tracker link.
Criteria state against origin/main 9794191 (evidence: pkgs/id/web/src/world.ts):
Snapshot store: NOT present — no persistence in the browser shell; all session state is in-memory.
Journal-snapshot offline read: NOT present — a reload renders nothing without a live socket.
Reconnect by last-applied sequence: PARTIAL — in-memory cursor is sent as the join frame's after (world.ts connect()), but it does not survive a reload because there is no store.
Re-snapshot on divergence / history-identity check: NOT present shell-side — the snapshot frame carries world_id + current_sequence only.
Push as re-sync hint (F12.5 provider): not in this slice (record's follow-on 4).
Conformance + behavioral gate: behavioral checks land per slice.
This slice: the snapshot store + offline read restore. After this PR, loading the world page with a stored snapshot and no connection renders the stored world (participants, view, records) read-only with an offline status, a join after reload resumes from the stored sequence instead of 0, and cd pkgs/id/web && bun run test shows the new behavioral tests passing. Refs #10927 (partial slice).
What landed: the snapshot store + offline read restore for the browser shell.
New pkgs/id/web/src/world-snapshot-store.ts: per host+world store of {world_id, last applied sequence, participants, rendered view, view revision, records}, validated on load with the frame validators' shape discipline; storage failures swallowed (best-effort).
world.ts writes through on snapshot/event/view/completed-records frames and restores on page load and on world switch: the world renders fully offline (participants, view, records) with an "Offline — saved snapshot" read-only status, and the join after a reload presents the stored sequence as after instead of restarting at 0.
Evidence (sandbox, bun/vitest): new world-offline.test.ts 5/5 (store round-trip + rejection, write-through, offline render after reload, reader-not-writer offline, resume-after-reload); the 2 behavioral tests fail on origin/main for the right reason and the write-through mutation is caught; full web suite 871 passed / 9 skipped / 0 failed; typecheck clean; suite-registry check has no complaint for the new test file.
Reconnect by last-applied sequence: DONE across reloads (pending merge); in-session reconnect already existed.
Re-snapshot on divergence / history-identity check: OPEN — the snapshot frame carries no history identity today, so this needs host/contract support first.
Push as re-sync hint (F12.5 provider): OPEN — the record's follow-on slice 4.
Conformance run: OPEN.
Next slice, in the same form: after a host/contract change gives the snapshot a history identity, cd pkgs/id/web && bun run test shows the shell discarding a stored snapshot whose identity mismatches the host's and taking a fresh snapshot instead of resuming.
Activity
developing-today commentedon Nov 17, 2026
CODE-3932
dezren39 commentedon Nov 23, 2026
Pickup — xaltha (fleet seat), via
fleet agent nextshortlist rung. Claim-check done: no assignees, no open PR references this issue, only comment is the filing bot's tracker link.Criteria state against origin/main 9794191 (evidence: pkgs/id/web/src/world.ts):
after(world.ts connect()), but it does not survive a reload because there is no store.This slice: the snapshot store + offline read restore. After this PR, loading the world page with a stored snapshot and no connection renders the stored world (participants, view, records) read-only with an offline status, a join after reload resumes from the stored sequence instead of 0, and
cd pkgs/id/web && bun run testshows the new behavioral tests passing. Refs #10927 (partial slice).feat(id): PWA snapshot store + offline read restore in the browser shell
dezren39 commentedon Nov 23, 2026
Progress — slice 1 landed as PR #12814 (OPEN, branch
xaltha/10927-pwa-snapshot-store, commit e836c39, Refs #10927).What landed: the snapshot store + offline read restore for the browser shell.
pkgs/id/web/src/world-snapshot-store.ts: per host+world store of {world_id, last applied sequence, participants, rendered view, view revision, records}, validated on load with the frame validators' shape discipline; storage failures swallowed (best-effort).world.tswrites through on snapshot/event/view/completed-records frames and restores on page load and on world switch: the world renders fully offline (participants, view, records) with an "Offline — saved snapshot" read-only status, and the join after a reload presents the stored sequence asafterinstead of restarting at 0.Evidence (sandbox, bun/vitest): new
world-offline.test.ts5/5 (store round-trip + rejection, write-through, offline render after reload, reader-not-writer offline, resume-after-reload); the 2 behavioral tests fail on origin/main for the right reason and the write-through mutation is caught; full web suite 871 passed / 9 skipped / 0 failed; typecheck clean; suite-registry check has no complaint for the new test file.Criteria after this slice:
Next slice, in the same form: after a host/contract change gives the snapshot a history identity,
cd pkgs/id/web && bun run testshows the shell discarding a stored snapshot whose identity mismatches the host's and taking a fresh snapshot instead of resuming.