Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

  • Understand the issue: The #123 link in the issue overview title is not copyable because context menu items for "Copy Link" are only registered for PullRequestOverview webview, not IssueOverview
  • Fix the package.json to add the IssueOverview webview ID to the context menu registration for pr.copyPrLink only (not pr.copyVscodeDevPrLink)
  • Fix commands.ts to resolve issues (not just PRs) when copying links for pr.copyPrLink
  • Keep pr.copyVscodeDevPrLink as PR-only per review feedback
  • Rename variable from item to prOrIssue for better readability
  • Lint and hygiene checks pass
Original prompt

This section details on the original issue you should resolve

<issue_title>Links in issue view should be copyable</issue_title>
<issue_description>
Type: Bug

The link to issue in the issue editor is not copyable.

no_link_copy.mp4

Extension version: 0.109.2025042104
VS Code version: Code - Insiders 1.100.0-insider (ef9b85d17a8cb56ce84b2b36f352598454861620, 2025-04-21T05:37:46.564Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.60GB (10.87GB free)
Process Argv --log trace --log ms-python.python=info --crash-reporter-id 4fb1ebc1-cf4c-4880-a88a-47738ec3768d
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vsc_aacf:30263846
pythonvspyt551:31249597
vscod805cf:30301675
c4g48928:30535728
vscrpc:30624061
a9j8j154:30646983
962ge761:30841072
dsvsc014:30777825
dsvsc015:30821418
h48ei257:31000450
pythontbext0:30879054
cppperfnew:30980852
dwnewjupytercf:31046870
pythonrstrctxt:31093868
nativeloc1:31118317
e80f6927:31120813
dwcopilot:31158714
5b1c1929:31184661
471b6256:31240254
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
g012b348:31231168
cp15370_c:31280196
pythoneinst12:31251391
treesitterini:31278752
bgtreat:31252123
c7cif404:31283753
563cc122:31251109
31787653:31262186
3e8i5726:31271747
pythonpulldiag:31287486
6gi0g917:31259950
editoredits36407:31282444
996jf627:31264550
pythonrdcb7:31268811
usemplatestapi:31288272
gh9da704:31280609
747dc170:31275146
g20af354:31278749
pylancecolor:31288664
generatesymbolt:31280541
convertfstringf:31280702
gendocf:31280703

<agent_instructions>The issue is specifically with the #123 link in the issue overview title. It works fine on the PR overview, but not the issue overview. </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@alexr00 This is why we have a "Copy link" button! @karthiknadig I did not see that thing until you mentioned it. But the copy should work. @alexr00 This already works.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 23, 2026 12:30
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue links to be copyable in issue view Fix copy link context menu for issue overview Jan 23, 2026
Copilot AI requested a review from alexr00 January 23, 2026 12:38
Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to show the vscoddev option for the issues view.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 23, 2026

We don't want to show the vscoddev option for the issues view.

Removed the vscode.dev option from the issue overview context menu in 9c5a98e. Now only "Copy Link" appears for issues, while PRs still show both options.

Copilot AI requested a review from alexr00 January 23, 2026 16:40
@alexr00 alexr00 marked this pull request as ready for review January 23, 2026 17:17
Copilot AI review requested due to automatic review settings January 23, 2026 17:17
@alexr00 alexr00 enabled auto-merge (squash) January 23, 2026 17:17
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where the #123 link in the issue overview title wasn't copyable via the right-click context menu. The fix extends the existing pr.copyPrLink command to also work with issues by adding support for the IssueOverview webview and implementing a fallback to resolve issues when pull request resolution fails.

Changes:

  • Extended the pr.copyPrLink context menu command to work in both PullRequestOverview and IssueOverview webviews
  • Updated the command handler to fall back to resolveIssue when resolvePullRequest returns undefined
  • The "Copy vscode.dev Link" option remains PR-only as intended

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Added IssueOverview to the webview ID condition for the pr.copyPrLink context menu item
src/commands.ts Refactored command handler to support both PRs and issues by adding fallback logic and updating variable types

src/commands.ts Outdated
context.subscriptions.push(
vscode.commands.registerCommand('pr.copyPrLink', async (params: OverviewContext | undefined) => {
let pr: PullRequestModel | undefined;
let item: PullRequestModel | IssueModel | undefined;
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name item is somewhat generic. Consider using a more descriptive name like prOrIssue or resource to better convey that this can be either a PullRequestModel or an IssueModel. This would improve code readability and make the dual nature of this variable more explicit.

See below for a potential fix:

			let prOrIssue: PullRequestModel | IssueModel | undefined;
			if (params) {
				const folderManager = reposManager.getManagerForRepository(params.owner, params.repo);
				prOrIssue = await folderManager?.resolvePullRequest(params.owner, params.repo, params.number, true);
				if (!prOrIssue) {
					prOrIssue = await folderManager?.resolveIssue(params.owner, params.repo, params.number);
				}
			}
			if (prOrIssue) {
				return vscode.env.clipboard.writeText(prOrIssue.html_url);

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the variable from item to prOrIssue in 621e7fb.

rzhao271
rzhao271 previously approved these changes Jan 23, 2026
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Links in issue view should be copyable

3 participants