Repository navigation
sessions: Enable and gate Remote Environments management - #344158
Merged
Christof Marti (chrmarti) merged 3 commits intoOct 25, 2026
Merged
Conversation
Recognize user-local environments from their enabled account inventory instead of requiring a staged connection. Preserve fallback management for unsupported hosts and cover setting and inventory changes. Co-authored-by: Copilot <[email protected]>
2 tasks done
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix preserves fallback management and has targeted regression coverage, with no unresolved findings; live provider/account flows remain untested.
No open issues 🎉
What changed in this PR
Fixes redundant per-environment Manage submenus in the Sessions Environment picker by recognizing shared environments before a connection is staged.
Changes:
- Uses enabled, account-scoped user-local inventory to determine central management coverage.
- Preserves per-entry management for unsupported hosts and unavailable inventory.
- Adds regression coverage for setting changes, inventory availability, account withdrawal, and row selection.
| File | Description |
|---|---|
src/vs/sessions/contrib/chat/test/browser/sessionEnvironmentPicker.test.ts |
Covers inventory-based menu visibility and fallback behavior. |
src/vs/sessions/contrib/chat/browser/sessionEnvironmentPicker.ts |
Checks account inventory instead of staged environment connections. |
Review effort: Balanced
Contributor
|
Base:
|
Default Remote Environments management on while requiring the Environment picker and remote agent hosts for its command, menu entry and redundant submenu suppression. Apply gate changes to open editors and preserve explicit visibility preferences. Co-authored-by: Copilot <[email protected]>
Provide the picker inventory dependency in the fixture harness so screenshot and Playwright fixtures render after the environment Manage submenu fix. Co-authored-by: Copilot <[email protected]>
Christof Marti (chrmarti)
marked this pull request as ready for review
October 25, 2026 21:26
Christof Marti (chrmarti)
enabled auto-merge
October 25, 2026 21:26
Federico Brancasi (federicobrancasi)
approved these changes
Oct 25, 2026
Christof Marti (chrmarti)
deleted the
chrmarti/remotes-environment-manage-menu
branch
October 25, 2026 21:31
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.
Built on #344135 (
chrmarti/remotes-status-layout). That parent merged while this follow-up was being published, so this PR targetsmain.Refs #343790. Follow-up test plan: #344161.
Changes
Enable
sessions.chat.experimental.environmentPickerManageRemotesby default. Require that setting, the Environment picker, remote agent hosts, and AI features for the Command Palette and Sessions overflow entries. Apply the same checks when executing the command and disable an open editor if its prerequisites change.Hide redundant per-environment Manage submenus only when both the Environment picker and central management are enabled and the user-local environment is managed by Remote Environments.
The picker previously recognized environments only through staged connection-factory entries. Mission Control publishes providers from its account inventory before any connection is staged, so a discovered environment could retain a Manage submenu despite already appearing in the central editor.
Use the enabled, account-scoped user-local inventory as the source of truth, matching Remotes. Preserve per-host management for WebSocket, unsupported/unknown kinds, and environments absent from the available inventory. Turning the management setting off restores per-entry Manage.
Fix screenshot CI by registering the inventory service in the New Session fixture harness; the new picker dependency previously caused its fixtures to fail during construction.
Validation
npm run gulp compile-client— passed for the initial submenu fix, zero compilation/type errors.npm run build-fast -- --client-only— passed for the default/gating update.npm run typecheck-client— passed, including the fixture dependency fix..\scripts\test.bat --run src\vs\sessions\contrib\providers\remoteAgentHost\test\electron-browser\remotesEditor.test.ts --run src\vs\sessions\contrib\chat\test\browser\sessionEnvironmentPicker.test.ts --run src\vs\sessions\contrib\chat\test\browser\newSessionComposerLayout.test.ts --run src\vs\sessions\contrib\chat\test\browser\sessionsChatAccessibilityHelp.test.ts --run src\vs\sessions\contrib\providers\remoteAgentHost\test\browser\remoteAgentHostSessionsProvider.test.ts --reporter dot— 433 passed.npm run test-browser-no-install -- --browser webkit --browser chromium-msedge --run src\vs\sessions\contrib\chat\test\browser\sessionEnvironmentPicker.test.ts --reporter dot— 22 passed in each browser..\scripts\test.bat --run src\vs\sessions\contrib\chat\test\browser\newChatWidget.test.ts --run src\vs\sessions\contrib\chat\test\browser\sessionWorkspacePicker.test.ts --reporter dot— 372 passed, 1 pending.npm run eslint -- src\vs\sessions\contrib\chat\browser\sessionEnvironmentPicker.ts src\vs\sessions\contrib\chat\test\browser\sessionEnvironmentPicker.test.ts— passed.node build\hygiene.ts src\vs\sessions\contrib\chat\browser\sessionEnvironmentPicker.ts src\vs\sessions\contrib\chat\test\browser\sessionEnvironmentPicker.test.ts— passed.git diff --check— passed.sessions/chat/newWidget/newChatWidget/— 122 fixtures passed, zero errors. Inspected the previously failing NewSessionDefault/Light screenshot.Tests cover the default-on schema and visibility preferences, inventory-only and staged environments, online/offline records, ordinary row selection, management/Environment picker/remote-host gates, open-editor disposal, command rejection, inventory availability, sign-out/account withdrawal, and retained management for unsupported kinds.
Manual test
Live provider/account flows were not exercised for this fix; picker interaction is covered using the production picker with test services.