refactor(pull-requests): move the last PR callers off the host's gh
Merged
SA
1mo ago+97+97+01234567890123456789-81-81-01234567890123456789
Step 1 of the PR-pane cleanup. Stacked on #8765.
Summary
Moves the last direct callers of the host procedures #8765 deprecated onto the viewer's API path:
ChangesControl → PRStatusGroup(desktop tab-bar PR badge): merge and mark ready usemergePullRequest/setPullRequestDraftfrompullRequestClient, in place of hostgithub.mergePR/github.markPullRequestReady. The host'srefreshByWorkspacessync after a write stays; that's the host's own state, not GitHub auth.- New-workspace prompt context (
fetchPrBody): reads the linked PR's body withreadPullRequestContent, keyed by the PR's URL, in place of hostpullRequests.getContent. - Mobile per-row diffstat (
usePullRequestDiffstat):integration.github.getPullRequestDetail(without activity) in place of hostgithub.getPR. This drops the host URL plumbing fromPullRequestsSheet/RowDiffstat.
After this, the only callers of the deprecated host PR procedures are the desktop pullRequestClient fallbacks, which step 4 removes.
Behaviour note: in a session workspace (no project) with no GitHub connection, merge from the badge now fails with the "Connect GitHub" error. It used to merge through the host's gh.
Test plan
- desktop: tests for the prompt context,
lib/githuband ChangesControl pass;tscclean in touched files - mobile:
bun test233/233;tscclean in touched files - In the app: merge and mark ready from the tab-bar badge are attributed to the viewer; the PR list sheet shows diffstats with the host offline