Repository navigation
sessions: Surface remote connection errors and fix Remotes layout - #344135
Merged
Merged
Conversation
Retain connection failure details for disconnected warning hovers and accessibility. Keep the final row scrollable, avoid row-text hovers intercepting wheel input, and separate group chevrons from visibility controls. Fixes #343964. Fixes #343981. Co-authored-by: Copilot <[email protected]>
Populate empty aggregate error messages before IPC serialization so dual-stack SSH failures show their address and port instead of an unknown error. Cover IPC round trips and preserve existing messages and error codes. Co-authored-by: Copilot <[email protected]>
Contributor
Screenshot ChangesBase: Changed (19)Added (4) |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The scoped fixes preserve retry behavior, have focused regression coverage, and leave no unresolved blocking findings.
No open issues 🎉
What changed in this PR
This PR addresses silent remote connection failures and clipped Remotes rows in the Agents Window, building on the environment-management work in #344083.
Changes:
- Preserve connection errors through SSH, connection-factory, handshake, and managed-reconnect paths, then expose them through warnings, hovers, and accessible content.
- Correct viewport sizing, reserve horizontal scrollbar space, and adjust row hovers and gutter alignment.
- Add regression tests and fixtures for connection failures and short or narrow layouts.
No blocking issues remain. Reported validation covers focused automated tests and fixture interactions; live SSH authentication flows and non-Windows native platforms were not exercised.
| File | Description |
|---|---|
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesWidget.test.ts |
Tests warnings, accessibility, gutter alignment, scrolling, and hovers. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remotesWidget.fixture.ts |
Adds connection-error and short-window fixtures. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteHostOptions.test.ts |
Tests error details in disconnected-status hovers. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/managedReconnectAgentHostContribution.test.ts |
Tests reconnect error retention and cancellation behavior. |
src/vs/sessions/contrib/providers/remoteAgentHost/electron-browser/remotes.contribution.ts |
Documents connection warnings in accessibility help. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remotesWidget.ts |
Updates viewport sizing, column widths, and accessible error labels. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remotesTable.ts |
Renders connection warnings and mouse-positioned empty-row hovers. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteHostOptions.ts |
Includes connection errors in status hovers. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/media/remotesWidget.css |
Styles warnings, header sizing, and gutter alignment. |
src/vs/sessions/contrib/providers/remoteAgentHost/browser/managedReconnectAgentHostContribution.ts |
Preserves failure details on managed-reconnect providers. |
src/vs/platform/agentHost/test/node/sshRemoteAgentHostService.test.ts |
Tests SSH error details surviving serialization. |
src/vs/platform/agentHost/test/electron-browser/remoteAgentHostService.test.ts |
Tests factory and handshake failures, cancellation, and recovery. |
src/vs/platform/agentHost/node/sshRemoteAgentHostService.ts |
Supplies messages for otherwise empty aggregate SSH errors. |
src/vs/platform/agentHost/common/remoteAgentHostService.ts |
Adds an optional display message to disconnected status. |
src/vs/platform/agentHost/browser/remoteAgentHostServiceImpl.ts |
Retains connection failure messages while omitting cancellation errors. |
Review effort: Balanced
Show connection warnings only for user-requested attempts, including explicit joins of pending background connections. Keep automatic failures in diagnostics without changing retry behavior. Co-authored-by: Copilot <[email protected]>
Preserve the last user-visible connection failure while automatic retries are pending, update it on failure, and clear it on success. Keep tunnel discovery from resetting the warning and anchor the icon to the Connection column's right edge. Co-authored-by: Copilot <[email protected]>
Keep lastConnectionError on service-owned connection metadata and consume it independently in Remotes and picker hovers. Preserve warning retention through retries, cleanup, and right alignment while simplifying the status union. Co-authored-by: Copilot <[email protected]>
Christof Marti (chrmarti)
marked this pull request as ready for review
October 25, 2026 20:25
Christof Marti (chrmarti)
enabled auto-merge
October 25, 2026 20:25
Christof Marti (chrmarti)
disabled auto-merge
October 25, 2026 20:25
Christof Marti (chrmarti)
enabled auto-merge
October 25, 2026 20:26
Alexandru Dima (alexdima)
approved these changes
Oct 25, 2026
This was referenced Oct 25, 2026
Christof Marti (chrmarti)
added a commit
that referenced
this pull request
Oct 25, 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. --> Built on #344135 (`chrmarti/remotes-status-layout`). That parent merged while this follow-up was being published, so this PR targets `main`. Refs #343790. Follow-up test plan: #344161. ## Changes Enable `sessions.chat.experimental.environmentPickerManageRemotes` by 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. - Changed-TypeScript ESLint and hygiene — passed. - Component Explorer render/dispose error check for `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 1. Enable the Environment picker, remote agent hosts, and GitHub Environments for an eligible account. Leave Remotes management unset to exercise its new default. Discover a shared user-local machine without connecting to it from this window. 2. Open the Environment picker. Its environment row should have no per-entry Manage submenu, and selecting it should still work. Use the bottom Manage action for the central editor. 3. Connect and disconnect the environment; reopen the picker and verify the submenu stays absent while the inventory includes it. 4. Disable the Remotes management setting and reopen the picker: the per-entry Manage action should return. Configured WebSocket hosts should retain their management route in either mode. 5. Disable the Environment picker or remote agent hosts: the Command Palette and Sessions overflow entries should disappear. Turning the Environment picker back on should restore management. With the Environment picker off, do not suppress per-entry Manage submenus. Live provider/account flows were not exercised for this fix; picker interaction is covered using the production picker with test services.
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.
Stacked on #344083 (
chrmarti/remotes-environment-delete).Fixes #343964. Fixes #343981.
Changes
Investigation
For #343964, factory/handshake failures discarded their display message, and the managed SSH reconnect handler reset the provider to plain Disconnected. Keeping the actual failure in the status lets Remotes show it without changing connection orchestration.
For #343981, the current layout could clip the final row by the header's unaccounted border, with further overlap from the horizontal scrollbar in narrow windows. A live narrow-window probe also stalled at scrollTop 100 with 6 pixels remaining: the empty-row text hover had opened directly under the stationary pointer and was consuming wheel events. Moving off the hover completed scrolling. With these changes the same stationary-pointer wheel sequence reaches the full final row, and Tab reaches Remote Tunnels Guide.
Validation
Passed:
The combined runs passed 239 Electron tests and 291 browser tests. After the final row-hover regression was added, the affected suite was rerun successfully:
Final widget results: 58 Electron tests; 57 in each browser.
Changed-TypeScript ESLint passed (12 files), CSS stylelint passed, direct hygiene passed (13 files), and
git diff --checkpassed.Component Explorer rendered/disposed all 8 new themed fixtures without errors. Inspected the connection warning in dark, light, and both high-contrast themes. An isolated Edge interaction verified the exact error hover and stationary-pointer wheel scrolling plus keyboard access to the bottom setup link at both 700px and 360px widths. The final row ends at the list viewport bottom (204px wide, 194px narrow, with 10px reserved for the horizontal scrollbar).
Full workbench SSH authentication/connection flows, full smoke tests, and non-Windows native platforms were not exercised. Connection failure propagation is covered by service/retry tests; UI interactions use fixture data.
Manual test