From 207920b40ce566bfb548b2b36a6f3ec118181c7e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 19 Feb 2026 08:02:03 +0000 Subject: [PATCH] Fix fingerprint dedup blocking retry on empty sync result and unnecessary checkpoint diff invalidation - Clear the dedup fingerprint when listCheckpoints returns no matching checkpoints, so subsequent calls with the same turn set are not silently skipped. - Scope checkpoint/captured invalidation to only non-successful queries, avoiding O(N^2) redundant getCheckpointDiff refetches for immutable per-turn diffs. --- apps/web/src/App.tsx | 5 ++++- apps/web/src/components/ChatView.tsx | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 274d71e870..ae4ec21cdb 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -67,7 +67,10 @@ function EventRouter() { void invalidateGitQueries(queryClient); } if (event.method === "checkpoint/captured") { - void queryClient.invalidateQueries({ queryKey: providerQueryKeys.all }); + void queryClient.invalidateQueries({ + queryKey: providerQueryKeys.all, + predicate: (query) => query.state.status !== "success", + }); } dispatch({ type: "APPLY_EVENT", diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 5dbc885618..f4acef889e 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1463,6 +1463,7 @@ export default function ChatView() { .map((checkpoint) => [checkpoint.id, checkpoint.turnCount] as const), ); if (Object.keys(checkpointTurnCountByTurnId).length === 0) { + checkpointTurnCountSyncFingerprintRef.current.delete(syncKey); return; } dispatch({