Skip to content

docs(connection): document client storage failures and zero.kvStore - #321

Closed
arv wants to merge 1 commit into
mainfrom
arv/docs-1.11-storage-failures
Closed

arv wants to merge 1 commit into
mainfrom
arv/docs-1.11-storage-failures

Conversation

@arv

@arv arv commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Documents onStorageFailure, StorageFailureError and zero.kvStore, all added in Zero 1.11 (rocicorp/mono#6585, #6657, #6686). This is a draft until 1.11 ships.

Changes

contents/docs/connection.mdx gets a new Storage Failures section:

  • The three kind values (full, cannot-open, io-error). In the browser, the only storage failure reported is IndexedDB failing to open, which can be full or cannot-open.
  • What happens when storage fails while Zero starts (it runs in memory for the session) and what happens when it fails later (it stops saving to the device, and queries and mutations keep working).
  • An onStorageFailure example.
  • StorageFailureError is exported. Its cause holds the original error, and a custom kvStore can throw it to get the same handling.
  • A Checking the Store subsection on zero.kvStore.kind. It covers that kind can change from 'idb' to 'mem' after the first read or write.

contents/docs/react-native.mdx gets a one-line link to the new section.

All of this was checked against the code at rocicorp/mono 22fa3c27e:

  • the onStorageFailure doc comment in zero-client/src/client/options.ts;
  • replicache/src/storage-failure.ts;
  • IDBOpenError in kv/idb-store.ts;
  • Zero.kvStore in zero.ts.

Notes

Checks

prettier --check passes, and both pages compile as MDX.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RRckJnCeGsYg9nCJSxBgTJ


Generated by Claude Code

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
zero-docs Ready Ready Preview Oct 14, 2026 4:43pm UTC

Request Review

arv commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

The Verify Signed Commit Authors check fails, but not because of what this PR changes. A cloud Claude Code session signed commit 213fd05 with its own SSH key, which isn't in rocicorp/.github's allowed signers. A re-run won't fix it. To fix it, re-sign the commit with an allowed key:

git fetch origin arv/docs-1.11-storage-failures
git checkout arv/docs-1.11-storage-failures
git commit --amend --no-edit -S
git push --force-with-lease origin arv/docs-1.11-storage-failures

Generated by Claude Code

Comment thread contents/docs/connection.mdx Outdated
@arv
arv force-pushed the arv/docs-1.11-storage-failures branch from 213fd05 to 9fd1842 Compare October 14, 2026 16:43
@arv arv mentioned this pull request Oct 14, 2026
4 of 7 tasks

arv commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #325, which has all the 1.11 docs and the release notes in one PR. This commit is there as of 9fd1842, with the review fix.


Generated by Claude Code

@arv arv closed this Oct 14, 2026

This branch was successfully deployed

1 active deployment
Preview — 9fd18427 Deployed Oct 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant