From ad7e3d77905507226b4eb871df08f2bf54cf9c2d Mon Sep 17 00:00:00 2001 From: Josh Gratton Date: Mon, 18 May 2026 08:13:26 -0400 Subject: [PATCH] fix(web): use a container icon for desktopLocal threads in the sidebar WSL threads were rendered with the same cloud icon as true remote saved envs, which made an actively-connected WSL backend look like cloud storage in the project tree. Pull the desktopLocal marker out of the saved-env registry for each thread and render ContainerIcon for those entries instead, so the WSL backend shows as a local sandbox and cloud stays reserved for remote envs. The thread row tooltip already surfaces the env's saved label (e.g. "WSL (default distro)"), so the icon swap is the only change visible to the user. --- apps/web/src/components/Sidebar.tsx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index e8c5bbe0b1..732d30e34e 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -3,6 +3,7 @@ import { ArrowUpDownIcon, ChevronRightIcon, CloudIcon, + ContainerIcon, FolderPlusIcon, SearchIcon, SettingsIcon, @@ -355,8 +356,15 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP const remoteEnvSavedLabel = useSavedEnvironmentRegistryStore( (s) => s.byId[thread.environmentId]?.label ?? null, ); + // desktopLocal entries (e.g. the WSL backend) live in the + // saved-environment registry alongside true remote envs, but they + // run on the user's own machine. The cloud icon is misleading for + // them, so we render a container icon instead. + const isDesktopLocalThread = useSavedEnvironmentRegistryStore((s) => + Boolean(s.byId[thread.environmentId]?.desktopLocal), + ); const threadEnvironmentLabel = isRemoteThread - ? (remoteEnvLabel ?? remoteEnvSavedLabel ?? "Remote") + ? (remoteEnvLabel ?? remoteEnvSavedLabel ?? (isDesktopLocalThread ? "Local" : "Remote")) : null; // For grouped projects, the thread may belong to a different environment // than the representative project. Look up the thread's own project cwd @@ -679,12 +687,18 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP } > - + {isDesktopLocalThread ? ( + + ) : ( + + )} {threadEnvironmentLabel}