Working offline

What works with no connection, what deliberately does not, and how conflicts resolve when two devices edited the same thing.

Checked against the running product on 13 min readMarkdown

On this page

Every device keeps a real SQLite database of your workspace. It holds the actual rows, and every screen queries them locally. When you open a board with no signal, nothing is being retried in the background, because the data is already there.

Edits land in that local database at once and queue for upload. There is no "saving" spinner, because there is no server round trip to wait for.

What works with no connection#

Everything here reads and writes offline

Work
boards, cards, columns, labels, checklists, the Planner, Today, the Calendar, notes and folders, the Inbox, the journal, whiteboards and templates.
Routines
habits and their check-ins, focus sessions.
Money
expenses, income, debts and budgets.
The household
recipes, the week's meal plan, the shopping list, chores, allowances, the family ledger, savings goals, points, houses and seasons.
People
chat messages, reactions and your notifications.

A refresh reads this local copy first and never waits for the server to show what you already have. Each screen also remembers what it last showed, so a refresh or a fresh open draws that straight away and swaps in anything newer a moment later; a tap made in that moment waits for the copy and then goes through. A screen with nothing remembered shows its placeholders or says Catching up… for the moment it takes to read; it does not call a list empty until the copy has answered. Signing out forgets the remembered screens on that device.

Search runs against the same local database, so finding a card, a note or a habit works offline too. The one exception is Words in files, the results that find a picture or a scan by a word inside it: those words are kept on the server, so that group stays empty until you are back online. See Files and scans.

Every page of the app is stored on the device the first time you sign in on a connection, so a page you have never opened there still opens offline. Up to twenty of your boards are stored the same way, opened or not. A single recipe, list or saved view you have never opened on that device needs a connection the first time.

The shopping list was built for the supermarket basement with one bar of signal. Adding items, checking them off and claiming the run all work there.

What waits for a connection, and why#

Not everything is in the local database. Some things live on the server by design, and some need a service that only runs there. None of them stop the rest of the app working; they wait, or say they cannot reach the server.

Account and people. These live on the server and only there:

  • billing and plan changes
  • inviting members, changing someone's role, and guests
  • sharing a board or a note with someone, and making or revoking a public link
  • answering a claim that someone owes you money
  • a child's other home: offering or answering a share, its switches, and See the child's other home (see Family workspaces)
  • Agent Pacts

A client that could write its own plan or role would make both meaningless. Pacts are the same case: their whole value is that the server refuses the writes it should refuse, and a rule enforced on a device you can edit is not enforced. See Agent Pacts.

Margin Intelligence and everything it reads. The assistant runs on a server, so these all need a connection:

  • asking the assistant anything, including its web search, Plan a goal and the morning brief
  • reading the dates out of a school letter, a receipt or an email
  • reading the words in a picture or a scan, and the Words in files search results
  • cloud dictation (see Talking instead of typing)
  • turning a voice memo into a note
  • the Mind's weaving, suggestions and recall

Files. Uploading an attachment, scanning paper into a PDF, and opening an attachment you have not opened on this device before. A picture shared from another app on the phone needs a connection too; shared words and links are kept and sync later.

Connected services. Connecting or using Slack, GitHub, Zapier, Google Calendar and other integrations, subscribed calendars (they refresh on the server about once an hour), and any agent you connect over MCP, which reaches your workspace through the server. See Integrations.

Writing a note together, and seeing who is here. On Family and Team, two people typing in one note see each other's words as they go. That comes through the server, and so do the faces of who else is on a board and the line in a chat that says who is writing. Offline you see none of it. You keep writing on your own, and the two versions are put together when you reconnect. See Writing in a note together.

When two devices disagree#

The last write to reach the server wins, field by field. Conflicts are rare in practice, because the usual case is one person on one device at a time.

Notes are where a clash costs the most, so notes show it. If a note changed on another device while you were writing, a bar appears above it with the first line that differs and three answers: Keep both, Keep mine and Take theirs. Ignoring the bar is fine too; your draft keeps saving.

