Repository navigation
chat: pick cloud sandbox repository fixes - #341695
Merged
Merged
Conversation
…ot extension The cloud sandbox "Select repository..." button round-tripped through the Copilot Chat extension (openRepository -> _chat.pickRepository -> searchRepositories), which broke on web and whenever the extension was not active, and also surfaced a null-vs-undefined RPC bug. Add CloudSandboxRepositoryPicker, which drives the shared RepositoryPicker UI with IWorkbenchGitHubService: listRepositories for an empty query and searchRepositories scoped to the viewer and their organizations otherwise. The contribution no longer references any extension command.
Contributor
|
Base:
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Local QuickPick filtering hides returned repositories when users paste GitHub URLs.
1 open finding
What changed in this PR
Moves cloud sandbox repository selection into the renderer, removing its dependency on the Copilot Chat extension.
Changes:
- Adds repository listing and scoped search through the platform GitHub client.
- Connects cloud sandbox drafts to the new picker and updates tests.
- Normalizes null options for the remaining extension-backed picker command.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/editorCloudSandboxContribution.test.ts | Replaces extension-command mocks with a picker seam. |
| src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/cloudSandboxRepositoryPicker.test.ts | Tests request sequencing and authentication failure. |
| src/vs/workbench/contrib/chat/browser/remoteAgentHost/editorCloudSandboxContribution.ts | Uses the renderer picker and updates repository descriptions. |
| src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxRepositoryPicker.ts | Implements GitHub repository listing and search. |
| src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts | Normalizes null picker options from extension RPC. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A pasted GitHub URL was rewritten to owner/repo for the API query only, so the quick pick's local label filter still used the raw URL and hid the matching result. Let RepositoryPicker callers supply a filterValue and apply the same normalization there.
Osvaldo Ortega (osortega)
marked this pull request as ready for review
October 15, 2026 07:07
Osvaldo Ortega (osortega)
enabled auto-merge (squash)
October 15, 2026 07:07
Sandeep Somavarapu (sandy081)
approved these changes
Oct 15, 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
The cloud sandbox draft's Select repository... button round-tripped through the Copilot Chat extension (embarassing):
renderer
workbench.action.chat.cloudSandbox.selectRepository→ extensiongithub.copilot.chat.cloudSessions.openRepository→ renderer_chat.pickRepository→ extensiongithub.copilot.chat.cloudSessions.searchRepositories(Octokit) per keystroke.That contradicted
CloudSandboxApiService's stated goal of working in VS Code Web without an extension host, broke whenever the extension was not yet activated, and surfaced aTypeError: Cannot read properties of null (reading 'placeholder')becauseundefinedarguments becomenullacross the extension-host RPC.This PR removes the extension dependency from the cloud sandbox contribution entirely.
Changes
CloudSandboxRepositoryPicker(remoteAgentHost/cloudSandboxRepositoryPicker.ts): drives the existing sharedRepositoryPickerquick pick with the platform GitHub client fromIWorkbenchGitHubService.acquireDefaultAccountClient:client.query.listRepositories(owner,collaborator,organization_member, sorted byupdated)client.query.searchRepositorieswith<term> in:name fork:true user:<login> org:<…>; pasted GitHub URLs normalize toowner/repo/user+/user/orgs, fetched lazily (only once a non-empty query is typed) and cached per pickEditorCloudSandboxSessionContribution: dropsOPEN_REPOSITORY_COMMAND_IDandICommandService;_selectRepositorycalls aprotected _pickRepository()that lazily creates the picker._chat.pickRepository: normalizesnull→undefinedfor its remaining extension caller.Testing
cloudSandboxRepositoryPicker.test.tsasserts the request sequence (list → user → orgs → scoped search) and that an auth failure rejects without opening a picker.editorCloudSandboxContribution.test.tsswaps the fake extension command for the_pickRepositoryseam../scripts/test.sh --runon the picker, contribution andRepositoryPickersuites: 112 passing. ESLint clean.