Gray out remembered folders for offline agent hosts#312063
Conversation
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>
There was a problem hiding this comment.
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
disabledwhen 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
| @@ -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 }); | |||
There was a problem hiding this comment.
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.
… 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>
roblourens
left a comment
There was a problem hiding this comment.
Agreed on both counts — renamed isOffline → isUnavailable 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>
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
isOfflineflag through to each remembered-folder item and setsdisabled: 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)