GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(id): PWA snapshot store + offline read restore in the browser shell (#10927 slice 1) by dezren39 · Pull Request #12814 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

First slice of #10927 (shells v1 slice 1 — PWA offline read model + catch-up). The browser shell (pkgs/id/web/src/world.ts) held all session state in memory: a reload lost the world entirely, and the reconnect cursor restarted at 0.

  • New world-snapshot-store.ts: a snapshot store keyed per host + world name, holding {world_id, last applied sequence, participants, rendered view (screen surface or text), view revision, records}. Entries are validated on load with the frame validators' shape discipline (safe non-negative integer sequences/ids, string fields, a surface the renderer accepts); a corrupt or foreign entry is ignored, never rendered and never adopted as the resume cursor. Storage failures are swallowed — the store is best-effort and never breaks the live session.
  • world.ts writes the store through on every snapshot / event / view (full, patched, form) / completed-records frame, and restores it on page load and on a world switch in connect(): participants, view and records render with no socket, the status reads "Offline — saved snapshot" with a read-only log line, and the resume cursor is seeded from the stored sequence so the join frame's after presents the last applied journal sequence across a reload. Offline stays reader-not-writer: the existing send paths refuse without an open socket (covered by test).
  • Participant badge rendering is extracted into one helper shared by the snapshot handler and the restore path.

Refs #10927 — partial slice. Remaining on the issue: re-snapshot on divergence with a history-identity check (the snapshot frame carries no history identity today — needs host/contract support), push as a re-sync hint via an F12.5 provider (the record's follow-on slice 4), and the conformance run for the shell.

Evidence

Ran locally in the sandbox (bun 1.4.4, vitest/happy-dom) at e836c39:

  • Before: bunx vitest run src/world-offline.test.ts — the 2 behavioral tests fail (no store entry written; no offline render/resume), the 3 store tests pass against the new module.
  • After: bunx vitest run src/world-offline.test.ts — 5/5 pass. Full web suite: bun run test — 42 files, 871 passed, 9 skipped, 0 failed. bun run typecheck clean.
  • Mutation check: neutering the store write-through makes both behavioral tests fail; restored and re-verified.
  • Suite registry: bash .github/scripts/check-suite-registry.sh has no complaint for the new test file (the pkgs/id/web/src/*.test.ts row covers it).

Merge Danger

Low. Web-shell-only change (TypeScript, no Rust, no wire/contract change, no new frame kinds). The store is additive: with no entry present, page behavior is byte-for-byte the old behavior. localStorage is per-origin and the key is namespaced per host+world.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
feat(id): PWA snapshot store + offline read restore in the browser shell
e836c39
First slice of #10927 (shells v1 slice 1): the browser shell now
keeps the offline read model the design record specifies — a
snapshot store (world-snapshot-store.ts) keyed per host+world,
written through from world.ts on every snapshot/event/view/records
frame, and restored on page load so the world reads fully offline
(participants, view, records) with an offline/read-only status.
The resume cursor is seeded from the stored sequence, so a join
after a reload presents the last applied journal sequence instead
of restarting at 0. Store entries are validated with the frame
validators' shape discipline; a corrupt entry is ignored.

Behavioral tests in world-offline.test.ts cover the store
round-trip/rejection, write-through, offline render after reload,
reader-not-writer offline, and resume-after-reload.

Refs #10927
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 03:11
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 400c8d81-71fa-46bb-a148-62a5e0648e1d
Commits

Reviewing files that changed from the base of the PR and between a2f5016 and 644b4a6.

Files selected for processing: 3

  • pkgs/id/web/src/world-offline.test.ts
  • pkgs/id/web/src/world-snapshot-store.ts
  • pkgs/id/web/src/world.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 23, 2026
id(phase-14): shells v1 slice 1 — PWA offline read model + catch-up in the browser shell (#6296) #10927
Closed
id(phase-14): shells v1 slice 2 — first native shell (Linux desktop) on the shared frame layer (#6296) #10928
Closed
id(native-shell): record the Linux desktop shell's capability statement (#10928) #12884
Merged
@dezren39
dezren39 removed the request for review from a team November 23, 2026 05:56
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 1 follow-up: rebase-and-merge queue for 90 blocked PRs (batches A–H) #13903
Closed
@dezren39
merge origin/main into xaltha/10927-pwa-snapshot-store
644b4a6
Keeps main's resume_token handling and this PR's offline snapshot persist in both patch and screen frame branches.
@dezren39
dezren39 merged commit 3ca74e5 into main Nov 24, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the xaltha/10927-pwa-snapshot-store branch November 24, 2026 05:03
@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Merge record (Batch A, task 21622): merged to main at 3ca74e5. Conflict in pkgs/id/web/src/world.ts (two hunks) resolved additively: kept main's resume_token assignment and this PR's offline snapshot persist in both the patch and screen frame branches. Merge commit 644b4a6. Tests: bunx vitest run src/world-offline.test.ts 5/5; full bunx vitest run in pkgs/id/web 46 files, 922 passed, 9 skipped.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 24, 2026
id(phase-14): shells v1 slice 4 — notification capability provider (F12.5) for the mobile shell (#6296) #10930
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.