feat(docs): add the persistence guide - #1594
Open
joesaunderson wants to merge 1 commit into
Open
Conversation
Add a dedicated guide covering event storage, a chat schema, loading events back, reconstructing conversations with defaultMessageReducer, and resuming sessions. Cross-link it from the hooks, continuations, and frontend pages. Closes vercel#1382 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R9KPb7XDbWjxngtZ93EDeH Signed-off-by: Joe Saunderson <joe.saunderson@mention-me.com>
Contributor
|
@joesaunderson is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
joesaunderson
marked this pull request as ready for review
August 4, 2026 12:07
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.
Closes #1382.
Summary
Adds a dedicated Persistence guide (
docs/guides/persistence.md) covering the full storage story that today only exists as a short section in the hooks guide:SessionStatecursor, and the event log — and why they are three separate thingschats+chat_events), withmeta.idas the dedupe key and an app-ownedseqfor orderingonEvent/onFinish) and from a server-side hook, including thesessionId → chatIdmapping a hook needs*.appendeddelta events in storage, and backfilling from the durable stream withstream({ follow: false })initialEvents/initialSessionin the browser, and foldingdefaultMessageReducer()fromeve/clientintoEveMessage[]anywhere elseBuilds on the stable event ids from #1239. Cross-links added from the hooks, continuations, and frontend overview pages, and the page is registered in
docs/guides/meta.json.Verification
pnpm docs:check— 82 files validated, all snippet import paths resolve, MDX compilesPR Checklist
CONTRIBUTING.mdevepackage (docs-only, no changeset)git commit --signoff)🤖 Generated with Claude Code
https://claude.ai/code/session_01R9KPb7XDbWjxngtZ93EDeH