fix: refresh PR state when branches gain a PR number - #573
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48ad63d5ef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
|
|
||
| try { | ||
| await commands.refreshPrStatus(branchId); |
There was a problem hiding this comment.
Do not block PR completion on status refresh
handlePrCompletion now waits for commands.refreshPrStatus(branchId) before marking the PR as created, but that backend call can take up to 60 seconds (the gh wrapper enforces a 60s timeout). Because handleSessionEnd awaits this function before running prStateStore.clearSessionTracking, sessionRegistry.unregister, and drainQueuedSessions, a slow GitHub response can leave the branch stuck in "creating" and delay queued work even though the PR was already created. This refresh should be non-blocking (or moved after cleanup) so completion state is not held behind network latency.
Useful? React with 👍 / 👎.
Summary