diff --git a/apps/web/src/components/CommandPalette.tsx b/apps/web/src/components/CommandPalette.tsx index 0d05d7a30d..3e41a4f94d 100644 --- a/apps/web/src/components/CommandPalette.tsx +++ b/apps/web/src/components/CommandPalette.tsx @@ -480,15 +480,6 @@ function OpenCommandPaletteDialog() { savedEnvironmentRegistry, savedEnvironmentRuntimeById, ]); - const wslAddProjectEnvironmentOption = useMemo( - () => - addProjectEnvironmentOptions.find((option) => - isDesktopLocalWslInstance( - savedEnvironmentRegistry[option.environmentId]?.desktopLocal?.instanceId, - ), - ) ?? null, - [addProjectEnvironmentOptions, savedEnvironmentRegistry], - ); const defaultAddProjectEnvironmentId = addProjectEnvironmentOptions[0]?.environmentId ?? null; const browseEnvironmentId = addProjectEnvironmentId ?? defaultAddProjectEnvironmentId; const browseEnvironmentPlatform = useMemo(() => { @@ -1074,21 +1065,6 @@ function OpenCommandPaletteDialog() { }, }); - if (wslAddProjectEnvironmentOption) { - actionItems.push({ - kind: "action", - value: "action:add-project:wsl-folder", - searchTerms: ["add project", "open", "wsl", "linux", "ubuntu", "folder", "directory"], - title: "Open WSL folder", - description: wslAddProjectEnvironmentOption.label, - icon: , - keepOpen: true, - run: async () => { - startAddProjectBrowse(wslAddProjectEnvironmentOption.environmentId); - }, - }); - } - actionItems.push({ kind: "action", value: "action:settings", diff --git a/apps/web/src/components/settings/ConnectionsSettings.tsx b/apps/web/src/components/settings/ConnectionsSettings.tsx index 65af16e54c..6bb1010f7c 100644 --- a/apps/web/src/components/settings/ConnectionsSettings.tsx +++ b/apps/web/src/components/settings/ConnectionsSettings.tsx @@ -1511,6 +1511,40 @@ function SavedBackendListRow({ : null, ].filter((value): value is string => value !== null); + // The WSL backend is a desktop-managed local backend (instanceId "wsl:"), + // not a remote environment you connect to or remove here — its lifecycle is driven + // by the WSL on/off + distro picker on this page. Disabling Connect/Disconnect/Remove + // avoids confusing no-ops (reconcile would just re-create a removed WSL env). + const isWslEnvironment = record.desktopLocal?.instanceId?.startsWith("wsl:") === true; + const actionButtons = ( + + + void (isConnected ? onDisconnect(environmentId) : onConnect(environmentId)) + } + > + {isConnected + ? isDisconnecting + ? "Disconnecting…" + : "Disconnect" + : isConnecting + ? "Connecting…" + : "Connect"} + + void onRemove(environmentId)} + > + {removingEnvironmentId === environmentId ? "Removing…" : "Remove"} + + + ); + return ( @@ -1543,30 +1577,16 @@ function SavedBackendListRow({ ) : null} - - void (isConnected ? onDisconnect(environmentId) : onConnect(environmentId)) - } - > - {isConnected - ? isDisconnecting - ? "Disconnecting…" - : "Disconnect" - : isConnecting - ? "Connecting…" - : "Connect"} - - void onRemove(environmentId)} - > - {removingEnvironmentId === environmentId ? "Removing…" : "Remove"} - + {isWslEnvironment ? ( + + + + The WSL backend is managed by the WSL setting above — turn it on or off there. + + + ) : ( + actionButtons + )}