GeezerVison is showing github.com — id(phase-14): shells v1 slice 1 — PWA offline read model + catch-up in the browser shell (#6296) · Issue #10927 · developing-today/code
id(phase-14): shells v1 slice 1 — PWA offline read model + catch-up in the browser shell (#6296) #10927DescriptionScope
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.
Refs #10931 Activitydeveloping-today commented on Nov 17, 2026 dezren39 commented on Nov 23, 2026 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). dezren39 commented on 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.
- 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.
Criteria after this slice:
- Snapshot store: DONE (pending merge).
- Journal-snapshot offline read: DONE (pending merge).
- 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. dezren39 commented on Nov 23, 2026 Refs #10931. The browser shell's recorded session (this issue's slice 1) is one of the two remaining sessions blocking the shell-suite close-out on #10931. Once it lands, add its session path to pkgs/id/contract/shell-suite.v1.json. dezren39 commented on Nov 23, 2026 Refs #10930 — the client.notify hint executor slice landed via PR #13837 (merged d31455b): NotifyExecutor + notify_needs_resync live in id-native-shell's ProviderAdapter. The remaining notify-then-resync behavioral wiring builds on this issue's catch-up seam when it lands. dezren39 commented on Nov 24, 2026
Agent note — triaged, task 22051 (lane any-n, 2026-11-24)
developing-today-fleet commented on Nov 26, 2026 Triage — agent-next-21-local, queue task 24338 (2026-11-26; verified against origin/main 5ea4cc6).
Verdict: still live; routed to slice task 24504.
Issue remains open. queue/queued matches the new live queue task. No test suite was run for this read-only triage; evidence is the current main source, contract manifest, and merged PRs above. developing-today-fleet commented on Nov 26, 2026 Progress — task 24504, branch code-i/24504-history-identity (commit d17e4a7fb31). Chosen conservative path: no durable journal identity exists, so a restored offline snapshot or any disconnected reconnect now asks for a fresh authoritative snapshot and omits the stale screen resume token; a live continuous socket still processes its event stream normally. The host also requires a snapshot for cursors ahead of the current journal. Added regression coverage for rewritten history with overlapping sequence numbers and for continuous live events after the fresh snapshot. Focused Fleet browser and Rust runs are in progress: dezren39/fleet#45912138390 and dezren39/fleet#45912137630. No hosted surface touched. developing-today-fleet commented on Nov 26, 2026 Task 24504 implementation is now in draft PR #15812: #15812. The offline-reload oracle was red before the change (run dezren39/fleet#45911772962 observed stale after: 5); after the change, the focused browser files passed 20/20 on the branch (run #45912138390). I merged current main into the branch and am rerunning browser/typecheck plus the host guard and v1 shell-suite together on that merged head (#45913176409 and #45913176922 are still running). Chosen safety behavior is conservative: without a durable history identity, reconnect requests an authoritative snapshot/full view; live events continue normally after that point. No hosted surface or quota behavior touched. developing-today commented on Nov 27, 2026 Task 24504 verification complete; PR #15812 is ready for review: #15812. On the merged branch, Fleet run #45913176409 passed the focused browser tests plus TypeScript typecheck, and run #45913176922 passed the ahead-cursor host test and v1 shell-suite command. Suite output: terminal 5 frames PASS; browser 19 frames PASS (recorded session); native 7, hardware 6, TUI 11; 5/5 shells passed. The failing-first offline-reload test observed the old after: 5 behavior before the fix. The browser now requests a fresh authoritative snapshot after offline restore/disconnect; live stream processing continues after the snapshot. No hosted surface or quota behavior touched. dezren39 commented on Nov 27, 2026
Closing as implemented — 2337-I (queue task 25593)
Task 25593's park condition was "after PR #15812 merges, reassess remaining acceptance". PR #15812 has merged, and on fresh re-verification every criterion in this issue's scope is now landed:
fleet queue verify-disposition for #10927 with PRs #12814/#15812/#15104 returned merged_verified. Closing this issue as completed; queue task 25593 completes with that disposition.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|