Get PR webview opening working when we don't have a folder repo manager - #8922
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes are cohesive, covered by targeted tests, and the remote-only fallback is implemented in a way that fits existing FolderRepositoryManager usage patterns.
Review tier: Lite
Findings: None
What changed in this PR
Enables the “Open GitHub Issue or Pull Request” external URI opener to function even when there are no local workspace repositories/folder managers available, by creating a lightweight remote-only FolderRepositoryManager on demand.
Changes:
- Refactors the external URI opener into a disposable class that can lazily create a remote-only
FolderRepositoryManagerwhen none exists. - Introduces
RemoteOnlyRepository(a minimalRepositoryimplementation) to support GitHub-only scenarios without a local git repo. - Adds unit tests for opener priority and remote-only manager creation behavior.
| File | Description |
|---|---|
| src/test/github/externalUriOpener.test.ts | Adds coverage ensuring a remote-only folder manager is created when no local manager exists. |
| src/test/common/externalUri.test.ts | Adds tests for the opener priority helper. |
| src/github/overviewRestorer.ts | Switches registration to pass ExtensionContext + CredentialStore into the external URI opener. |
| src/github/externalUriOpener.ts | Implements the new opener class and remote-only FolderRepositoryManager fallback creation. |
| src/extension.ts | Updates OverviewRestorer construction to pass the full extension context. |
| src/common/externalUri.ts | Adds getGitHubIssueOrPullRequestUriOpenerPriority helper. |
| src/api/remoteOnlyRepository.ts | Adds a remote-only Repository implementation for non-local scenarios. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ladislau Szomoru (lszomoru)
approved these changes
Sep 3, 2026
Alex Ross (alexr00)
added a commit
to microsoft/vscode
that referenced
this pull request
Sep 3, 2026
#334222) * Remove the GHPR uri opening workaround in favor of external URI opener See microsoft/vscode-pull-request-github#8922 * CCR feedback
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.
No description provided.