From c378ef0b39ba016942d160bad0c8322067fe567a Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 18 Feb 2026 19:20:46 +0000 Subject: [PATCH] Fix perpetual loading in DiffPanel and remove dead code in providerManager - Use isLoading instead of isPending for checkpoint diff query so disabled queries show 'No patch available' instead of an infinite loading spinner - Remove unreachable candidateCwds.length === 0 guard (ternary always produces a single-element array) --- apps/server/src/providerManager.ts | 3 --- apps/web/src/components/DiffPanel.tsx | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/server/src/providerManager.ts b/apps/server/src/providerManager.ts index 0b2d11cc0e..532f32f7fa 100644 --- a/apps/server/src/providerManager.ts +++ b/apps/server/src/providerManager.ts @@ -433,9 +433,6 @@ export class ProviderManager extends EventEmitter { .listSessions() .find((candidate) => candidate.sessionId === sessionId); const candidateCwds = session?.cwd ? [session.cwd] : [process.cwd()]; - if (candidateCwds.length === 0) { - return null; - } await this.withFilesystemLock(sessionId, async () => { const currentCwd = this.sessionCheckpointCwds.get(sessionId); diff --git a/apps/web/src/components/DiffPanel.tsx b/apps/web/src/components/DiffPanel.tsx index 2d030d21fc..37a4369a56 100644 --- a/apps/web/src/components/DiffPanel.tsx +++ b/apps/web/src/components/DiffPanel.tsx @@ -147,7 +147,7 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) { const conversationCheckpointDiff = selectedTurn ? undefined : activeCheckpointDiffQuery.data?.diff; - const isLoadingCheckpointDiff = activeCheckpointDiffQuery.isPending; + const isLoadingCheckpointDiff = activeCheckpointDiffQuery.isLoading; const checkpointDiffError = activeCheckpointDiffQuery.error instanceof Error ? activeCheckpointDiffQuery.error.message