Skip to content

Investigation: chat issue links silently fail (root cause in vscode-pull-request-github)#320404

Closed
Copilot wants to merge 1 commit into
mainfrom
copilot/fix-link-to-issue
Closed

Investigation: chat issue links silently fail (root cause in vscode-pull-request-github)#320404
Copilot wants to merge 1 commit into
mainfrom
copilot/fix-link-to-issue

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Clicking an issue link like vscode-insiders://github.vscode-pull-request-github/open-issue-webview?uri=https://github.com/microsoft/vscode-tools/issues/964 in chat does nothing. No code changes are made in this repo — investigation shows the bug lives in microsoft/vscode-pull-request-github.

Root cause

The click flows correctly through vscode core: markdownRenderer.activateLinkopenerService.openRelayURLService → main URL service → ext-host → GHPR UriHandlerfromOpenIssueWebviewUri.

In microsoft/vscode-pull-request-github (src/common/uri.ts):

  • fromOpenOrCheckoutPullRequestWebviewUri accepts both the legacy JSON query and the simplified uri=https://github.com/owner/repo/pull/N format.
  • fromOpenIssueWebviewUri only accepts the JSON query — it does JSON.parse(uri.query.split('&')[0]), which throws on uri=https://... and silently returns undefined.

The LM emits the simplified format by analogy with the PR skill (src/lm/skills/create-pull-request/SKILL.md), so the issue handler never resolves and the webview is never opened.

Recommended fix (in vscode-pull-request-github, not here)

Mirror the PR variant in fromOpenIssueWebviewUri:

const queryParams = new URLSearchParams(uri.query);
const uriParam = queryParams.get('uri');
if (uriParam) {
    const m = /^https?:\/\/github\.com\/(?<owner>[^\/]+)\/(?<repo>[^\/]+)\/issues\/(?<issueNumber>\d+)$/.exec(uriParam);
    if (m?.groups) {
        const params = { owner: m.groups.owner, repo: m.groups.repo, issueNumber: parseInt(m.groups.issueNumber, 10) };
        if (!validateOpenWebviewParams(params.owner, params.repo, params.issueNumber.toString())) { return; }
        return params;
    }
}
// fall back to existing JSON parsing

The issue should be transferred to microsoft/vscode-pull-request-github.

Copilot AI requested review from Copilot and removed request for Copilot June 8, 2026 11:58
Copilot AI changed the title [WIP] Fix non-functional link to issue in chat Investigation: chat issue links silently fail (root cause in vscode-pull-request-github) Jun 8, 2026
Copilot AI requested a review from alexr00 June 8, 2026 12:28
@alexr00 alexr00 closed this Jun 8, 2026
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.

Link to an issue doesn't work

2 participants