From b0f138e526a89c2ac9c4b8ed192668ca02610981 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 18 Feb 2026 20:33:09 +0000 Subject: [PATCH] fix: don't persist checkpointDiffLoaded flag that prevents diff re-fetching after restart The checkpointDiffLoaded flag was persisted but the actual diff content (unifiedDiff, per-file diff) was intentionally stripped during persistence. After restart and rehydration, summaries appeared as 'already loaded' so the checkpointDiffHydrationTargets memo in ChatView excluded them, and no background diff re-fetch was triggered. Fix: Remove checkpointDiffLoaded from both hydrateThread (handles existing stored data) and toPersistedState (prevents storing it going forward). On rehydration the flag will be undefined/falsy, allowing the hydration logic to correctly re-fetch diffs when a session becomes available. --- apps/web/src/persistenceSchema.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/web/src/persistenceSchema.ts b/apps/web/src/persistenceSchema.ts index afc083839b..2f65a0f198 100644 --- a/apps/web/src/persistenceSchema.ts +++ b/apps/web/src/persistenceSchema.ts @@ -305,7 +305,6 @@ function hydrateThread( ...(typeof summary.checkpointTurnCount === "number" ? { checkpointTurnCount: summary.checkpointTurnCount } : {}), - ...(summary.checkpointDiffLoaded ? { checkpointDiffLoaded: true } : {}), })), }; } @@ -401,7 +400,6 @@ export function toPersistedState( ...(typeof summary.checkpointTurnCount === "number" ? { checkpointTurnCount: summary.checkpointTurnCount } : {}), - ...(summary.checkpointDiffLoaded ? { checkpointDiffLoaded: true } : {}), })), })), activeThreadId: state.activeThreadId,