From 94273d388fa8475cebb9fccd9a71aa645f3cd79c Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 11 Nov 2026 19:18:09 -0800 Subject: [PATCH] fix(wsl): reduced-motion spinner for Connecting; SSH targets keep their own retry signal Review follow-up: the Connecting notice uses LoadingSpinner at size-4 per the style guide, and the editor reads WSL host status only for a workspace with no SSH target. --- .../src/components/editor/useEditorPanelFileLoadRetry.ts | 4 +++- .../src/components/wsl-host-stopped/WslHostStoppedNotice.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/components/editor/useEditorPanelFileLoadRetry.ts b/src/renderer/src/components/editor/useEditorPanelFileLoadRetry.ts index 78a9e2d9af0..3f4b52903bb 100644 --- a/src/renderer/src/components/editor/useEditorPanelFileLoadRetry.ts +++ b/src/renderer/src/components/editor/useEditorPanelFileLoadRetry.ts @@ -104,7 +104,9 @@ export function useEditorPanelFileLoadRetry({ const wslHostState = useAppStateValue((state) => wslEnvironmentId ? state.wslHostStatuses[wslEnvironmentId]?.state : undefined ) - const wslHost = wslHostRetryConnection(wslEnvironmentId, wslHostState) + // An SSH target keeps its own signal; only a workspace with none reads its WSL host. + const wslHost = + hostConnection.phase === 'local' ? wslHostRetryConnection(wslEnvironmentId, wslHostState) : null const hostTargetId = wslHost?.targetId ?? hostConnection.targetId const hostConnecting = wslHost?.connecting ?? hostConnection.phase === 'connecting' const connectedHostEpoch = wslHost ? wslHost.connectedEpoch : hostConnection.connectedEpoch diff --git a/src/renderer/src/components/wsl-host-stopped/WslHostStoppedNotice.tsx b/src/renderer/src/components/wsl-host-stopped/WslHostStoppedNotice.tsx index b8162d6bc53..e8aa3389b2b 100644 --- a/src/renderer/src/components/wsl-host-stopped/WslHostStoppedNotice.tsx +++ b/src/renderer/src/components/wsl-host-stopped/WslHostStoppedNotice.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react' import { Loader2 } from 'lucide-react' import { Button } from '@/components/ui/button' +import { LoadingSpinner } from '@/components/LoadingSpinner' import { LinuxPenguinIcon } from '@/components/icons/LinuxPenguinIcon' import { useMountedRef } from '@/hooks/useMountedRef' import { useTranslate } from '@/i18n/use-translate' @@ -55,7 +56,7 @@ export function WslHostStoppedNotice({ /> {connecting ? ( - + {t('components.native-chat.hostOutage.connecting', 'Connecting to {{distro}}…', { distro })}