Skip to content

Parse uri= simplified format for open-issue-webview links#8775

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-link-to-issue
Draft

Parse uri= simplified format for open-issue-webview links#8775
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-link-to-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 8, 2026

Issue links emitted by VS Code chat (via microsoft/vscode#320404) use a simplified ?uri=… query, e.g.

vscode-insiders://github.vscode-pull-request-github/open-issue-webview?uri=https://github.com/microsoft/vscode-tools/issues/964

fromOpenIssueWebviewUri only understood the legacy JSON-encoded query and returned undefined, so the URI handler silently dropped the click.

Changes

  • src/common/uri.tsfromOpenIssueWebviewUri now first attempts to parse a uri=https?://github.com/<owner>/<repo>/issues/<n> query parameter (anchored regex rejects extra path segments and non-numeric numbers), then falls back to the legacy JSON format. Mirrors the existing fromOpenOrCheckoutPullRequestWebviewUri shape.
  • src/test/common/uri.test.ts – Adds coverage for the new format, http variant, JSON fallback, invalid authority/path/host, non-numeric numbers, and trailing path segments.

Copilot AI linked an issue Jun 8, 2026 that may be closed by this pull request
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix hyperlink issue for issue number in chat Parse uri= simplified format for open-issue-webview links Jun 8, 2026
Copilot AI requested a review from alexr00 June 8, 2026 13:26
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