From ba1a2dbcf7230034663b99be24204a8cb1b2d8f3 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 18 Feb 2026 15:32:37 -0800 Subject: [PATCH] Stop persisting checkpointDiffLoaded in turn diff summaries - Remove `checkpointDiffLoaded` from hydration and persistence paths - Update persistence schema tests to assert loaded flags are cleared --- apps/web/src/persistenceSchema.test.ts | 5 +---- apps/web/src/persistenceSchema.ts | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/web/src/persistenceSchema.test.ts b/apps/web/src/persistenceSchema.test.ts index 385f0e700a8c532beb0c28c7ecb657a9b8fbd59c..2b7b951c8d856c5491138cd95cff312fe980fb96 100644 --- a/apps/web/src/persistenceSchema.test.ts +++ b/apps/web/src/persistenceSchema.test.ts @@ -264,7 +264,7 @@ describe("hydratePersistedState", () => { expect(hydrated?.threads[0]?.activeTerminalGroupId).toBe(`group-${DEFAULT_THREAD_TERMINAL_ID}`); }); - it("hydrates persisted turn diff summaries", () => { + it("hydrates persisted turn diff summaries and clears persisted loaded flags", () => { const payload = JSON.stringify({ version: 7, runtimeMode: "full-access", @@ -313,7 +313,6 @@ describe("hydratePersistedState", () => { turnId: "turn-1", completedAt: "2026-02-08T10:05:00.000Z", checkpointTurnCount: 1, - checkpointDiffLoaded: true, files: [ { path: "src/app.ts", @@ -417,7 +416,6 @@ describe("toPersistedState", () => { completedAt: "2026-02-08T10:05:00.000Z", status: "completed", checkpointTurnCount: 1, - checkpointDiffLoaded: true, files: [ { path: "src/app.ts", @@ -493,7 +491,6 @@ describe("toPersistedState", () => { completedAt: "2026-02-08T10:05:00.000Z", status: "completed", checkpointTurnCount: 1, - checkpointDiffLoaded: true, files: [ { path: "src/app.ts", diff --git a/apps/web/src/persistenceSchema.ts b/apps/web/src/persistenceSchema.ts index afc083839bf9ecc61722f363ca75092fdfa58b85..2f65a0f1987b40c406e9b283e005a46a123dac66 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, -- 2.54.0