From 185032bd1794bf10a7524c5a866e78b3bc70df4d Mon Sep 17 00:00:00 2001 From: Josh Gratton Date: Fri, 12 Jun 2026 08:48:05 -0400 Subject: [PATCH] fix(desktop): tighten WSL environment affordances per review - Connections settings: disable Connect/Disconnect and Remove on the WSL backend's row. It's a desktop-managed local backend, not a remote environment you connect to or remove here, and reconcile would just re-create a removed one. Added a tooltip pointing at the WSL on/off setting that actually manages its lifecycle. - Command palette: drop the dedicated "Open WSL folder" command. The generic "Add project" flow already offers the WSL-vs-Windows environment picker, so a WSL-only shortcut with no Windows counterpart was redundant and asymmetric. --- apps/web/src/components/CommandPalette.tsx | 24 ------- .../settings/ConnectionsSettings.tsx | 68 ++++++++++++------- 2 files changed, 44 insertions(+), 48 deletions(-) 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 = ( + + + + + ); + return (
@@ -1543,30 +1577,16 @@ function SavedBackendListRow({ ) : null}
- - + {isWslEnvironment ? ( + + + + The WSL backend is managed by the WSL setting above — turn it on or off there. + + + ) : ( + actionButtons + )}