In the Tasks page, selecting the PRs tab and choosing Upstream in the source selector can show No matching GitHub work even when matching upstream PRs exist.
The upstream/origin selector is visible in the PRs view, but the GitHub client still resolves PR list/count queries from origin, so is:pr is:open author:@me searches the fork/origin repo instead of the selected upstream repo.
Reproduction
Open a forked repository in Orca where origin points to the fork and upstream points to the canonical repo.
Open Tasks.
Select PRs.
Select Upstream in the source selector.
Use a PR-only query such as is:pr is:open author:@me.
Actual behavior
The list can be empty with No matching GitHub work, despite matching PRs existing in the upstream repository.
Expected behavior
When Upstream is selected, PR list and PR count queries should use the upstream owner/repo, so the PRs tab returns matching upstream PRs.
Code evidence
src/main/github/client.ts resolves issueResolved with the selected preference, but resolves prOwnerRepo separately via getOwnerRepo(repoPath, connectionId), which is the origin repo.
listWorkItems passes that prOwnerRepo into both recent and queried PR fetches.
countWorkItems uses the same prOwnerRepo for PR count queries, so pagination/count can also be wrong.
src/renderer/src/components/TaskPage.tsx renders the selector using origin={s.sources.prs} and upstream={s.sources.upstreamCandidate}, which makes the control appear relevant in the PRs surface while the backend still routes PR queries to origin.
Suggested regression coverage
Add tests for:
listWorkItems('/repo-root', 10, 'is:pr is:open author:@me', undefined, 'upstream') using the upstream slug in --repo.
countWorkItems('/repo-root', 'is:pr is:open author:@me', 'upstream') building a search query with repo:<upstream-owner>/<repo>.