-
Notifications
You must be signed in to change notification settings - Fork 221
Description
Problem
When a PR is created through the "Create PR" button, the changes panel immediately detects it — the onSuccess callback triggers refreshPr(), CI checks appear, and the UI updates instantly.
When a PR is created via the CLI (e.g. gh pr create in the agent terminal or a shell tab), the changes panel doesn't notice until the next background poll cycle (up to 30s) or window re-focus. During that gap, the panel still shows "Create PR" and CI checks aren't visible.
Desired Behavior
PR detection should work identically regardless of how the PR was created — button or CLI.
Possible Approaches
-
Manual refresh — Add a refresh button to the changes panel header so the user can trigger a PR status check when they know one was created. Simple, no performance cost.
-
PTY output detection — Watch terminal output for GitHub PR URL patterns (
https://github.com/.../pull/\d+). When detected, trigger an immediaterefreshPrStatus(). Event-driven, no extra polling.
Either way, the goal is instant detection without increasing background poll frequency.