Skip to content

Preserve unread state across remote host disconnect#318267

Merged
roblourens merged 3 commits into
mainfrom
agents/vsckb-implement-agent-host-sessions-maybe-especi-1140f5fe
May 26, 2026
Merged

Preserve unread state across remote host disconnect#318267
roblourens merged 3 commits into
mainfrom
agents/vsckb-implement-agent-host-sessions-maybe-especi-1140f5fe

Conversation

@roblourens
Copy link
Copy Markdown
Member

Summary

  • avoid reporting cached remote agent host sessions as removed when a host is temporarily unpublished
  • re-announce cached remote sessions after reconnect so the sessions list refreshes without treating disconnect as deletion
  • document the read/pin state behavior and update remote provider tests

Validation

  • npm run compile-check-ts-native
  • npm run valid-layers-check
  • scripts/test.sh --grep 'SessionsListModelService|RemoteAgentHostSessionsProvider'

roblourens and others added 2 commits May 25, 2026 17:34
Avoid reporting cached remote agent host sessions as removed when a host is temporarily unpublished during disconnect/reconnect. Re-announce cached sessions when the host reconnects so the sessions list refreshes without treating the outage as deletion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 26, 2026 00:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the remote agent host sessions provider so temporary remote disconnects don’t get treated as real session deletions, preserving local UI state (notably unread/pin) while still refreshing the sessions list correctly on reconnect.

Changes:

  • Stop reporting cached remote sessions as “removed” when a remote host is temporarily unpublished; instead hide them while keeping the cache.
  • On reconnect after being unpublished, re-announce cached sessions so the sessions list refreshes without a delete/re-add cycle.
  • Update documentation and remote provider tests to reflect the new disconnect/reconnect semantics.
Show a summary per file
File Description
src/vs/sessions/SESSIONS_LIST.md Documents cleanup semantics for pin/read state vs. true removals and remote disconnect hiding behavior.
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostSessionsProvider.test.ts Updates tests to assert that unpublish hides sessions without “removed” events, and reconnect re-announces sessions.
src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts Tracks unpublished state across reconnect and changes unpublish behavior to avoid removal events.
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts Extends refresh logic to optionally re-announce existing cached sessions as “added” on reconnect.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 2

Comment thread src/vs/sessions/SESSIONS_LIST.md Outdated
Report updated cached sessions as changed when re-announcing them after a remote reconnect, and fix the sessions list documentation grammar.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens roblourens marked this pull request as ready for review May 26, 2026 02:12
@roblourens roblourens enabled auto-merge (squash) May 26, 2026 02:12
@roblourens roblourens merged commit e84ab99 into main May 26, 2026
25 checks passed
@roblourens roblourens deleted the agents/vsckb-implement-agent-host-sessions-maybe-especi-1140f5fe branch May 26, 2026 03:31
@vs-code-engineering vs-code-engineering Bot added this to the 1.122.0 milestone May 26, 2026
anthonykim1 added a commit that referenced this pull request May 26, 2026
Squashed cherry-pick of 10 commits from main that are included in the
Insiders build (183159e) people are verifying:

- agentHost: show fetched URL for web_fetch (#318240)
- Fix SSH remote agent host passphrase auth (#318244)
- agentHost: add setting to disable worktreeCreated task auto-dispatch (#318243)
- Agent host: clearer worktree git timeout errors and 60s budget (#318242)
- Normalize LF to CRLF in agent host terminal tool output (#318257)
- sessions: restore X-button removal of SSH remote agent host entries (#318262)
- chat: fix duplicate command registration for agent-host-copilotcli (#318273)
- launch: build copilot in compile; wait for CDP in launch.sh (#318272)
- Preserve unread state across remote host disconnect (#318267)
- Add more codenotify for terminal (#318285)
dileepyavan pushed a commit that referenced this pull request May 27, 2026
Squashed cherry-pick of 10 commits from main that are included in the
Insiders build (183159e) people are verifying:

- agentHost: show fetched URL for web_fetch (#318240)
- Fix SSH remote agent host passphrase auth (#318244)
- agentHost: add setting to disable worktreeCreated task auto-dispatch (#318243)
- Agent host: clearer worktree git timeout errors and 60s budget (#318242)
- Normalize LF to CRLF in agent host terminal tool output (#318257)
- sessions: restore X-button removal of SSH remote agent host entries (#318262)
- chat: fix duplicate command registration for agent-host-copilotcli (#318273)
- launch: build copilot in compile; wait for CDP in launch.sh (#318272)
- Preserve unread state across remote host disconnect (#318267)
- Add more codenotify for terminal (#318285)
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