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", () => {
264264 expect(hydrated?.threads[0]?.activeTerminalGroupId).toBe(`group-${DEFAULT_THREAD_TERMINAL_ID}`);
265265 });
266266
267 it("hydrates persisted turn diff summaries", () => {
267 it("hydrates persisted turn diff summaries and clears persisted loaded flags", () => {
268268 const payload = JSON.stringify({
269269 version: 7,
270270 runtimeMode: "full-access",
......@@ -313,7 +313,6 @@ describe("hydratePersistedState", () => {
313313 turnId: "turn-1",
314314 completedAt: "2026-02-08T10:05:00.000Z",
315315 checkpointTurnCount: 1,
316 checkpointDiffLoaded: true,
317316 files: [
318317 {
319318 path: "src/app.ts",
......@@ -417,7 +416,6 @@ describe("toPersistedState", () => {
417416 completedAt: "2026-02-08T10:05:00.000Z",
418417 status: "completed",
419418 checkpointTurnCount: 1,
420 checkpointDiffLoaded: true,
421419 files: [
422420 {
423421 path: "src/app.ts",
......@@ -493,7 +491,6 @@ describe("toPersistedState", () => {
493491 completedAt: "2026-02-08T10:05:00.000Z",
494492 status: "completed",
495493 checkpointTurnCount: 1,
496 checkpointDiffLoaded: true,
497494 files: [
498495 {
499496 path: "src/app.ts",
apps/web/src/persistenceSchema.ts-2
......@@ -305,7 +305,6 @@ function hydrateThread(
305305 ...(typeof summary.checkpointTurnCount === "number"
306306 ? { checkpointTurnCount: summary.checkpointTurnCount }
307307 : {}),
308 ...(summary.checkpointDiffLoaded ? { checkpointDiffLoaded: true } : {}),
309308 })),
310309 };
311310}
......@@ -401,7 +400,6 @@ export function toPersistedState(
401400 ...(typeof summary.checkpointTurnCount === "number"
402401 ? { checkpointTurnCount: summary.checkpointTurnCount }
403402 : {}),
404 ...(summary.checkpointDiffLoaded ? { checkpointDiffLoaded: true } : {}),
405403 })),
406404 })),
407405 activeThreadId: state.activeThreadId,