mirror of
https://github.com/stablyai/orca.git
synced 2026-10-17 00:03:08 +00:00
A worktree only got linked to its PR via the terminal-output URL scanner (observeTerminalGitHubPullRequestLink). When a PR is created outside Orca (e.g. raw `gh pr create`) and then squash-merged with the remote branch deleted in the same session, that scanner loses the race and linkedPR is never set. Later refreshes look up by branch name, find nothing (branch is gone), and the checks panel shows "No pull request found". Persist the discovered PR number to linkedPR after a successful branch-name lookup so subsequent refreshes use `gh pr view <number>`, which stays authoritative after the branch is deleted. Guarded to only fill an empty link, never overwrite an explicit one. Co-authored-by: Orca <help@stably.ai>