feat(web): open unlinked GitHub PRs in the Pull Request panel - #9855
feat(web): open unlinked GitHub PRs in the Pull Request panel#9855shivamhwp wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b04133c. Configure here.
b04133c to
060edd5
Compare
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a broad new workflow for reading and acting on unlinked GitHub pull requests, spanning authenticated server operations, shared contracts, navigation, and panel state. The capability is advertised enabled by default, so the resulting access and product-behavior change warrants human review. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
0c87f64 to
fa7e8b7
Compare
fa7e8b7 to
c52b2f5
Compare
c52b2f5 to
85b19cb
Compare

GitHub PR links from repositories that haven't been added as projects currently open outside T3. That interrupts reviewing someone else's work from a conversation. For example, reviewing #9850 from an unrelated project opens GitHub.
Open those links in the Pull Request panel using the connected server's GitHub credentials. Cmd/Ctrl-click still opens externally, and the right-click menu offers the panel, system browser, and copy. Reading the PR and its diff no longer needs a checkout; checkout actions still require a linked project. Older servers retain the external fallback. Other Git hosts keep their existing linked-project requirement.
Rebased onto
0c200c5f, headcfd543a5. Validation across the rebase and review fixes:cfd543a5. No unresolved review threads remain. Macroscope requires human review for the new workflow and its access behavior.The review fixes reuse the repository-name validator, hide checkout-dependent finding controls for unlinked PRs, and require a project before identifying a PR as the thread's own.
Per-finding Fix controls are hidden without a linked project because an agent handoff needs a checkout. Remote review actions intentionally use the connected GitHub account's permissions without requiring a local project. The read-only restriction suggested in the automated review would remove that behavior. A regression test verifies both allowed actions and comments, then revokes access and verifies both are rejected before writing. Existing host authorization still governs description and comment edits.
Previous verification before this rebase: 403 focused tests passed; web, server, contracts, client-runtime, and mobile typechecks passed. Tested in Chromium against the real local server and GitHub: normal click, Cmd/Ctrl-click, context menu, clipboard, diff loading, and multiple unlinked PR tabs. No browser runtime errors.
Context menu · Diff view
Test report
Model: GPT-6. Harness: Codex.
Note
Add support for opening unlinked GitHub PRs in the Pull Request panel
projectIdandworkspaceRootnullable acrossPullRequestRef,PullRequestSummary, andPullRequestDetailcontracts; a null project ID represents a GitHub.com PR without a linked local projectowner/reposelector, building a synthetic project context withgithub.comas host and the user's home directory as workspace, and returning a detail with nullworkspaceRootunlinkedGitHubPullRequestscapability flag, and opens them in the thread right-panel or the global pull-requests pagepullRequestReviewKey) is now keyed by environment identifier in addition to PR reference, isolating pending comments across environments for the same unlinked PRprojectIdis now nullable onPullRequestRef/PullRequestSummary/PullRequestDetailschemas and inrightPanelStoresurface IDs; any out-of-tree consumer expecting a non-nullprojectIdmust handle the null case. Project-dependent features (checkout, agent fixes, environment selection) are disabled for projectless PRs inPullRequestDetailPanelMacroscope summarized cfd543a.
Note
Medium Risk
Nullable
projectId/workspaceRootis a contract change for any consumer that assumed a workspace checkout, and the server now fetches arbitrary validated GitHub repos using connected credentials.Overview
Enables reading public
github.compull requests in-app when the repo is not a linked project, gated by a newunlinkedGitHubPullRequestsserver capability. Contracts and APIs now allowprojectId: nullandworkspaceRoot: nullon pull request refs, summaries, and detail.On the server,
PullRequestServiceresolves null-project refs only for GitHub: it validatesowner/reposhape, uses the GitHub provider with homedir as cwd and an explicitgithub.comhost, and skips list-stats recording for those refs.getViewerLoginaccepts an optional hostname so viewer identity works outside a checkout.On the client, GitHub PR links in chat and the link context menu can open the right-panel detail (including when no local project matches), routing to a capable environment if the primary server is older. Checkout, branch refs, and thread handoffs stay disabled without a project; review drafts are keyed by
environmentIdso the same PR on different servers does not share pending comments.User docs note the behavior and that other hosts still need a linked project.
Reviewed by Cursor Bugbot for commit 0c87f64. Bugbot is set up for automated code reviews on this repo. Configure here.