From b773b07880c2494985fc6fa757872ed130ace1cb Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 8 Apr 2026 22:36:00 +0200 Subject: [PATCH] Fix PR detection during active sessions The state-tracker hook writes "waiting" when Claude finishes a turn, but the PR check was gated on "ready" (only set as a default on session init, never via IPC). This meant PRs created mid-session were never detected until the app restarted. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/renderer/src/hooks/useSessions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/hooks/useSessions.ts b/src/renderer/src/hooks/useSessions.ts index 7fcdc61..a7a0130 100644 --- a/src/renderer/src/hooks/useSessions.ts +++ b/src/renderer/src/hooks/useSessions.ts @@ -330,7 +330,7 @@ export function useSessions() { // Check for new PR when Claude finishes a turn (non-blocking) // Re-fetch if no PR or if the known PR is merged (branch may have a new PR) - if (state === 'ready') { + if (state === 'waiting') { const session = sessionsRef.current.find((s) => s.claudeSessionId === claudeSessionId) if (session && (!session.pr || session.pr.state === 'merged')) { api.getCurrentBranch(session.cwd).then((branch) => {