Repository navigation
[release/1.148] sandbox: show last-known profile while disconnected (cherry-pick #350008) - #350019
Merged
Dileep Yavanmandha (dileepyavan) merged 1 commit intoNov 24, 2026
Conversation
Backport #350008 to release/1.148 from its current PR head. (cherry picked from commit a8206ee) (cherry picked from commit 5e1c545) Co-authored-by: Copilot Autofix powered by AI <[email protected]> Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Concurrent windows can overwrite sandbox profile assignments from stale local caches, causing lost hosts to show Default while disconnected and leaving their profiles unprotected from deletion.
1 open issue
What changed in this PR
Backports #350008 to release/1.148, addressing #349807 by retaining remote hosts’ last-known sandbox profiles while disconnected without writing cached assignments back on reconnect.
Changes:
- Persist per-machine assignments and display them in disabled profile pickers while hosts are disconnected.
- Block profile deletion when a remembered remote assignment uses it.
- Update accessibility help, dialog text, and regression tests.
| File | Description |
|---|---|
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/sandboxProfiles.test.ts |
Tests deletion protection and preservation of unavailable host state. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.ts |
Updates accessibility help for disconnected assignments. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/sandboxProfilesInput.ts |
Includes remembered assignments in deletion checks. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/sandboxProfilesEditor.ts |
Updates deletion dialog explanations. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/test/browser/remotesWidget.test.ts |
Tests disconnected display, reopening, and reconnection behavior. |
src/vs/workbench/contrib/sessions/providers/remoteAgentHost/browser/remotesTable.ts |
Displays remembered assignments with disabled controls and explanatory labels. |
src/vs/sessions/contrib/providers/remoteAgentHost/electron-browser/remotes.contribution.ts |
Updates Remote Environments accessibility help. |
src/vs/platform/agentHost/common/sandboxProfiles.ts |
Adds assignment persistence, lookup, and change notifications. |
Review effort: Balanced
Dileep Yavanmandha (dileepyavan)
enabled auto-merge (squash)
November 24, 2026 00:26
Dmitriy Vasyura (dmitrivMS)
approved these changes
Nov 24, 2026
Ben Villalobos (benvillalobos)
approved these changes
Nov 24, 2026
Dileep Yavanmandha (dileepyavan)
merged commit Nov 24, 2026
aaf8169
into
release/1.148
52 checks passed
Dileep Yavanmandha (dileepyavan)
deleted the
DileepY/cherry-pick-350008-1.148
branch
November 24, 2026 02:00
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.

Backports #350008 to
release/1.148. Refs #349807.Remembers each remote host's last-known sandbox profile on this machine, shows it disabled while disconnected, and prevents deleting profiles known to be assigned to disconnected hosts. Reconnection reads the host's current assignment without writing the remembered value back.
Source PR is still open. This backport consolidates its two current commits, through
5e1c545be5250d99e5c35df3598ccd11b8f4b896, without code changes or conflicts. Independently based onrelease/1.148atdec73890cb0bc7fd437520dbc7e74c55df259cd3.Validation
git diff --cached --check: passed before commit.git patch-id --stableon the source aggregate and backport: identical.npm run -s precommit: passed; hygiene and oxlint checked all 8 changed files. Commit signing remained enabled.npm run compile-client: blocked by missing@microsoft/copilot-sdk.pnpm install --frozen-lockfile: failed because the pinned@microsoft/[email protected]tarball returned HTTP 404. Locked development/build tooling was restored separately so commit hooks could run.How to test
After dependencies and compilation are available, run:
Assign a profile in Remote Environments, disconnect the host, and verify the disabled picker retains the assignment after reopening. Verify deletion is blocked until the host reconnects and is unassigned.