Skip to content

fix: refresh PR state when branches gain a PR number - #573

Merged
matt2e merged 5 commits into
mainfrom
pr-state-is-still-not-getting-updated
Apr 2, 2026
Merged

fix: refresh PR state when branches gain a PR number#573
matt2e merged 5 commits into
mainfrom
pr-state-is-still-not-getting-updated

Conversation

@matt2e

@matt2e matt2e commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • refresh PR status immediately after persisting a newly created PR number
  • trigger an immediate status refresh when a branch hydrates with a PR number after mount
  • avoid missing PR state updates for PR-backed branch creation flows

@matt2e
matt2e requested review from baxen and wesbillman as code owners April 2, 2026 01:10
@matt2e
matt2e merged commit 77e699f into main Apr 2, 2026
4 checks passed
@matt2e
matt2e deleted the pr-state-is-still-not-getting-updated branch April 2, 2026 01:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant