authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-18 15:32:37-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-18 21:59:17-08:00
logba1a2dbcf7230034663b99be24204a8cb1b2d8f3
tree25a3830191857e55fa84b7c30e337492bab0daab
parentb441875731c2fb174adbb61e1d46121be363474e

Stop persisting checkpointDiffLoaded in turn diff summaries

- Remove `checkpointDiffLoaded` from hydration and persistence paths - Update persistence schema tests to assert loaded flags are cleared

2 files changed, 1 insertions(+), 6 deletions(-)

apps/web/src/persistenceSchema.test.ts+1-4
...@@ -264,7 +264,7 @@ describe("hydratePersistedState", () => {...@@ -264,7 +264,7 @@ describe("hydratePersistedState", () => {
264 expect(hydrated?.threads[0]?.activeTerminalGroupId).toBe(`group-${DEFAULT_THREAD_TERMINAL_ID}`);264 expect(hydrated?.threads[0]?.activeTerminalGroupId).toBe(`group-${DEFAULT_THREAD_TERMINAL_ID}`);
265 });265 });
266266
267 it("hydrates persisted turn diff summaries", () => {267 it("hydrates persisted turn diff summaries and clears persisted loaded flags", () => {
268 const payload = JSON.stringify({268 const payload = JSON.stringify({
269 version: 7,269 version: 7,
270 runtimeMode: "full-access",270 runtimeMode: "full-access",
...@@ -313,7 +313,6 @@ describe("hydratePersistedState", () => {...@@ -313,7 +313,6 @@ describe("hydratePersistedState", () => {
313 turnId: "turn-1",313 turnId: "turn-1",
314 completedAt: "2026-02-08T10:05:00.000Z",314 completedAt: "2026-02-08T10:05:00.000Z",
315 checkpointTurnCount: 1,315 checkpointTurnCount: 1,
316 checkpointDiffLoaded: true,
317 files: [316 files: [
318 {317 {
319 path: "src/app.ts",318 path: "src/app.ts",
...@@ -417,7 +416,6 @@ describe("toPersistedState", () => {...@@ -417,7 +416,6 @@ describe("toPersistedState", () => {
417 completedAt: "2026-02-08T10:05:00.000Z",416 completedAt: "2026-02-08T10:05:00.000Z",
418 status: "completed",417 status: "completed",
419 checkpointTurnCount: 1,418 checkpointTurnCount: 1,
420 checkpointDiffLoaded: true,
421 files: [419 files: [
422 {420 {
423 path: "src/app.ts",421 path: "src/app.ts",
...@@ -493,7 +491,6 @@ describe("toPersistedState", () => {...@@ -493,7 +491,6 @@ describe("toPersistedState", () => {
493 completedAt: "2026-02-08T10:05:00.000Z",491 completedAt: "2026-02-08T10:05:00.000Z",
494 status: "completed",492 status: "completed",
495 checkpointTurnCount: 1,493 checkpointTurnCount: 1,
496 checkpointDiffLoaded: true,
497 files: [494 files: [
498 {495 {
499 path: "src/app.ts",496 path: "src/app.ts",
apps/web/src/persistenceSchema.ts-2
...@@ -305,7 +305,6 @@ function hydrateThread(...@@ -305,7 +305,6 @@ function hydrateThread(
305 ...(typeof summary.checkpointTurnCount === "number"305 ...(typeof summary.checkpointTurnCount === "number"
306 ? { checkpointTurnCount: summary.checkpointTurnCount }306 ? { checkpointTurnCount: summary.checkpointTurnCount }
307 : {}),307 : {}),
308 ...(summary.checkpointDiffLoaded ? { checkpointDiffLoaded: true } : {}),
309 })),308 })),
310 };309 };
311}310}
...@@ -401,7 +400,6 @@ export function toPersistedState(...@@ -401,7 +400,6 @@ export function toPersistedState(
401 ...(typeof summary.checkpointTurnCount === "number"400 ...(typeof summary.checkpointTurnCount === "number"
402 ? { checkpointTurnCount: summary.checkpointTurnCount }401 ? { checkpointTurnCount: summary.checkpointTurnCount }
403 : {}),402 : {}),
404 ...(summary.checkpointDiffLoaded ? { checkpointDiffLoaded: true } : {}),
405 })),403 })),
406 })),404 })),
407 activeThreadId: state.activeThreadId,405 activeThreadId: state.activeThreadId,