Skip to content

Fix various things in the webview that don't work correctly in Agents window - #8935

Merged
Alex Ross (alexr00) merged 1 commit into
mainfrom
alexr00/lesser-egret
Sep 7, 2026
Merged

Fix various things in the webview that don't work correctly in Agents window#8935
Alex Ross (alexr00) merged 1 commit into
mainfrom
alexr00/lesser-egret

Conversation

@alexr00

Copy link
Copy Markdown
Member
  • commits
  • copy links
  • open on .com

… window

- commits
- copy links
- open on .com
Copilot AI lite review requested due to automatic review settings September 7, 2026 13:03
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) September 7, 2026 13:03
@alexr00 Alex Ross (alexr00) self-assigned this Sep 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 url in data-vscode-context and teach copy-link commands to use it directly when provided.
  • Introduce a singleton GitHubCommitFileSystemProvider that can serve commit file content from a registered GitHubRepository, 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.

@alexr00
Alex Ross (alexr00) merged commit 02ac4de into main Sep 7, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the alexr00/lesser-egret branch September 7, 2026 13:13
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.

3 participants