Skip to content

Gray out remembered folders for offline agent hosts#312063

Merged
roblourens merged 3 commits intomainfrom
roblou/agents/gray-out-remembered-folders
Apr 23, 2026
Merged

Gray out remembered folders for offline agent hosts#312063
roblourens merged 3 commits intomainfrom
roblou/agents/gray-out-remembered-folders

Conversation

@roblourens
Copy link
Copy Markdown
Member

In the session workspace picker, the agent host row for a disconnected remote host is shown grayed out, but the remembered (previously used) folders for that host were still rendered as enabled.

This threads the existing isOffline flag through to each remembered-folder item and sets disabled: isOffline, so they visually match the offline host row. Clicking these items was already a no-op via _isProviderUnavailable; this just brings the visual state in line.

(Written by Copilot)

In the session workspace picker, remembered folders belonging to a
disconnected remote agent host are now rendered as disabled, matching
the offline host row. Selection of these items was already a no-op via
_isProviderUnavailable; this just brings the visual state in line.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 23, 2026 02:32
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

Updates the Agents window session workspace picker so remembered folders for a disconnected/unavailable remote agent host are rendered as disabled, matching the visual “offline” state already shown for the host row.

Changes:

  • Thread isOffline (provider unavailable) state into flattened recent-workspace entries.
  • Mark remembered-folder action list items as disabled when the provider is unavailable.
Show a summary per file
File Description
src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts Propagates provider offline/unavailable state to recent workspace items and disables them in the action list UI.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines +349 to +356
@@ -353,7 +353,7 @@ export class WorkspacePicker extends Disposable {
for (const { workspace, providerId, isOwnRecent } of providerWorkspaces) {
const groupName = workspace.group ?? provider.label;
const groupTitle = isOffline ? localize('workspacePicker.groupOffline', "{0} (Offline)", groupName) : groupName;
workspaceEntries.push({ workspace, providerId, isOwnRecent, groupTitle });
workspaceEntries.push({ workspace, providerId, isOwnRecent, groupTitle, isOffline });
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

isOffline here is derived from _isProviderUnavailable, which returns true for both Disconnected and Connecting statuses. That means the group title will show "(Offline)" (and now the recent workspace rows will be disabled) even while the provider is still connecting, which is a user-visible status mismatch. Consider either (a) distinguishing Connecting vs Disconnected when building groupTitle/disabled, or (b) renaming this flag (and the label) to something like "Unavailable" so it remains accurate for both states.

Copilot uses AI. Check for mistakes.
… label

'_isProviderUnavailable' returns true for both Disconnected and
Connecting states, so '(Offline)' was inaccurate when a host is still
connecting. '(Unavailable)' is correct for both states.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member Author

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Agreed on both counts — renamed isOfflineisUnavailable and the localized label from (Offline) to (Unavailable) in e023bed. (Written by Copilot)

…onnecting

Use the exact connection status rather than the binary isProviderUnavailable
check so that:
- Disconnected: folders are grayed out + group label shows '(Offline)'
- Connecting:   folders are still enabled + group label shows '(Connecting)'
- Connected:    no change to label or disabled state

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens roblourens marked this pull request as ready for review April 23, 2026 03:02
@roblourens roblourens enabled auto-merge (squash) April 23, 2026 03:02
@roblourens roblourens merged commit 1febee7 into main Apr 23, 2026
26 checks passed
@roblourens roblourens deleted the roblou/agents/gray-out-remembered-folders branch April 23, 2026 03:31
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 23, 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