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.
This commit is contained in:
Neil
2026-11-11 19:18:09 -08:00
parent 38ff9775b4
commit 94273d388f
2 changed files with 5 additions and 2 deletions
@@ -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
@@ -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 ? (
<span className="flex items-center gap-1.5" data-wsl-host-connecting="">
<Loader2 className="size-3.5 animate-spin" />
<LoadingSpinner className="size-4" />
{t('components.native-chat.hostOutage.connecting', 'Connecting to {{distro}}…', {
distro
})}