Repository navigation
feat(offline): support durable PWA notes and automatic sync - #94
Merged
Merged
Conversation
sianachi
marked this pull request as ready for review
October 11, 2026 02:21
sianachi
added a commit
that referenced
this pull request
Oct 21, 2026
* feat(offline): add durable PWA notes and reconnect sync * fix(offline): enumerate pending note scopes on WebKit * fix(offline): recover interrupted local note publication * test(web): bind account renewal fixture to cache epoch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Nix now downloads every accessible, unlocked prose note into a device library, so users can read, edit, rename and create notes after a cold offline launch. Reconnecting with the PWA open publishes new notes once and merges pending writing with the server without clearing local drafts.
Notes on this deviceprovides title search and parent selection. IndexedDB retains note metadata, confirmed Yjs bodies, pending updates, publication receipts and supported note assets. Readiness is reported only after the complete visible library has downloaded. Locked notes and canvas, spreadsheet and file bodies are outside this prose library.Core remains the permission authority. Reconnect refreshes visibility and locks, transfers checkpoints and update tails without opening a socket for every downloaded note, checks document identity and clears journal entries only after exact durable acknowledgement. Scoped creation receipts prevent duplicate items after a lost response and recover interrupted publication even when its local creation cache is missing. Temporary BFF failures retain cached access; definitive refusals fence cached content while preserving pending owner recovery. Credential expiry requests renewal, and both sign-out controls flush writing before offering local removal.
Validation:
All eight pull-request CI checks passed on final head
38e650df9c436dc020bbea52453cc75dead81a0d, including the full backend integration suite.WebKit acceptance used an isolated Playwright 1.64 runtime because the repository's Playwright 1.62 offline emulation has the upstream failure fixed in microsoft/playwright#42894. The application dependencies are unchanged. Real iPhone/iPad retention and battery measurements remain unverified. Browser storage can be cleared by the user or operating system; the first download and reconnect sync require the PWA to be open.