Repository navigation
[cherry-pick] sessions: Refine remote management labels and saved SSH cleanup - #344313
Merged
Merged
Conversation
Contributor
Screenshot ChangesBase: Changed (24) |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
SSH deletion can mistake unreadable configuration for absence, and an in-flight connection can restore a deleted saved entry.
2 open issues
What changed in this PR
This cherry-pick refines remote management in the Agents Window and adds confirmed cleanup of saved SSH connections absent from SSH configuration, extending the inline management actions from #344228.
Changes:
- Align remote labels, section ordering, Status text, and accessibility guidance.
- Add saved SSH deletion with configuration rechecks and shared disconnect handling.
- Update regression tests, fixtures, and Sessions overflow ordering.
| File | Description |
|---|---|
src/vs/sessions/contrib/sessions/test/browser/sessionsViewMenu.test.ts |
Tests view actions preceding management actions. |
src/vs/sessions/contrib/sessions/browser/views/sessionsViewActions.ts |
Orders the view-actions overflow group. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/electron-browser/remotesEditor.test.ts |
Tests updated help and narrows the visible editor type. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/sshAgentHost.contribution.test.ts |
Updates shared SSH helper imports. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesWidget.test.ts |
Tests labels, ordering, and keyboard-accessible SSH deletion. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesWidget.fixture.ts |
Adds a deletable saved SSH fixture. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesModel.test.ts |
Tests SSH deletion eligibility, confirmation, and revalidation. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostActions.test.ts |
Checks labels and section order against registered picker actions. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/missionControlAgentHostContribution.test.ts |
Verifies the GitHub Environments picker label. |
src/vs/sessions/contrib/providers/remoteAgentHost/electron-browser/remotes.contribution.ts |
Updates accessibility help and management menu grouping. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/sshAgentHost.contribution.ts |
Reuses the relocated SSH disconnect helper. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remotesWidget.ts |
Updates display text and routes SSH deletion. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remotesTable.ts |
Displays eligible SSH Delete actions and revised settings labels. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remotesModel.ts |
Implements section ordering and saved SSH deletion. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteHostOptions.ts |
Houses shared SSH identity and disconnect helpers. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostActions.ts |
Renames environment and tunnel picker actions. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/missionControlAgentHostContribution.ts |
Renames the registered environment picker entry. |
src/vs/sessions/contrib/chat/test/browser/sessionsChatAccessibilityHelp.test.ts |
Updates accessibility-help expectations. |
src/vs/sessions/contrib/chat/browser/sessionsChatAccessibilityHelp.ts |
Uses GitHub Environments in navigation guidance. |
src/vs/sessions/contrib/chat/browser/chat.contribution.ts |
Places worktree cleanup in the management overflow group. |
Review effort: Balanced
Comment on lines
+459
to
+462
| removeSSHRemoteAgentHostEntry(this.storageService, id); | ||
| this.sshDiscoveryVersion++; | ||
| try { | ||
| await disconnectSSHEntry(current, this.remoteAgentHostService, this.sshService); |
| if (!this.enabled || this._store.isDisposed) { | ||
| throw new CancellationError(); | ||
| } | ||
| const hosts = await this.sshService.listSSHConfigHosts(); |
Connor Peet (connor4312)
approved these changes
Oct 26, 2026
Connor Peet (connor4312)
left a comment
Member
There was a problem hiding this comment.
No actionable P1/P2 findings in the reviewed changes. Inspected the diff, surrounding SSH deletion/disconnection code, and relevant regression tests. Tests were not executed during this read-only review.
Written by Connor's agent running GPT-6.1 Sol
Christof Marti (chrmarti)
approved these changes
Oct 26, 2026
This was referenced Oct 26, 2026
Christof Marti (chrmarti)
added a commit
that referenced
this pull request
Oct 26, 2026
<!-- Thank you for submitting a Pull Request. Please: * Read our Pull Request guidelines: https://github.com/microsoft/vscode/wiki/How-to-Contribute#pull-requests * Associate an issue with the Pull Request. * Ensure that the code is up-to-date with the `main` branch. * Include a description of the proposed changes and how to test them. --> ## Summary - Rename **Manage...** in the Environment picker to **Manage Remote Environments...**. - Align the setting description and chat/Remotes accessibility help with the new label. - Preserve the command, visibility gates, selected environment, and per-host Manage submenus. Rebased onto `origin/release/1.144` at `62620115296` to avoid the unrelated chat-move test regression introduced on main by #344057 (`13832cc4487`). The diff remains the same six-file label-only change. Follow-up to the release backports #344266 and #344313; related to #344263. ## Validation - `npm run build-fast -- --client-only` - passed after rebasing onto release/1.144. - Focused picker and accessibility tests on release/1.144 - **79 passing**: ```powershell .\scripts\test.bat --run src\vs\sessions\contrib\chat\test\browser\sessionEnvironmentPicker.test.ts --run src\vs\sessions\contrib\chat\test\browser\sessionsChatAccessibilityHelp.test.ts --reporter dot ``` - Release-diff ESLint and hygiene - **6 files passed**; whitespace check passed: ```powershell $files = @(git diff --name-only origin/release/1.144...HEAD -- '*.ts') npm run eslint -- $files node build\hygiene.ts $files git diff --check origin/release/1.144...HEAD ``` This is a string-only change; full type-check and smoke/integration suites were not run. ## Manual check Open the Environment picker, select **Manage Remote Environments...**, and verify Remotes management opens without changing the selected environment.
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.

Cherry-pick of #344273 from
main.Summary
Remotes uses the same section order as the Environment picker's connection entries: GitHub Environments, Dev Tunnels, WSL, SSH, omitting unavailable sections. A regression test compares the sections against the actual registered picker menu.
Created from freshly fetched
origin/mainatd2e7f610b88, not stacked on the previous branch. Follow-up to #344228; related to #344263.Validation
npm run build-fast -- --client-only- passed.npm run typecheck-client- passed.git diff --checkpassed. Commands were run before committing, with a targeted recheck after the final test adjustment:After restoring the Experimental badge, the client build passed again, the focused schema test passed (1 passing), and hygiene passed for both affected files:
The accessibility review fix passed all 10 Remotes editor tests and changed-file ESLint. Final section-order validation passed 162 Electron tests, 166 browser tests, lint/hygiene for all three changed files, and a refreshed Dark fixture inspection:
SSH cleanup and CI-fix validation passed 215 Electron tests, 337 browser tests, the client type-check, lint/hygiene for 11 changed files, and all 64 Remotes fixtures. Tests cover configured/unknown hosts, confirmation cancellation, config changes during confirmation, stale discovery, forwarded SSH addresses, and shared teardown ordering:
The failing CI job reported TS2322 for assigning
RemotesEditorwithout a known input toIVisibleEditorPane; the corrected test now sets the input and verifies it rather than casting away the mismatch.No live remote connections or destructive operations were performed. Full smoke/integration suites were not run locally.
Manual checks