Skip to content

Keep sandbox chat input visible while connecting - #343023

Merged
Osvaldo Ortega (osortega) merged 2 commits into
mainfrom
osortega/keep-sandbox-composer-visible
Oct 20, 2026
Merged

Osvaldo Ortega (osortega) merged 2 commits into
mainfrom
osortega/keep-sandbox-composer-visible

Conversation

@osortega

@osortega Osvaldo Ortega (osortega) commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep the sandbox chat input visible and editable while cached or recorded history is displayed and the live connection is loading. Previously, the history model's read-only flag could hide the composer between history loading and live attachment.

Reuse the existing input-blocked state until live content is ready, without changing the history model or adding configuration. Sending remains disabled. Preserve archived-chat restrictions and recovery actions, and retain the Editor Window's existing connection-on-open policy.

No linked issue was provided.

Validation

The initial change passed client transpilation, 187 targeted browser tests, changed-file ESLint, and the patch whitespace check after rebasing onto main. The review follow-up also passed the ChatWidget suite (131 passing, 4 existing skips) and changed-file ESLint. Both reported bugs were reproduced by regression tests before applying the fixes.

Exact commands and results

Client transpilation — passed:

npm run build-fast -- --client-only

Targeted browser tests — 187 passed:

npm run test-browser-no-install -- --browser chromium --reporter dot \
  --run src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/cloudSandboxSessionHandler.test.ts \
  --run src/vs/sessions/contrib/chat/test/browser/chatView.test.ts \
  --run src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/cloudSandboxAgentHostContribution.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/editorCloudSandboxContribution.test.ts \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts \
  --run src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts \
  --grep 'CloudSandboxSessionHandler|Sessions - Chat View|keeps the sandbox composer|history recovery remains visible|policy read-only banner|renders history during automatic resume|opens original offline history|blocks submission without accepting input|passes read-only transitions|a visible read-only composer refuses|blocked input rejects send'

Changed-file ESLint — passed:

npm run eslint -- \
  src/vs/sessions/contrib/chat/browser/chatView.ts \
  src/vs/sessions/contrib/chat/test/browser/chatView.test.ts \
  src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionHandler.ts \
  src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts \
  src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/cloudSandboxSessionHandler.test.ts \
  src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/editorCloudSandboxContribution.test.ts \
  src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/cloudSandboxAgentHostContribution.test.ts \
  src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts

Review-fix ChatWidget tests — 131 passed, 4 skipped:

npm run test-browser-no-install -- --browser chromium --reporter dot \
  --run src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts \
  --grep 'ChatWidget'

Review-fix ESLint — passed:

npm run eslint -- \
  src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts \
  src/vs/workbench/contrib/chat/test/browser/widget/chatWidget.test.ts

Patch whitespace — passed:

git --no-pager diff --check origin/main...HEAD

Manual verification

Not performed against a live sandbox. To verify:

  1. In the Agents Window, open an existing disconnected sandbox conversation and begin composing while it connects.
  2. Confirm the input, draft, focus, and selection survive recorded-history loading and live attachment; sending stays disabled until live content is ready.
  3. Confirm archived/read-only chats still hide the input and history failures retain their recovery actions.
  4. In the Editor Window, confirm opening offline history allows drafting without automatically waking the sandbox.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 20, 2026 20:48

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.

🟡 Changes recommended

Recovery-banner layout and archived subagent composer handling still need correction.

2 open issues
What changed in this PR

Keeps sandbox chat drafts editable while recorded history is displayed and live content is loading, without enabling sending.

Changes:

  • Keeps recorded sessions input-blocked until live content is ready.
  • Updates composer visibility, archive handling, and recovery banners.
  • Adds regression coverage and documents offline drafting.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatWidget.test.ts Tests composer visibility and recovery actions.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​remoteAgentHost/​editorCloudSandboxContribution.test.ts Checks offline drafting without waking compute.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​remoteAgentHost/​cloudSandboxSessionHandler.test.ts Tests blocking through live attachment.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatWidget.ts Adjusts archive and recovery-banner visibility.
src/​vs/​workbench/​contrib/​chat/​browser/​remoteAgentHost/​cloudSandboxSessionHandler.ts Blocks input until live content attaches.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​test/​browser/​cloudSandboxAgentHostContribution.test.ts Checks blocking during automatic connection.
src/​vs/​sessions/​contrib/​providers/​remoteAgentHost/​REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md Documents Editor Window offline drafting.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​chatView.test.ts Covers recorded-history composer transitions.
src/​vs/​sessions/​contrib/​chat/​browser/​chatView.ts Keeps blocked composers visible with recorded history.

Review effort: Balanced

Comment thread src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@osortega
Osvaldo Ortega (osortega) marked this pull request as ready for review October 20, 2026 21:20
@osortega
Osvaldo Ortega (osortega) merged commit 2ea40b5 into main Oct 20, 2026
120 of 125 checks passed
@osortega
Osvaldo Ortega (osortega) deleted the osortega/keep-sandbox-composer-visible branch October 20, 2026 23:30
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 20, 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.

4 participants