Anything else you are editing is never synced over while it is open. That covers a card (on the web and the phone), the family wall's edit sheets (events, meals, list items, reminders, notes and habits), a habit, a recipe, a shopping item, a chore on the phone, a House Cup season, an inbox capture, a calendar event, an allowance, a budget limit, rewards, houses and templates on the phone, board settings, meal rules, your family role settings on the web, and money in, out and owed (expenses, income and the payment you are typing on a debt). A change that arrives from another device fills in the fields you have not touched and leaves the ones you have alone, and saving writes only the fields you changed, so their edit to a different field survives yours. If they changed the same field you did, a bar names the field, shows what it says now on the other device, and offers Keep mine or Use theirs. Saving waits for your answer, and the bar says that what you typed is not saved yet, so neither version is dropped without you choosing. A card's body and title save as you type; close the card before answering and what you typed is kept, and the card asks again the next time you open it. If the item was removed on another device, the editor stays open with what you typed and says so.

Something shared with you to read only is read only everywhere you open it. A board you are a viewer on, its cards, a checklist or a recipe shared with you at view, all show a small View only note, and the fields and buttons that would change them are switched off, on the web and on the phone. That is because the server turns down a viewer's change, so typing into the field would only show your words until the next sync took them away. You can still read, comment on a card, and copy the thing into your own workspace.

