Appearance
Working offline
Open a page, lose the network, keep writing. When you come back, the work arrives dated to when it happened rather than to when the wifi came back.
The interesting half is when
That editing works without a network is a persistence problem, and the CRDT plus a local database solves it. The interesting half is the timestamps.
The recorder runs on the server and stamps ops from the server's clock. That is right for an edit arriving as it happens, and wrong for a week of writing that arrives in one burst at an airport — everything would be dated to the landing, which is exactly the confusion the timeline exists to remove, reintroduced by the network.
So the client keeps its own record of when it changed each block, and offers those times before reconnecting.
The trust boundary, stated plainly
- Who you are still comes from the session and can never be claimed.
- When you wrote something is now a claim, when it comes from offline work.
That claim is bounded — 30 days by default, NOTESFLOW_OFFLINE_DAYS — never in the future, and clamped rather than rejected, because a laptop clock an hour fast is ordinary and the block has to be dated something.
A client can therefore backdate its own edits inside that window. The cost is accepted knowingly: the alternative is an offline mode that lies about every timestamp it produces, in a product whose whole thesis is that the dates are true.
Three details follow from taking it seriously:
- The claims are reported before the socket opens. A burst arriving ahead of its own timestamps is the bug this exists to prevent. If reporting fails, the socket stays shut and retries with backoff — and after five attempts it syncs anyway and says so. Writing matters more than dating it.
- A claim is consumed when it is used. Otherwise a block edited offline this morning and again online this afternoon would have both edits dated to this morning, and the second would be a lie the client never told.
- The claims name the same blocks the server will. The client works out what changed with the same function the recorder uses, so a claim can never be for a block nobody derived.
What works offline, and what does not
Works: opening and editing any page you have opened before, or have chosen to keep on this device. The document is stored locally because it was synced once, and the app shell is cached so you can reopen the app itself with no network. The save indicator says Saved on this device while you are offline.
A page written as Markdown works offline too. Its offline writing is checked block by block on reconnecting, and a block somebody else changed in the meantime is filed as a proposal rather than written over them.
Does not work, and is not queued:
- Creating, renaming, moving or trashing a page
- Editing properties
- Comments, search, the timeline, and sharing
- Embedded blocks from a page this device does not hold
Pretending otherwise would mean inventing conflict rules for a page tree nobody is watching.
The page tree is a cache, so the sidebar can be stale offline. It is navigation rather than content — the worst case is a page listed under a name it has since lost.
A claim covers a block, not a keystroke
A paragraph edited all afternoon is dated to the afternoon. That matches how the recorder coalesces a burst into one op when you are online, so the two modes describe time the same way.
What is cached
A small service worker caches the app shell — only what a running page reports having loaded, network-first for navigation and cache-first for content-hashed build output.
It never touches the API, whose answers are somebody's permissions and somebody's search results, and neither of those is a thing to keep a copy of.
What this device holds
Settings → This device says plainly what this browser holds:
- Storage: how much is used against what the browser allows, and whether the browser has agreed to keep this site's pages. If it has not, Ask to keep them. It is also asked the first time you write offline.
- Not yet sent: writing that has not reached the server, by page and block.
- Pages kept here, each with when it was last in step with the server.
- Set aside: a stored change that could not be read back. One damaged change costs only that change, never the page: the rest opens, and the damaged one is kept here, with Download and Discard.
- Given up to make room: pages the browser's limit pushed out. A page with unsent writing is never one of them.
Unsent writing is never deleted or forgotten while it is the only copy. If this device's copy of a page is lost, what it held is put back from a separate record. If the page has changed on the server since, it is filed as a proposal instead of being written over somebody.
Keeping pages here
Keep this page on this device, in the command palette, keeps a page without opening it. Keep this page and the pages under it on this device keeps a whole section. They are fetched in the background, kept in step, and never given up to make room. That is the way to take a project's pages on a trip.
Keeping it yourself
Under This device → Keep it yourself you can save a file:
- Your unsent writing. Every block not yet sent, with where it sat and when it was written, plus the same writing as Markdown to read. Save it before trying something drastic, or when a browser is about to be wiped. Import it in any browser signed in as you: you see what will happen to every block before anything does. It may be written, filed as a proposal because the page has moved on, or put on a new page only you can read. Importing the same file twice changes nothing, and the writing keeps the time it was written, within the 30-day window.
- Everything on this device for this workspace: every page held here, as its document and as Markdown, the unsent writing, and, if you choose, the attachments. Restore it on another computer and its pages open there with no connection at all.
Both files are made with no network and encrypted with a passphrase that is kept nowhere. Anyone can open them with age, the tool they are encrypted with. A plain zip of your unsent writing is made only if you ask for one.
A workspace can refuse the second kind in its settings. Saving your own unsent writing is always offered, and the setting is described as what it is: a request, not a lock.
Signing out
Signing out removes what this browser holds for Notesflow: page copies, unsent writing, set-aside changes, kept attachments and the caches. Only how the app looks is kept. If anything has not reached the server, you are told first, and offered the file.
A session that ended elsewhere, because it expired or was signed out from another device, takes its copies with it the next time the app starts. Unsent writing is kept for the next sign-in. If that is somebody else, they are asked first whether to save it to a file in its owner's name or remove it, and nothing opens until they answer.