Fix various things in the webview that don't work correctly in Agents window - #8935
Merged
Conversation
Alex Ross (alexr00)
commented
Sep 7, 2026
Member
- commits
- copy links
- open on .com
… window - commits - copy links - open on .com
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes are cohesive, address the stated webview issues directly, and include targeted tests for the newly introduced commit-file provider behavior.
Review tier: Lite
Findings: None
What changed in this PR
This PR fixes several interaction issues in the Agents-window PR webview by ensuring PR number links open on GitHub, context-menu “copy link” actions can work without needing to resolve a PR via a workspace repo manager, and commit-changes navigation can read commit-file content even when there’s no workspace repository manager available.
Changes:
- Make PR number links (header + sticky header) open via
openOnGitHub()instead of relying on default anchor navigation. - Include
urlindata-vscode-contextand teach copy-link commands to use it directly when provided. - Introduce a singleton
GitHubCommitFileSystemProviderthat can serve commit file content from a registeredGitHubRepository, plus tests for this behavior.
| File | Description |
|---|---|
| webviews/editorWebview/test/overview.test.tsx | Adds coverage ensuring PR number links invoke openOnGitHub and carry URL context. |
| webviews/components/stickyHeader.tsx | Makes the sticky PR number link open on GitHub and includes url in context data. |
| webviews/components/header.tsx | Makes the main PR number link open on GitHub and includes url in context data. |
| src/view/githubFileContentProvider.ts | Adds repository registration + singleton accessor to support commit-file reads without workspace managers. |
| src/test/view/githubFileContentProvider.test.ts | Verifies commit-file reads succeed using a registered GitHubRepository (no workspace manager). |
| src/github/views.ts | Extends BaseContext to optionally carry url for webview context menus. |
| src/github/utils.ts | Factors vscode.dev PR link generation into a reusable vscodeDevPrLinkFromUrl helper. |
| src/github/pullRequestOverview.ts | Registers the PR’s GitHubRepository with the commit FS provider before opening commit changes; propagates errors to the webview. |
| src/extension.ts | Initializes the commit FS provider via the new singleton accessor during activation. |
| src/commands.ts | Updates copy-link commands to use params.url directly when present (avoids resolution via repo manager). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Henning Dieterichs (hediet)
approved these changes
Sep 7, 2026
This was referenced Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.