authentication: Support multiple configured Enterprise hosts - #8996
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Real-account switching across web and remote environments remains explicitly unvalidated for this authentication-sensitive change.
Review effort: Balanced
Findings: None
What changed in this PR
Adds multi-host GitHub Enterprise configuration while retaining one selected Enterprise client alongside GitHub.com.
Changes:
- Implements plural URI configuration, validation, discovery, and additive setup.
- Adds account-selection and authentication guidance across PR and login views.
- Expands regression coverage and documents compatibility and rollout constraints.
| File | Description |
|---|---|
src/authentication/configuration.ts |
Resolves and validates Enterprise URI settings. |
src/authentication/githubServer.ts |
Recognizes configured Enterprise remotes. |
src/commands.ts |
Registers Enterprise account selection. |
src/common/executeCommands.ts |
Adds command and context constants. |
src/common/settingKeys.ts |
Adds the plural URI key. |
src/github/createPRViewProvider.ts |
Uses synchronous active-remote filtering. |
src/github/folderRepositoryManager.ts |
Refreshes and classifies multi-host remotes. |
src/github/markdownUtils.ts |
Adds safe Markdown text escaping. |
src/github/repositoriesManager.ts |
Implements setup and account-selection flows. |
src/github/utils.ts |
Removes obsolete singular-setting helpers. |
src/view/prsTreeDataProvider.ts |
Displays authentication and configuration guidance. |
src/view/treeNodes/categoryNode.ts |
Routes Enterprise login correctly. |
src/test/authentication/configuration.test.ts |
Tests configuration precedence and validation. |
src/test/github/authIssuers.test.ts |
Tests host discovery and client lifecycle. |
src/test/github/markdownUtils.test.ts |
Tests Markdown escaping. |
src/test/github/repositoriesManager.test.ts |
Tests setup and account selection. |
src/test/view/prsTree.test.ts |
Tests PR/login view guidance. |
package.json |
Raises the VS Code floor and contributes the command. |
package.nls.json |
Localizes the new command title. |
README.md |
Documents multi-host configuration and limitations. |
documentation/releasing.md |
Updates release compatibility guidance. |
documentation/github-enterprise-uris-spec.md |
Defines rollout requirements and follow-ups. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Honor github-enterprise.uris with legacy read fallback and additive setup. Preserve one selected Enterprise client, expose scoped account selection, and keep authentication guidance responsive and readable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mock native tree views and context commands so unit tests do not wait for UI RPC. Dispose the tree model and repository fixtures and await remote setup to prevent timed-out work from leaking into the next test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep review-comment setup off workbench RPC and dispose its owned resources. Share the tree/context fixture with PR-tree tests. Run the previously misplaced initialization check after setup and await thread creation so initialization cannot finish with incomplete thread data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TylerLeonhardt
force-pushed
the
agents/vscode-extension-new-setting-spec
branch
from
October 1, 2026 16:57
1e1aa0f to
f291943
Compare
TylerLeonhardt
marked this pull request as ready for review
October 1, 2026 17:06
TylerLeonhardt
enabled auto-merge (squash)
October 1, 2026 17:06
This was referenced Oct 1, 2026
roblourens
approved these changes
Oct 1, 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.
Summary
Adopt
github-enterprise.urisfrom microsoft/vscode#338080 while preserving one selected Enterprise account/client alongside the separate GitHub.com account. Builds on the session-derived routing in #8984.[], legacy read fallback, workspace trust, and instance URL validation. Setup writes only the plural setting and preserves existing instances.github-enterpriseprovider, or starts sign-in when no Enterprise accounts exist.^1.141.0and document the configuration, compatibility policy, and follow-up phases.Scope and compatibility
This is the Crawl phase: multiple instances can be configured, but only one Enterprise account is active at a time. Simultaneous per-host clients and multiple accounts per host are follow-ups.
Insiders users are expected to stay current; no compatibility shim is added for early 1.141 snapshots. The scoped picker uses VS Code's
_manageAccountPreferencesForExtension(extensionId, providerId)command, verified against its implementation and in a running VS Code window.Validation
npm run compile(desktop, browser, and webviews)npm run lintand stagednpm run hygieneRemaining validation
The implementation specification includes exploratory scenarios and the follow-up phases.
Closes #9003
Follow-ups (not closed by this PR): #9004 (Walk), #9005 (Run).