feat(files): copy GitHub links from source lines - #9480
Conversation
22e1a57 to
d288142
Compare
d288142 to
98f7059
Compare
98f7059 to
dd74d04
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dd74d04. Configure here.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces a new desktop source-line workflow and supporting GitHub ref resolution across the web UI, Electron IPC/native menus, shared contracts, and server VCS code. The behavior is gated and tested, but the multi-layer integration and substantial new URL/ref-handling logic make it broader than a small self-contained additive change. You can add or adjust custom eligibility rules. Learn more. |
dd74d04 to
02c7425
Compare

Right-clicking a source line in a GitHub-backed project now adds Copy GitHub link to the existing desktop context menu. It stays last, preserves the native edit actions, and only appears when the checked-out branch exists on that GitHub remote.
Before
After
Built by
gpt-5.6-solin T3 Code through the Codex harness.Note
Medium Risk
Touches desktop IPC/context menus and Git ref identity parsing; URL generation is gated on published-remote checks but clipboard content depends on correct path/ref resolution.
Overview
Adds Copy GitHub link on right-click in the desktop file viewer source view. The menu keeps native cut/copy/paste/select-all ahead of the new action and only offers the link when the project is GitHub-backed and the current branch exists on the configured remote.
Desktop context menus gain optional
editFlagsand itemaccelerator/iconsupport through IPC (ElectronMenuprepends edit roles and shows a macOS GitHub template icon).fileGitHubLinkbuilds validated blob URLs (nested workspaces, encoding, enterprise hosts) after resolving the published remote ref via newexactNamefiltering inlistRefs.RepositoryIdentityResolvernow parsesgit remote -vlines with bracketed annotations (e.g. partial clone filters). User docs describe the file-viewer workflow.Reviewed by Cursor Bugbot for commit 02c7425. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add
Copy GitHub linkaction to desktop file preview context menuCopy GitHub linkaction in the desktop file viewer context menu.FilePreviewPanelbuilds a valid GitHub blob URL from the repository identity, published remote ref, file path, and line number.exactNamefilter toGitVcsDriverCore.listRefsto verify the checked-out branch has an exact matching remote ref.RepositoryIdentityResolverto parse Git fetch URLs containing partial-clone annotations.GitVcsDriverCore.listRefsnow appliesexactNamefiltering before pagination, changing the returned total count and next cursor for exact queries.Macroscope summarized 02c7425.