Whiteboards merge rather than pick a winner. Every shape on a board carries its own version, so when two copies meet (yours and the server's when you reopen a board, or a device's queued save and an assistant's change on the server) each shape keeps its newest edit. Nothing you drew offline is replaced by a copy that was only "newer" because something else touched the board.

Whiteboard photos are kept on the device too. Pictures on a board are stored on their own, and every board this device has synced has its photos fetched ahead, so a board you never opened online still shows them in airplane mode.

Nothing is lost without a word#

If the server refuses a change (a plan limit, a permission that changed, a row someone else deleted), the change is still kept: on this device and on the server. The header shows Not saved with a count. Open it to see each change, why it was refused, and three ways out: Try again, Export (a file with the change in it) and Dismiss.

If changes are waiting to upload for more than two minutes, the header says Not synced yet. It shows how many are waiting, for how long, and the last error, and Save everything as a file keeps a copy of them. They are safe on this device either way, and they go up on their own when they can. We are told too, so we can fix the cause.

Getting an earlier version back#

Whiteboards, card descriptions, recipes and checklists keep earlier versions, and so do notes (from the note's actions). A version is kept before any assistant or server change, before anything is removed, and every ten minutes while you edit, up to the last 50.

Restore a version

  1. Open the whiteboard, card, recipe or checklist.
  2. Choose Version history: the clock button on a whiteboard or beside a card's description, or the actions menu on a recipe or checklist. In the phone app it is in the whiteboard's actions, a card's More sheet, at the foot of a recipe, and in a checklist's actions.
  3. Pick a version by its time and preview and press Restore.

Restoring keeps what was there as a version too, so a restore can be undone the same way. Margin Intelligence can do it for you as well ("put my kitchen board back to how it was this morning").

For a whiteboard there is also a timeline under the canvas: scrub through every step, roll back, bring one element home, and name milestones that are kept past the 50-version limit. See Whiteboards and canvases.

Recently deleted#

Deleted something by mistake? Notes, cards, checklists, whiteboards, recipes, routines (with their steps), goals and whole boards wait in Recently deleted for 30 days, whoever deleted them and on whichever device. Each one shows who deleted it, when, and how many days are left.

Bring back something you deleted

  1. Open Settings, then Data, then Recently deleted. In the phone app it is also at the foot of the notes, boards, checklists, whiteboards and recipes lists, opened on that kind.
  2. Find it by its name. The filters narrow the list to one kind.
  3. Press Restore.

It comes back where it was, under the same link. A board returns with its columns, cards, labels, card checklists and comments; a checklist with its items; a card in its column, or in the board's first column if that one has gone too. A card whose board was deleted comes back when you restore the board.

You see a deleted card only if you are on its board, and a deleted board only if you were on it. A locked or vaulted note is never copied, so it does not appear here. After 30 days an item can no longer be restored, and its copy is deleted for good. Deleting a workspace deletes the copies of everything in it at once.

Restoring is editing: a viewer can see this list but cannot restore, in the app or through an assistant.

Margin Intelligence and connected assistants can do the same with list_recently_deleted and restore_item ("bring back the packing checklist I deleted yesterday").

New versions and refreshing#

Pull down on a phone, or press Refresh in the header on a computer, and the app fetches fresh data. It never reloads the page under you. While you pull, the little page in the pill lifts its corner; it lies flat again when the data is fresh.

When you come back online after being offline and everything you changed has gone up, a small ink dot fills beside the sync tick, once.

A new version of the app waits until you leave it for a while or follow a link, and then loads quietly. If you want it straight away, the Refresh now prompt takes it.

The sync badge#

The badge in the header says Synced when this device is up to date, Syncing while changes are moving or the connection is opening, and Offline only when The Margin cannot be reached. A slow page or a connection that takes a few seconds to open reads Syncing, not Offline. Whatever the badge says, what you write is saved on this device first. When work is at risk, a second pill appears beside it: Not saved or Not synced yet (see above).

A link or a refresh can reach a note, board, whiteboard, checklist, recipe or saved view before this device has it. The page waits rather than guessing. On the web, a whiteboard shows its latest saved version, read-only, and becomes editable as soon as it has synced. The Margin only says something isn't here once this visit has synced and the server agrees it was deleted or isn't shared with you. Offline, it keeps waiting instead. A link into another of your workspaces opens that workspace.

Checking it honestly#

Chrome DevTools "Offline" does not simulate this correctly. The service worker keeps using the real network while the page believes it is offline, so the test passes whether or not offline works.

Use airplane mode on a real device. That is how we found our own offline bug: the app cached every page except the database engine, so it loaded fine and then had nothing to read from.

Before you rely on it

  1. Install the app (see Your first hour).
  2. Open it on a connection and let the first sync finish. Boards, notes and your workspaces arrive first, then Today and the family pages, then whiteboards and templates.
  3. Turn on airplane mode and open a board, a note and the shopping list.

Storage#

A local database for a heavy workspace is not small, and a workspace with many whiteboards is the heavy case. Browsers may clear storage for sites you have not visited in a long time. An installed app is far less likely to be cleared, which is the other reason to install it.

Signing out on a shared computer#

Signing out removes the copies of your pages, answers and whiteboard pictures the browser kept for offline use, and the names and faces it remembered, so the next person to use that browser cannot open them. The app's own files stay, so the next sign-in still works offline as soon as it has synced.

Signing out of one account on a phone#

The phone app keeps several accounts side by side, and only the one in front sends its changes. If the account you sign out of has changes that haven't reached the server yet, the app says how many first. You can stay signed in, switch to that account so they send, or discard them, which takes a second tap. Nothing unsent is deleted without that choice.

Starting this device over#

Settings, then Data, then Reset & Resync clears this account's copy on this device and downloads it again from the server. If some of your changes haven't reached the server yet, it says how many and offers to wait for them; resetting anyway loses them. It leaves alone what belongs to the device or to someone else: your theme and text size, drafts, and the data of any other account signed in on the same device.

You rarely have to do this yourself. If the database file on a device gets damaged, which we have seen on phones, The Margin notices, deletes that copy and downloads a fresh one the next time it opens, without asking. Changes that had not reached the server yet are kept and sent once the new copy opens. Sync that gets stuck taking the same data over and over is repaired the same way, after your unsent changes go up first. A device that just cannot reach the server is left alone, because that is being offline, not being broken. A damaged file is rebuilt at most once an hour and a stuck sync at most once a day, so a fault on our side can never keep wiping your copy.