diff --git a/apps/frontend/src/renderer/components/github-prs/hooks/useGitHubPRs.ts b/apps/frontend/src/renderer/components/github-prs/hooks/useGitHubPRs.ts index 8ddadb99..00170386 100644 --- a/apps/frontend/src/renderer/components/github-prs/hooks/useGitHubPRs.ts +++ b/apps/frontend/src/renderer/components/github-prs/hooks/useGitHubPRs.ts @@ -178,9 +178,10 @@ export function useGitHubPRs( } // Batch preload review results for PRs not in store (single IPC call) + // Skip PRs that are currently being reviewed - their state is managed by IPC listeners const prsNeedingPreload = result.filter((pr) => { const existingState = getPRReviewState(projectId, pr.number); - return !existingState?.result; + return !existingState?.result && !existingState?.isReviewing; }); if (prsNeedingPreload.length > 0) { @@ -291,8 +292,9 @@ export function useGitHubPRs( // Load existing review from disk if not already in store const existingState = getPRReviewState(projectId, prNumber); - // Only fetch from disk if we don't have a result in the store - if (!existingState?.result) { + // Only fetch from disk if we don't have a result in the store AND no review is running + // If a review is in progress, the state is managed by IPC listeners - don't overwrite it + if (!existingState?.result && !existingState?.isReviewing) { window.electronAPI.github.getPRReview(projectId, prNumber).then((result) => { if (result) { // Update store with the loaded result