Skip to content

sessions: fix GitHub environment folder picking - #340637

Merged
roblourens merged 4 commits into
mainfrom
roblou/agents/fix-github-file-picker-issue
Oct 9, 2026
Merged

roblourens merged 4 commits into
mainfrom
roblou/agents/fix-github-file-picker-issue

Conversation

@roblourens

Copy link
Copy Markdown
Member

Summary

Unblock testing of local GitHub environments over Mission Control by separating the browsing default, filesystem grants, and project catalogue.

  • Create ~/.copilot and advertise it as the default directory.
  • Grant access to the host's home directory and local project folders outside home.
  • Populate the Agents Window's project catalogue from local-disk workspace-picker recents, excluding remote/virtual entries and warning about missing folders. Preserve open-workspace fallback in editor windows and legacy configuration behavior when the new optional fields are absent.
  • Refresh catalogue entries without reconnecting the relay.
  • After selecting an environment in the Agents workspace picker, connect and open that provider's existing folder picker, retaining the exact provider when selecting a folder for a new session.
  • Update regression coverage, accessibility help, and the sharing contract documentation.

Reviewer notes

This intentionally broadens opt-in local Mission Control sharing from workspace-only grants to home-directory access. The grants authorize existing read/write filesystem operations, not just folder navigation. No authentication or remote-control policy bypass is added.

This is a testing-oriented scope/default while the upstream sharing UX is being clarified. The live Windows environment was not exercised with the updated build. Both host and client need the updated build for end-to-end validation.

How to test

  1. In the host's updated VS Code build, select the GitHub environment backend and enable remote sharing.
  2. On the updated Agents client, choose Environments in the workspace picker and select the online host.
  3. Verify that the folder picker opens at the host's ~/.copilot, that browsing into another folder under home works, and that accepting a folder selects the correct remote provider.
  4. Verify that cancelling either picker preserves the workspace selection.
  5. Add/remove local workspace-picker recents on the host and verify its advertised project catalogue updates without a relay reconnect. Home and .copilot should not become catalogue entries unless explicitly present in the folder inventory.

Validation

  • npm run build-fast -- --client-only - passed.

  • npm run typecheck-client - passed.

  • npm run valid-layers-check - passed.

  • npm run eslint -- <15 changed TypeScript files> - passed; corrected test fixtures were subsequently linted again.

  • git diff --check - passed.

  • Focused host/sharing/picker suites: 188 passed, 3 skipped:

    ./scripts/test.sh --reporter dot \
      --run src/vs/platform/agentHost/test/node/missionControlProjects.test.ts \
      --run src/vs/platform/agentHost/test/node/missionControlHost.test.ts \
      --run src/vs/platform/agentHost/test/node/missionControlProtocolServer.test.ts \
      --run src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/missionControlContribution.test.ts \
      --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/missionControlAgentHostContribution.test.ts \
      --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostActions.test.ts
  • Existing sharing controls and environment command suites: 38 passed:

    ./scripts/test.sh --reporter dot \
      --run src/vs/workbench/contrib/chat/test/electron-browser/toggleRemoteConnectionsActionViewItem.test.ts \
      --run src/vs/sessions/contrib/tunnelHost/test/electron-browser/tunnelHost.contribution.test.ts \
      --run src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/missionControlEnvironmentActions.test.ts
  • Live Windows connection, full integration/smoke suites, and screen-reader testing: not run.

(Written by Copilot)

Separate home-directory filesystem grants, the .copilot browsing default, and local recent-folder catalogue entries. Open the remote folder picker after selecting a GitHub environment and retain its provider identity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 02:04

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.

🟡 Changes recommended

FILE_NOT_DIRECTORY stale recents currently abort sharing instead of being omitted.

1 open finding
What changed in this PR

Separates Mission Control folder browsing, filesystem grants, and project catalogues while improving Agents Window environment selection.

Changes:

  • Shares home/project roots and defaults browsing to ~/.copilot.
  • Synchronizes local recent folders into the remote project catalogue.
  • Opens the selected environment’s folder picker with accessibility and regression coverage.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​remoteAgentHost/​missionControlContribution.test.ts Tests sharing roots, catalogues, and defaults.
src/​vs/​workbench/​contrib/​chat/​browser/​remoteAgentHost/​missionControlSharingService.ts Builds Mission Control sharing configuration.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​remoteAgentHostActions.test.ts Tests environment folder selection.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​missionControlAgentHostContribution.test.ts Tests recent-folder publication.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md Documents the new sharing workflow.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​remoteAgentHostActions.ts Connects environments and opens folder browsing.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​missionControlAgentHostContribution.ts Publishes local recent projects.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionsChatAccessibilityHelp.ts Documents keyboard interaction.
src/​vs/​platform/​agentHost/​test/​node/​missionControlProtocolServer.test.ts Tests live catalogue updates.
src/​vs/​platform/​agentHost/​test/​node/​missionControlProjects.test.ts Tests distinct project roots.
src/​vs/​platform/​agentHost/​test/​node/​missionControlHost.test.ts Tests grants and defaults.
src/​vs/​platform/​agentHost/​node/​missionControl/​missionControlProjects.ts Separates catalogue roots from grants.
src/​vs/​platform/​agentHost/​node/​missionControl/​missionControlHost.ts Wires project roots and browsing defaults.
src/​vs/​platform/​agentHost/​node/​missionControl/​missionControlEnvironment.ts Applies live project updates.
src/​vs/​platform/​agentHost/​common/​missionControlEnvironment.ts Extends the sharing-service contract.
src/​vs/​platform/​agentHost/​common/​agentService.ts Adds project and default-directory options.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Skip stale recent folders whose parent is not a directory, and scope environment folder-browsing accessibility help to the feature's availability. Cover both with focused regression tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens
roblourens marked this pull request as ready for review October 9, 2026 02:47
@roblourens
roblourens enabled auto-merge (squash) October 9, 2026 02:47
@roblourens
roblourens marked this pull request as draft October 9, 2026 02:47
auto-merge was automatically disabled October 9, 2026 02:47

Pull request was converted to draft

Preserve upstream web Mission Control discovery and accessibility help alongside the recent-folder sharing catalogue and environment folder-picker handoff.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Base: 82f0b264 Current: 5695d984

No screenshot changes.

@roblourens
roblourens marked this pull request as ready for review October 9, 2026 03:03
@roblourens
roblourens enabled auto-merge (squash) October 9, 2026 03:03
Preserve upstream Mission Control policy overrides and relay recovery while retaining independent filesystem grants, browsing defaults, and recent-folder project catalogues.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens
roblourens merged commit 8917798 into main Oct 9, 2026
55 of 56 checks passed
@roblourens
roblourens deleted the roblou/agents/fix-github-file-picker-issue branch October 9, 2026 04:15
@vs-code-engineering vs-code-engineering Bot added this to the 1.142.0 milestone Oct 9, 2026
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.

4 participants