From 777f35c1113af7eb167ce815a48c0b260e21c43b Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 11 May 2026 19:57:17 -0700 Subject: [PATCH] Restore remote-row options picker in session workspace picker Clicking a remote host row in the Remote tab of the session workspace picker no longer opened the per-remote options popup (Reconnect / Remove / Copy connection string / Open settings / Show output). The remote rows are built with an inline `run` callback that invokes `_showRemoteHostOptionsDelayed`. A recent refactor extracted dispatch into a shared `_dispatchPickerItem` so the mobile sheet could reuse it, but the desktop `_buildDelegate.onSelect` was rewritten inline and dropped the `item.run` branch. Clicks fell through to `commandService.executeCommand` with a synthetic id that isn't a registered command, so nothing happened. Wire the desktop `onSelect` to `_dispatchPickerItem` so both presentations share the single source of truth. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../contrib/chat/browser/sessionWorkspacePicker.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts b/src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts index 0f6528c9ceffd..77c259ca8fe62 100644 --- a/src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts +++ b/src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts @@ -345,17 +345,7 @@ export class WorkspacePicker extends Disposable { return { onSelect: (item) => { hide(); - if (item.commandId) { - this.commandService.executeCommand(item.commandId); - } else if (item.selection && this._isProviderUnavailable(item.selection.providerId)) { - // Workspace belongs to an unavailable remote — ignore selection - return; - } - if (item.browseActionIndex !== undefined) { - this._executeBrowseAction(item.browseActionIndex); - } else if (item.selection) { - this._selectProject(item.selection); - } + this._dispatchPickerItem(item); }, onHide: () => { triggerElement.setAttribute('aria-expanded', 'false');