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)
This commit is contained in:
Cursor Agent committed 2026-02-18 19:20:46 +00:00
1 parent b1f6e72b0b
commit c378ef0b39
2 files changed
+1 -4

No files matched your search

-3
View File
@@ -433,9 +433,6 @@ export class ProviderManager extends EventEmitter<ProviderManagerEvents> {
.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);
+1 -1
View File
@@ -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