Skip to content

Enhance cloud sandbox UX for remote connections - #334644

Merged
Osvaldo Ortega (osortega) merged 2 commits into
mainfrom
agents/cloud-sandbox-ux-enhancement
Sep 5, 2026
Merged

Enhance cloud sandbox UX for remote connections#334644
Osvaldo Ortega (osortega) merged 2 commits into
mainfrom
agents/cloud-sandbox-ux-enhancement

Conversation

@osortega

@osortega Osvaldo Ortega (osortega) commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Improve the connection UX for GitHub-managed cloud sandbox sessions without exposing connection internals.

  • Open offline sessions from persisted history without automatically resuming the environment when a task ID is available. Sessions without a history fallback retain their existing connect-on-open path.
  • Show Environment offline. with Connect before the first attempt, and retain Retry after a failed attempt.
  • Use static Connecting... and Reconnecting... messages, with a retry countdown when available. This does not add phase-specific or whimsical progress messages.
  • Keep offline and initially connecting sandbox chats read-only. Preserve the composer during self-healing transport reconnects.
  • Prefer the banner while history loads, avoiding a centered recovery-screen flash before the transcript appears.
  • Keep connection labels provider-owned so the shared view does not need sandbox-specific branches; existing remote hosts retain their wording.
  • Guard activation against cancellation, feature teardown, and removal or replacement of the environment provider.

Validation

  • Local focused session/provider suites: 145 passing.
  • npm run typecheck-client: passed.
  • Regression coverage includes cancelled lookups, disable/re-enable races, provider removal and replacement, actual environment-lookup failures, and initial connecting versus self-healing reconnect interactivity.
  • No live sandbox or end-to-end validation was performed for these follow-up fixes.

Copilot AI balanced review requested due to automatic review settings September 4, 2026 22:33

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.

Copilot review overview

🟡 Changes recommended

Connection-state and activation races can expose writable chats prematurely or restore handlers after teardown.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 High severity · 1 Medium severity · 2 Low severity

New issues introduced by this change (4)
Severity Finding
High severity src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​cloudSandboxAgentHostContribution.ts — Disabling the feature while getEnvironment is in flight can resurrect a read-only content…
Medium severity src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​remoteAgentHostSessionsProvider.tsreadOnlyWhenDisconnected becomes false during the initial connecting state, even though the…
Low severity src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​browser/​cloudSandboxAgentHostContribution.ts — The PR description says cloud sandboxes will use context-specific wording such as “Resuming” and…
Low severity src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​cloudSandboxAgentHostContribution.test.ts — This test does not exercise an unreadable environment record: degraded is a successfully returned…
What changed in this PR

Improves cloud sandbox connection recovery and status presentation in the Agents Window.

Changes:

  • Adds provider-specific connection labels and connecting-state UI.
  • Opens dormant sandbox sessions from persisted history without automatically waking them.
  • Adds transcript-loading and connection-state regression coverage.
File Description
remoteHostUnavailableEmptyState.fixture.ts Adds offline and connecting fixtures.
chatGroupsView.test.ts Tests recovery states and labels.
remoteAgentHostSessionsProvider.test.ts Tests reconnect interactivity.
cloudSandboxAgentHostContribution.test.ts Tests sandbox activation behavior.
remoteAgentHostSessionsProvider.ts Adds labels and connection-driven read-only state.
cloudSandboxReadOnlySessionHandler.ts Updates history-provider semantics.
cloudSandboxAgentHostContribution.ts Revises sandbox activation and recovery.
chatView.ts (contrib) Exposes transcript loading state.
agentHostSessionsProvider.ts Defines provider connection labels.
sessionRemoteConnection.ts Updates connection messaging and actions.
remoteHostUnavailableEmptyState.ts Supports optional descriptions.
remoteHostUnavailableEmptyState.css Hides omitted descriptions.
chatView.ts (browser parts) Adds the loading-state contract.
chatGroupView.ts Selects recovery UI after transcript loading.

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

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 9db4cf85 Current: 13a9e53d

1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

Added (4)

sessions/remoteHostUnavailable/remoteHostUnavailableEmptyState/EnvironmentOffline/Dark

current

sessions/remoteHostUnavailable/remoteHostUnavailableEmptyState/EnvironmentOffline/Light

current

sessions/remoteHostUnavailable/remoteHostUnavailableEmptyState/EnvironmentConnecting/Dark

current

sessions/remoteHostUnavailable/remoteHostUnavailableEmptyState/EnvironmentConnecting/Light

current

Reject stale activation results after cancellation, feature teardown, or provider replacement. Keep initial sandbox connections read-only while preserving input during self-healing reconnects.

Add regression coverage for review feedback on #334644, including actual environment lookup failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@osortega
Osvaldo Ortega (osortega) marked this pull request as ready for review September 4, 2026 23:50
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/sessions/browser/parts/chatGroupView.ts
  • src/vs/sessions/browser/parts/chatView.ts
  • src/vs/sessions/browser/parts/media/remoteHostUnavailableEmptyState.css
  • src/vs/sessions/browser/parts/remoteHostUnavailableEmptyState.ts
  • src/vs/sessions/browser/parts/sessionRemoteConnection.ts

@osortega
Osvaldo Ortega (osortega) merged commit b67c3e1 into main Sep 5, 2026
40 checks passed
@osortega
Osvaldo Ortega (osortega) deleted the agents/cloud-sandbox-ux-enhancement branch September 5, 2026 02:10
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 5, 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.

3 participants