Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): 隐藏远端设备加载失败提示 (#3797)
Dash53c088818f48
diff --git a/apps/desktop/src/renderer/__tests__/deviceLinkDeviceListLoading.test.tsx b/apps/desktop/src/renderer/__tests__/deviceLinkDeviceListLoading.test.tsxindex 18a68b813f..d983d1ce01 100644--- a/apps/desktop/src/renderer/__tests__/deviceLinkDeviceListLoading.test.tsx+++ b/apps/desktop/src/renderer/__tests__/deviceLinkDeviceListLoading.test.tsx@@ -12,9 +12,526 @@ beforeEach(() => {afterEach(() => {vi.unstubAllGlobals();+ vi.useRealTimers();});describe('useDeviceLinkDeviceList initial request', () => {+ it('silently retries a failed directory request without a later push event', async () => {+ let resolveRetry: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;+ let resolvePresenceRefresh: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;+ let presenceChanged: ((payload: DeviceLinkPresenceSnapshot) => void) | undefined;+ const retry = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {+ resolveRetry = resolve;+ });+ const presenceRefresh = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {+ resolvePresenceRefresh = resolve;+ });+ const listDevices = vi+ .fn()+ .mockRejectedValueOnce(new Error('relay unavailable'))+ .mockReturnValueOnce(retry)+ .mockReturnValueOnce(presenceRefresh);+ vi.useFakeTimers();+ vi.stubGlobal('electronAPI', {+ deviceLink: {+ listDevices,+ getState: vi.fn().mockResolvedValue({ linkStatus: 'online' }),+ onPresenceChanged: vi.fn((callback: (payload: DeviceLinkPresenceSnapshot) => void) => {+ presenceChanged = callback;+ }),+ onStatusChanged: vi.fn(),+ onControlTargetChanged: vi.fn(),+ },+ });++ const {+ useDeviceLinkDeviceList,+ useDeviceLinkDeviceListRequestState,+ useDeviceLinkDeviceListSettled,+ nextDeviceListRetryDelay,+ } = await import('@/features/device-link/useDeviceLinkDeviceList');+ const { result } = renderHook(() => ({+ devices: useDeviceLinkDeviceList(),+ request: useDeviceLinkDeviceListRequestState(),+ settled: useDeviceLinkDeviceListSettled(),+ }));++ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('error');+ expect(result.current.settled).toBe(true);+ expect(listDevices).toHaveBeenCalledTimes(1);++ await act(async () => {+ vi.advanceTimersByTime(nextDeviceListRetryDelay(0));+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(2);+ expect(result.current).toEqual({+ devices: null,+ request: { status: 'error', error: 'relay unavailable' },+ settled: true,+ });++ act(() =>+ presenceChanged?.({+ deviceId: 'peer-1',+ online: true,+ deviceName: 'Peer Mac',+ platform: 'darwin',+ appVersion: '0.1.27',+ lastSeenAt: 1_000,+ remoteControlEnabled: true,+ busy: false,+ }),+ );+ expect(listDevices).toHaveBeenCalledTimes(2);+ expect(result.current.settled).toBe(true);++ await act(async () => {+ resolveRetry?.({ devices: [] });+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(3);+ expect(result.current).toEqual({+ devices: [],+ request: { status: 'ready', error: null },+ settled: true,+ });++ await act(async () => {+ resolvePresenceRefresh?.({ devices: [] });+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current).toEqual({+ devices: [],+ request: { status: 'ready', error: null },+ settled: true,+ });+ });++ it('keeps the backoff timer when presence arrives before the first snapshot', async () => {+ let resolveBackground: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;+ let presenceChanged: ((payload: DeviceLinkPresenceSnapshot) => void) | undefined;+ const background = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {+ resolveBackground = resolve;+ });+ const listDevices = vi+ .fn()+ .mockRejectedValueOnce(new Error('relay unavailable'))+ .mockReturnValueOnce(background);+ vi.useFakeTimers();+ vi.stubGlobal('electronAPI', {+ deviceLink: {+ listDevices,+ getState: vi.fn().mockResolvedValue({ linkStatus: 'online' }),+ onPresenceChanged: vi.fn((callback: (payload: DeviceLinkPresenceSnapshot) => void) => {+ presenceChanged = callback;+ }),+ onStatusChanged: vi.fn(),+ onControlTargetChanged: vi.fn(),+ },+ });++ const {+ useDeviceLinkDeviceList,+ useDeviceLinkDeviceListRequestState,+ nextDeviceListRetryDelay,+ } = await import('@/features/device-link/useDeviceLinkDeviceList');+ const { result } = renderHook(() => ({+ devices: useDeviceLinkDeviceList(),+ request: useDeviceLinkDeviceListRequestState(),+ }));++ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.devices).toBeNull();+ expect(result.current.request.status).toBe('error');++ // With no snapshot, a busy/lastSeen presence cannot be classified as a+ // newly visible device. It must not cancel the scheduled retry.+ act(() =>+ presenceChanged?.({+ deviceId: 'self-1',+ online: true,+ deviceName: 'This Mac',+ platform: 'darwin',+ appVersion: '0.1.27',+ lastSeenAt: 2_000,+ remoteControlEnabled: true,+ busy: true,+ }),+ );+ expect(listDevices).toHaveBeenCalledTimes(1);+ expect(result.current.request.status).toBe('error');++ await act(async () => {+ vi.advanceTimersByTime(nextDeviceListRetryDelay(0));+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(2);+ resolveBackground?.({ devices: [] });+ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('ready');+ });++ it('filters busy-only presence while a background retry is in flight when a snapshot exists', async () => {+ let resolveBackground: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;+ let presenceChanged: ((payload: DeviceLinkPresenceSnapshot) => void) | undefined;+ let statusChanged:+ ((payload: { status: 'stopped' | 'connecting' | 'online' }) => void) | undefined;+ const cachedDevices = [+ {+ deviceId: 'self-1',+ name: 'This Mac',+ platform: 'darwin',+ online: true,+ remoteControlEnabled: true,+ controlEnabled: true,+ isSelf: true,+ } as unknown as DeviceLinkDeviceView,+ ];+ const background = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {+ resolveBackground = resolve;+ });+ const listDevices = vi+ .fn()+ .mockResolvedValueOnce({ devices: cachedDevices })+ .mockRejectedValueOnce(new Error('relay unavailable'))+ .mockReturnValueOnce(background);+ vi.useFakeTimers();+ vi.stubGlobal('electronAPI', {+ deviceLink: {+ listDevices,+ getState: vi.fn().mockResolvedValue({ linkStatus: 'online' }),+ onPresenceChanged: vi.fn((callback: (payload: DeviceLinkPresenceSnapshot) => void) => {+ presenceChanged = callback;+ }),+ onStatusChanged: vi.fn(+ (callback: (payload: { status: 'stopped' | 'connecting' | 'online' }) => void) => {+ statusChanged = callback;+ },+ ),+ onControlTargetChanged: vi.fn(),+ },+ });++ const {+ useDeviceLinkDeviceList,+ useDeviceLinkDeviceListRequestState,+ nextDeviceListRetryDelay,+ } = await import('@/features/device-link/useDeviceLinkDeviceList');+ const { result } = renderHook(() => ({+ devices: useDeviceLinkDeviceList(),+ request: useDeviceLinkDeviceListRequestState(),+ }));++ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('ready');+ act(() => statusChanged?.({ status: 'online' }));+ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('error');+ expect(listDevices).toHaveBeenCalledTimes(2);++ await act(async () => {+ vi.advanceTimersByTime(nextDeviceListRetryDelay(0));+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(3);++ act(() =>+ presenceChanged?.({+ deviceId: 'self-1',+ online: true,+ deviceName: 'This Mac',+ platform: 'darwin',+ appVersion: '0.1.27',+ lastSeenAt: 1_000,+ remoteControlEnabled: true,+ busy: true,+ }),+ );+ resolveBackground?.({ devices: cachedDevices });+ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(3);+ });++ it('filters busy-only presence while waiting for a background retry timer', async () => {+ let resolveBackground: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;+ let presenceChanged: ((payload: DeviceLinkPresenceSnapshot) => void) | undefined;+ let statusChanged:+ ((payload: { status: 'stopped' | 'connecting' | 'online' }) => void) | undefined;+ const cachedDevices = [+ {+ deviceId: 'peer-1',+ name: 'Peer Mac',+ platform: 'darwin',+ online: true,+ remoteControlEnabled: true,+ controlEnabled: true,+ isSelf: false,+ } as unknown as DeviceLinkDeviceView,+ ];+ const background = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {+ resolveBackground = resolve;+ });+ const listDevices = vi+ .fn()+ .mockResolvedValueOnce({ devices: cachedDevices })+ .mockRejectedValueOnce(new Error('relay unavailable'))+ .mockReturnValueOnce(background);+ vi.useFakeTimers();+ vi.stubGlobal('electronAPI', {+ deviceLink: {+ listDevices,+ getState: vi.fn().mockResolvedValue({ linkStatus: 'online' }),+ onPresenceChanged: vi.fn((callback: (payload: DeviceLinkPresenceSnapshot) => void) => {+ presenceChanged = callback;+ }),+ onStatusChanged: vi.fn(+ (callback: (payload: { status: 'stopped' | 'connecting' | 'online' }) => void) => {+ statusChanged = callback;+ },+ ),+ onControlTargetChanged: vi.fn(),+ },+ });++ const {+ useDeviceLinkDeviceList,+ useDeviceLinkDeviceListRequestState,+ nextDeviceListRetryDelay,+ } = await import('@/features/device-link/useDeviceLinkDeviceList');+ const { result } = renderHook(() => ({+ devices: useDeviceLinkDeviceList(),+ request: useDeviceLinkDeviceListRequestState(),+ }));++ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('ready');++ // A status push starts a foreground refresh which fails and schedules the+ // first 2s retry. A busy-only presence must leave that timer untouched.+ act(() => statusChanged?.({ status: 'online' }));+ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(2);+ expect(result.current.request.status).toBe('error');++ // While the timer is pending, another busy-only presence must not issue a+ // third request or reopen loading.+ act(() =>+ presenceChanged?.({+ deviceId: 'peer-1',+ online: true,+ deviceName: 'Peer Mac',+ platform: 'darwin',+ appVersion: '0.1.27',+ lastSeenAt: 2_000,+ remoteControlEnabled: true,+ busy: true,+ }),+ );+ expect(listDevices).toHaveBeenCalledTimes(2);+ expect(result.current.request.status).toBe('error');++ await act(async () => {+ vi.advanceTimersByTime(nextDeviceListRetryDelay(0));+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(3);+ resolveBackground?.({ devices: cachedDevices });+ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('ready');+ });++ it('carries a relevant presence across a foreground refresh that supersedes a background retry', async () => {+ let resolveBackground: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;+ let resolveForeground: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;+ let resolveFollowUp: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;+ let presenceChanged: ((payload: DeviceLinkPresenceSnapshot) => void) | undefined;+ let statusChanged:+ ((payload: { status: 'stopped' | 'connecting' | 'online' }) => void) | undefined;+ const background = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {+ resolveBackground = resolve;+ });+ const foreground = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {+ resolveForeground = resolve;+ });+ const followUp = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {+ resolveFollowUp = resolve;+ });+ const listDevices = vi+ .fn()+ .mockRejectedValueOnce(new Error('relay unavailable'))+ .mockReturnValueOnce(background)+ .mockReturnValueOnce(foreground)+ .mockReturnValueOnce(followUp);+ vi.useFakeTimers();+ vi.stubGlobal('electronAPI', {+ deviceLink: {+ listDevices,+ getState: vi.fn().mockResolvedValue({ linkStatus: 'online' }),+ onPresenceChanged: vi.fn((callback: (payload: DeviceLinkPresenceSnapshot) => void) => {+ presenceChanged = callback;+ }),+ onStatusChanged: vi.fn(+ (callback: (payload: { status: 'stopped' | 'connecting' | 'online' }) => void) => {+ statusChanged = callback;+ },+ ),+ onControlTargetChanged: vi.fn(),+ },+ });++ const {+ useDeviceLinkDeviceList,+ useDeviceLinkDeviceListRequestState,+ nextDeviceListRetryDelay,+ } = await import('@/features/device-link/useDeviceLinkDeviceList');+ const { result } = renderHook(() => ({+ devices: useDeviceLinkDeviceList(),+ request: useDeviceLinkDeviceListRequestState(),+ }));++ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('error');+ await act(async () => {+ vi.advanceTimersByTime(nextDeviceListRetryDelay(0));+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(2);++ act(() => statusChanged?.({ status: 'online' }));+ expect(listDevices).toHaveBeenCalledTimes(3);++ act(() =>+ presenceChanged?.({+ deviceId: 'peer-1',+ online: true,+ deviceName: 'Peer Mac',+ platform: 'darwin',+ appVersion: '0.1.27',+ lastSeenAt: 1_000,+ remoteControlEnabled: true,+ busy: false,+ }),+ );++ resolveBackground?.({ devices: [] });+ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(3);++ resolveForeground?.({ devices: [] });+ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(4);++ resolveFollowUp?.({ devices: [] });+ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('ready');+ });++ it('cancels a pending silent retry when the relay stops', async () => {+ let statusChanged:+ ((payload: { status: 'stopped' | 'connecting' | 'online' }) => void) | undefined;+ const listDevices = vi.fn().mockRejectedValueOnce(new Error('relay unavailable'));+ vi.useFakeTimers();+ vi.stubGlobal('electronAPI', {+ deviceLink: {+ listDevices,+ getState: vi.fn().mockResolvedValue({ linkStatus: 'online' }),+ onPresenceChanged: vi.fn(),+ onStatusChanged: vi.fn(+ (callback: (payload: { status: 'stopped' | 'connecting' | 'online' }) => void) => {+ statusChanged = callback;+ },+ ),+ onControlTargetChanged: vi.fn(),+ },+ });++ const {+ useDeviceLinkDeviceList,+ useDeviceLinkDeviceListRequestState,+ nextDeviceListRetryDelay,+ } = await import('@/features/device-link/useDeviceLinkDeviceList');+ const { result } = renderHook(() => ({+ devices: useDeviceLinkDeviceList(),+ request: useDeviceLinkDeviceListRequestState(),+ }));++ await act(async () => {+ await Promise.resolve();+ await Promise.resolve();+ });+ expect(result.current.request.status).toBe('error');++ act(() => statusChanged?.({ status: 'stopped' }));+ await act(async () => {+ vi.advanceTimersByTime(nextDeviceListRetryDelay(0));+ await Promise.resolve();+ });+ expect(listDevices).toHaveBeenCalledTimes(1);+ expect(result.current.request).toEqual({ status: 'ready', error: null });+ });++ it('caps silent retry backoff while preserving recovery', async () => {+ const { nextDeviceListRetryDelay } =+ await import('@/features/device-link/useDeviceLinkDeviceList');+ expect(nextDeviceListRetryDelay(0)).toBe(2_000);+ expect(nextDeviceListRetryDelay(2_000)).toBe(4_000);+ expect(nextDeviceListRetryDelay(16_000)).toBe(30_000);+ expect(nextDeviceListRetryDelay(30_000)).toBe(30_000);+ });+it('re-enters loading when online retries a rejected request with no device snapshot', async () => {let resolveRetry: ((value: { devices: DeviceLinkDeviceView[] }) => void) | undefined;const retry = new Promise<{ devices: DeviceLinkDeviceView[] }>((resolve) => {diff --git a/apps/desktop/src/renderer/__tests__/dialogueSidebarSection.test.ts b/apps/desktop/src/renderer/__tests__/dialogueSidebarSection.test.tsindex 638a847d44..7eec87e04d 100644--- a/apps/desktop/src/renderer/__tests__/dialogueSidebarSection.test.ts+++ b/apps/desktop/src/renderer/__tests__/dialogueSidebarSection.test.ts@@ -110,9 +110,13 @@ describe('Mixed main list (sidebar-redesign D 期)', () => {expect(sidebarSource).not.toContain('retryRemoteSessionBootstrap(device.deviceId)');expect(sidebarSource).not.toContain("'ccAgent.sidebar.machineSwitcher.retryTasks'");expect(sidebarSource).toContain("'ccAgent.sidebar.machineSwitcher.tasksLoading'");- expect(sidebarSource).toContain("'ccAgent.sidebar.machineSwitcher.devicesLoadFailed'");expect(sidebarSource).toContain("'ccAgent.sidebar.machineSwitcher.devicesLoading'");- expect(sidebarSource).toContain('retryDeviceLinkDeviceList');+ // 设备目录失败不打断侧栏:断网或远端不可达时都继续显示本地与已缓存内容。+ expect(sidebarSource).not.toContain('kind="devices"\n status="error"');+ expect(sidebarSource).not.toContain('retryDeviceLinkDeviceList');+ expect(sidebarSource).not.toContain("'ccAgent.sidebar.machineSwitcher.devicesLoadFailed'");+ expect(sidebarSource).not.toContain("'ccAgent.sidebar.machineSwitcher.devicesPartiallyFailed'");+ expect(sidebarSource).not.toContain("'ccAgent.sidebar.machineSwitcher.retryDevices'");// 即使有旧/空 shard,本轮 gave-up 也必须进 error,不能把缓存伪装成权威结果。expect(remoteProjectsHookSource).toContain("if (result === 'gave-up') {");expect(remoteProjectsHookSource).not.toContain(@@ -128,6 +132,17 @@ describe('Mixed main list (sidebar-redesign D 期)', () => {expect(sidebarSource).toContain("if (filter.status === 'archived')");});+ it('keeps device directory loading as quiet text without a background panel', () => {+ expect(sidebarSource).toContain(+ "const quietDeviceLoading = kind === 'devices' && status === 'loading';",+ );+ expect(sidebarSource).toContain(+ "'mx-3 flex flex-col items-center gap-3 px-4 py-8 text-center text-[var(--text-secondary)]'",+ );+ expect(sidebarSource).toContain('!quietDeviceLoading &&');+ expect(sidebarSource).toContain('bg-[var(--surface-chip)] text-[var(--text-secondary)]');+ });+it('keeps remote background loading from changing the sidebar layout', () => {// Existing local/cached rows must stay in place while remote bootstrap runs in the background.// A partial loading notice in the scroll flow makes every row jump when it mounts/unmounts.@@ -174,9 +189,7 @@ describe('Mixed main list (sidebar-redesign D 期)', () => {// 不再按当前机器作用域猜(作用域可能是「所有」或另一台设备)。it('creates the dialogue on the device that owns the group when grouping by device', () => {// 设备段把自己的设备作为创建目标传下去:本机段 null,远程段 {deviceId, deviceName}。- expect(projectsSectionSource).toContain(- 'const sectionDialogueTarget = section.deviceId',- );+ expect(projectsSectionSource).toContain('const sectionDialogueTarget = section.deviceId');expect(projectsSectionSource).toContain('renderNonProjectEntry(entry, key, sectionDialogueTarget)',);diff --git a/apps/desktop/src/renderer/__tests__/machineSwitcherMenu.test.ts b/apps/desktop/src/renderer/__tests__/machineSwitcherMenu.test.tsindex 066be1d661..f2ae5dc4ad 100644--- a/apps/desktop/src/renderer/__tests__/machineSwitcherMenu.test.ts+++ b/apps/desktop/src/renderer/__tests__/machineSwitcherMenu.test.ts@@ -390,7 +390,7 @@ describe('远程机器切换入口并入 SidebarTopNav(置顶段上方,固定不expect(filterSource).toContain('Icon={Info}');});- it('空态 / 远程 loading-error / 连接中占位都挂范围标题(2026-08-13 第 4 轮 P1)', () => {+ it('空态 / 远程任务 loading-error / 设备目录 loading / 连接中占位都挂范围标题', () => {const headerSource = read('features', 'cc-agent', 'sidebar', 'MainListScopeHeader.tsx');expect(headerSource).toContain('<MachineSwitcherMenu onOpenDisplaySettings=');expect(headerSource).not.toContain('filterActiveBadge');@@ -398,15 +398,18 @@ describe('远程机器切换入口并入 SidebarTopNav(置顶段上方,固定不expect(projectsSectionSource).toContain('<MainListScopeHeader');expect(projectsSectionSource).toContain('hasMainListContent');expect(projectsSectionSource).not.toMatch(/if \(\s*allProjectKeysForOrder\.length === 0/);- // 连接中 / 全屏 loading-error 不再把范围标题一起摘掉。+ // 连接中 / 全屏 loading-error 不再把范围标题一起摘掉。设备目录 error 不展示+ // 占位提示,因此不属于这里的标题覆盖分支。const connectingIdx = sidebarUpperSource.indexOf('selectedMachineConnecting ?');expect(connectingIdx).toBeGreaterThanOrEqual(0);expect(sidebarUpperSource.slice(connectingIdx, connectingIdx + 900)).toContain('<MainListScopeHeader',);expect(sidebarUpperSource).toContain('deviceGroupingAvailable');- const placeholderMarkers = [+ expect(sidebarUpperSource).not.toContain("remoteDeviceDirectoryStatus === 'error' && !hasVisibleSidebarContent",+ );+ const placeholderMarkers = ['remoteSessionBootstrapFailures.length > 0 && !hasVisibleSidebarContent',"remoteDeviceDirectoryStatus === 'loading' && !hasVisibleSidebarContent",'remoteSessionBootstrapLoadingDevices.length > 0 && !hasVisibleSidebarContent',diff --git a/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx b/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsxindex 9f958c2dee..21b0b85b0b 100644--- a/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx@@ -36,7 +36,6 @@ import {Folder,Loader2,Plug,- RefreshCw,SquarePen,Timer,Trash2,@@ -264,7 +263,6 @@ import {useSwitcherDevices,} from '@/features/device-link/useMachineSwitcher';import {- retryDeviceLinkDeviceList,useDeviceLinkDeviceListSettled,useDeviceLinkDeviceListRequestState,} from '@/features/device-link/useDeviceLinkDeviceList';@@ -312,23 +310,22 @@ function RemoteSidebarLoadNotice({status,deviceLabel,partial,- onRetry,}: {kind: 'tasks' | 'devices';status: 'loading' | 'error';deviceLabel?: string;partial: boolean;- onRetry?: () => void;}) {const { t } = useTranslation();const isError = status === 'error';// tasks 的读取失败有完整自动恢复链路(10s 起对账退避重试 + 熔断探测恢复后自动重新// bootstrap),失败态只是「自动重试进行中」的状态说明,不是要求用户行动的告警——// 用中性样式 + role=status,且**不提供手动按钮**(2026-08 弱网实测反馈:重连必须- // 全自动,红色 alert + 按钮读起来像必须人工干预)。devices 目录失败没有等价的- // 自动重试,保持告警 + 手动重试。+ // 全自动,红色 alert + 按钮读起来像必须人工干预)。设备目录失败不在侧栏展示:+ // 本地与已缓存内容仍然可用,无需用连接状态打断用户。const autoRetrying = isError && kind === 'tasks';const alarming = isError && !autoRetrying;+ const quietDeviceLoading = kind === 'devices' && status === 'loading';const messageKey =kind === 'tasks'? status === 'loading'@@ -336,22 +333,22 @@ function RemoteSidebarLoadNotice({: partial? 'ccAgent.sidebar.machineSwitcher.tasksPartiallyFailed': 'ccAgent.sidebar.machineSwitcher.tasksLoadFailed'- : status === 'loading'- ? 'ccAgent.sidebar.machineSwitcher.devicesLoading'- : partial- ? 'ccAgent.sidebar.machineSwitcher.devicesPartiallyFailed'- : 'ccAgent.sidebar.machineSwitcher.devicesLoadFailed';+ : 'ccAgent.sidebar.machineSwitcher.devicesLoading';return (<divrole={alarming ? 'alert' : 'status'}className={cn(- 'border',- alarming- ? 'border-[var(--error-border)] bg-[var(--error-bg)] text-[var(--error-fg)]'- : 'border-[var(--border-default)] bg-[var(--surface-chip)] text-[var(--text-secondary)]',- partial- ? 'mx-3 flex items-start gap-2 rounded-[8px] px-3 py-2'- : 'mx-3 flex flex-col items-center gap-3 rounded-[12px] px-4 py-8 text-center',+ quietDeviceLoading+ ? 'mx-3 flex flex-col items-center gap-3 px-4 py-8 text-center text-[var(--text-secondary)]'+ : 'border',+ !quietDeviceLoading &&+ (alarming+ ? 'border-[var(--error-border)] bg-[var(--error-bg)] text-[var(--error-fg)]'+ : 'border-[var(--border-default)] bg-[var(--surface-chip)] text-[var(--text-secondary)]'),+ !quietDeviceLoading &&+ (partial+ ? 'mx-3 flex items-start gap-2 rounded-[8px] px-3 py-2'+ : 'mx-3 flex flex-col items-center gap-3 rounded-[12px] px-4 py-8 text-center'),)}>{isError ? (@@ -366,21 +363,6 @@ function RemoteSidebarLoadNotice({{t(messageKey, { device: deviceLabel })}</p></div>- {alarming && onRetry && (- <button- type="button"- onClick={onRetry}- className={cn(- 'inline-flex shrink-0 items-center gap-1 rounded-full font-medium',- 'text-[var(--error-fg-strong)] transition-colors hover:bg-[var(--surface-hover)]',- 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring-soft)]',- partial ? 'h-6 px-2 text-11' : 'h-7 px-3 text-xs',- )}- >- <RefreshCw size={12} />- {t('ccAgent.sidebar.machineSwitcher.retryDevices')}- </button>- )}</div>);}@@ -3453,22 +3435,7 @@ function ExpandedView({) : null}{/* 搜索时原列表只隐藏、不卸载:置顶段折叠等本地 state 才能保住。 */}<div hidden={searchActive} className="flex flex-col gap-2">- {remoteDeviceDirectoryStatus === 'error' && !hasVisibleSidebarContent ? (- <>- <MainListScopeHeader- filter={filter}- allKnownProjects={visibleProjectUniverse}- dialogueCount={allGroups.dialogues.length}- hasRemoteDevices={deviceGroupingAvailable}- />- <RemoteSidebarLoadNotice- kind="devices"- status="error"- partial={false}- onRetry={retryDeviceLinkDeviceList}- />- </>- ) : remoteSessionBootstrapFailures.length > 0 && !hasVisibleSidebarContent ? (+ {remoteSessionBootstrapFailures.length > 0 && !hasVisibleSidebarContent ? (<><MainListScopeHeaderfilter={filter}@@ -3526,14 +3493,6 @@ function ExpandedView({</>) : (<>- {remoteDeviceDirectoryStatus === 'error' && (- <RemoteSidebarLoadNotice- kind="devices"- status="error"- partial- onRetry={retryDeviceLinkDeviceList}- />- )}{remoteSessionBootstrapFailures.length > 0 && (<RemoteSidebarLoadNoticekind="tasks"@@ -3545,8 +3504,8 @@ function ExpandedView({{/** 远程任务 / 设备目录的 loading 只在上面的「无内容」分支显示。* 这里可能已经有本地或旧的远程快照;把后台重拉提示插进普通文档流会让- * 整个侧栏在 loading↔ready 间上下移动,造成可见闪烁。错误提示仍保留- * 在列表前,便于用户知道已有内容不是本轮权威结果。+ * 整个侧栏在 loading↔ready 间上下移动,造成可见闪烁。设备目录失败+ * 同样不展示,继续使用本地与已缓存内容即可。*/}<PinnedSectionentries={visiblePinnedEntries}diff --git a/apps/desktop/src/renderer/features/device-link/useDeviceLinkDeviceList.ts b/apps/desktop/src/renderer/features/device-link/useDeviceLinkDeviceList.tsindex dde520b1b5..dc81e84adc 100644--- a/apps/desktop/src/renderer/features/device-link/useDeviceLinkDeviceList.ts+++ b/apps/desktop/src/renderer/features/device-link/useDeviceLinkDeviceList.ts@@ -1,15 +1,16 @@/**- * useDeviceLinkDeviceList —— 机器切换栏用的「全量同账号设备」共享只读列表(push 驱动,无轮询)。+ * useDeviceLinkDeviceList —— 机器切换栏用的「全量同账号设备」共享只读列表(push 驱动,失败低频退避)。* ---------------------------------------------------------------------------* 切换栏要区分「已连接 / 连接中 / 被拒」三态,需要 remoteProjectsStore(只含已同步设备)之外的- * 全量设备(含在线未同步、离线、被拒)。这里做最小读:listDevices 拉一次,之后靠 push 重拉 ——- * presence 变化、relay 重连 'online'、关「我控制它」(control-target-changed,改 controlEnabled);- * relay 'stopped'(登出 / 停服)则清空缓存设备,避免登出后残留上一账号的远程机器。+ * 全量设备(含在线未同步、离线、被拒)。这里做最小读:listDevices 初始拉取,之后靠 push 重拉;+ * 失败时按低频退避静默恢复 —— presence 变化、relay 重连 'online'、关「我控制它」+ * (control-target-changed,改 controlEnabled);relay 'stopped'(登出 / 停服)则清空缓存设备,+ * 避免登出后残留上一账号的远程机器。** **模块级共享单例**:切换栏组件 + CCAgentSidebarUpper 的两个合并点都要读这份列表做归一化,若各挂* 一个 hook 就会有 3 次 listDevices + 3 套监听且可能短暂不一致。这里收成一份:首个订阅者触发启动,* 之后所有消费者共享同一快照(app 生命周期常驻,与 useDeviceLinkRemoteProjects 同口径:稳态靠 push,- * 不轮询)。+ * 失败时仅按低频退避静默重试)。** 故意不复用 useDeviceLinkSettings:那是设置页数据层,带 30s 轮询 + 一堆写操作回调,常驻侧边栏太重。*/@@ -19,6 +20,8 @@ import { useSyncExternalStore } from 'react';let devices: DeviceLinkDeviceView[] | null = null;const subs = new Set<() => void>();let started = false;+const DEVICE_LIST_RETRY_BASE_MS = 2_000;+const DEVICE_LIST_RETRY_MAX_MS = 30_000;export type DeviceLinkDeviceListStatus = 'loading' | 'ready' | 'error';export interface DeviceLinkDeviceListRequestState {status: DeviceLinkDeviceListStatus;@@ -124,9 +127,9 @@ export function shouldRefreshForPresence(requestStatus: DeviceLinkDeviceListStatus,): boolean {// 上一次拉取失败(且此前已有快照 → `devices` 仍非空、状态停在 'error')时**一律放行**:- // 这条链路 push 驱动、没有轮询兜底,若此时还按「字段没变」把 presence 滤掉,一次瞬时 REST- // 失败就会把侧栏钉在错误 / 陈旧目录上,直到 status / control-target 事件或用户手动重试- // (review: codex P1)。presence 是这段时间里唯一稳定到达的信号,必须当成重试机会。+ // 自动退避之外,这条 push 信号也是低延迟恢复机会;若此时还按「字段没变」把 presence 滤掉,+ // 一次瞬时 REST 失败就会把侧栏钉在错误 / 陈旧目录上,直到下一次退避、status 或+ // control-target 事件 (review: codex P1)。//// 'loading' 不放行:那说明已有一笔在飞,`loadGeneration` 会让后到的结果胜出,再叠一次// refresh 只是徒增请求;它若失败会落到 'error',下一条 presence 自然接管重试。@@ -146,6 +149,14 @@ export function shouldRefreshForPresence();}+/** 设备目录静默恢复的退避:持续恢复,但长期故障时不每 2 秒打一次 IPC。 */+export function nextDeviceListRetryDelay(previousMs: number): number {+ if (!Number.isFinite(previousMs) || previousMs < DEVICE_LIST_RETRY_BASE_MS) {+ return DEVICE_LIST_RETRY_BASE_MS;+ }+ return Math.min(previousMs * 2, DEVICE_LIST_RETRY_MAX_MS);+}+/*** 就地改名(纯函数,可单测):返回把 `deviceId` 的 name 改成 `name`(trim 后)的新数组;* 无需改动(空名 / null 列表 / 设备不在列表 / 名字未变)时**返回原引用**,调用方可用 `===` 判定 no-op。@@ -227,6 +238,44 @@ function ensureStarted(): void {started = true;let linkStatus: 'stopped' | 'connecting' | 'online' | null = null;let linkStatusRevision = 0;+ let retryTimer: ReturnType<typeof setTimeout> | null = null;+ let retryDelayMs = 0;+ let backgroundRetryGeneration: number | null = null;+ let backgroundRetryRefreshPending = false;+ let backgroundRetryReplayActive = false;++ const finishRefresh = (gen: number, background: boolean): void => {+ // A foreground refresh can supersede a background retry. In that case the old+ // retry must not consume a presence queued for the newer operation; the+ // current operation will replay it when it settles.+ if (background) {+ if (backgroundRetryGeneration !== gen) return;+ backgroundRetryGeneration = null;+ }+ if (gen !== loadGeneration) return;+ const shouldRefresh = backgroundRetryRefreshPending && linkStatus !== 'stopped';+ backgroundRetryRefreshPending = false;+ backgroundRetryReplayActive = false;+ if (shouldRefresh) refresh(false, true);+ };++ const clearRetryTimer = (): void => {+ if (retryTimer !== null) {+ clearTimeout(retryTimer);+ retryTimer = null;+ }+ };++ const scheduleRetry = (): void => {+ if (retryTimer !== null || linkStatus === 'stopped') return;+ retryDelayMs = nextDeviceListRetryDelay(retryDelayMs);+ retryTimer = setTimeout(() => {+ retryTimer = null;+ // 后台恢复不能把已结算的目录重新打回 initialRequestSettled=false;否则持久化的+ // 远端选择会在每次退避尝试时暂时恢复、遮住本地侧栏。请求仍在飞,但选择/加载态保持稳定。+ refresh(false, true);+ }, retryDelayMs);+ };const enterLoading = (): void => {// 上一轮在尚无设备快照时失败只代表「该次请求已结算」。新的有效拉取开始后要重新@@ -237,21 +286,34 @@ function ensureStarted(): void {if (settledChanged || requestChanged) subs.forEach((fn) => fn());};- const runRefresh = async (probeState: boolean): Promise<void> => {+ const runRefresh = async (probeState: boolean, background = false): Promise<void> => {// getState 与 listDevices 共用同一个 operation generation。stop、状态 push、手动重试或// 更晚的 refresh 都会令旧操作失效,迟到的状态快照和目录快照都不得落地。loadGeneration += 1;const gen = loadGeneration;const statusRevisionAtStart = linkStatusRevision;- enterLoading();+ if (background) backgroundRetryGeneration = gen;+ if (!background) {+ // The foreground operation owns the current generation now; any pending+ // presence from a superseded background retry must be replayed after it.+ if (backgroundRetryGeneration !== null) backgroundRetryReplayActive = true;+ backgroundRetryGeneration = null;+ enterLoading();+ }if (probeState || linkStatus === null) {try {const state = await window.electronAPI.deviceLink.getState();- if (gen !== loadGeneration || statusRevisionAtStart !== linkStatusRevision) return;+ if (gen !== loadGeneration || statusRevisionAtStart !== linkStatusRevision) {+ finishRefresh(gen, background);+ return;+ }linkStatus = state.linkStatus;} catch {- if (gen !== loadGeneration || statusRevisionAtStart !== linkStatusRevision) return;+ if (gen !== loadGeneration || statusRevisionAtStart !== linkStatusRevision) {+ finishRefresh(gen, background);+ return;+ }// getState 本身失败时保留既有 status 判断;未知 / 在线态仍尝试目录请求,让真正的// listDevices 结果决定 ready/error。已知 stopped 则不能误打成远程连接失败。}@@ -262,38 +324,70 @@ function ensureStarted(): void {// 打成 error;只有 online / connecting 下真实发出的 listDevices 失败才是连接错误。if (linkStatus === 'stopped') {clearDevices();+ finishRefresh(gen, background);return;}try {const result = await window.electronAPI.deviceLink.listDevices();// 期间发生过清空(stop / 登出)或更晚的 refresh → 本次响应已陈旧,丢弃。- if (gen !== loadGeneration) return;+ if (gen !== loadGeneration) {+ finishRefresh(gen, background);+ return;+ }const list = result?.devices;if (!Array.isArray(list) || !list.every(isDeviceLinkDeviceView)) {throw new Error('Invalid device list response');}+ clearRetryTimer();+ retryDelayMs = 0;setDevices(list);} catch (error) {// 只有最新请求的失败才算本轮首拉已经结算;更晚的 refresh 仍在途时继续等待它。- if (gen !== loadGeneration) return;+ if (gen !== loadGeneration) {+ finishRefresh(gen, background);+ return;+ }markRequestFailed(error);// 瞬态拉取失败(relay 重连中等)保持当前快照;登出 / relay 停止由下面的 'stopped'// 状态事件显式清空,不靠这里的失败兜底(避免一次网络抖动就清掉、闪烁)。但把请求// 标成已结算,避免远端 sidebar bootstrap 因 devices 仍为 null 永久显示加载态。+ scheduleRetry();}+ finishRefresh(gen, background);};- const refresh = (probeState = false): void => {- void runRefresh(probeState);+ const refresh = (probeState = false, background = false): void => {+ clearRetryTimer();+ void runRefresh(probeState, background);};refreshImpl = () => refresh(true);// app 生命周期常驻(侧边栏始终有订阅者),不解绑监听。// 只有相关 presence 才重拉目录(见 shouldRefreshForPresence):本机 busy 自回声与对端的// busy / lastSeenAt 心跳都不改变切换栏内容,却各触发一次全量 listDevices(issue #1726)。window.electronAPI.deviceLink.onPresenceChanged((snap) => {- if (!shouldRefreshForPresence(devices, snap, requestState.status)) return;- refresh();+ // 后台退避请求在飞时保留 error/settled 快照;不要让 presence 噪音把它升级成前台+ // refresh,再次触发 loading 并恢复悬空的持久化远端选择。+ if (backgroundRetryGeneration !== null || backgroundRetryReplayActive) {+ // 不能丢掉真实的上线 / 改名 / 能力变化:本次 REST 响应可能早于 presence,结束后+ // 追加一次后台 refresh;同一请求期间的多条 presence 合并成一次。这里按 ready+ // 语义判断字段变化,避免 error 快速路径把本机 busy / lastSeenAt 噪音也排进补拉;+ // devices=null 时仍会放行,因为这时无法从快照判断设备是否新出现。+ if (shouldRefreshForPresence(devices, snap, 'ready')) backgroundRetryRefreshPending = true;+ return;+ }+ // A failed request may already have a backoff timer waiting. Treat presence+ // as a settled snapshot in that window so busy/lastSeen heartbeats do not+ // cancel the backoff and reopen the foreground loading state. Relevant+ // presence can still recover promptly, but stays in the background path.+ const retryPending = retryTimer !== null;+ // Without a directory snapshot there is no safe way to distinguish a new+ // device from this machine's heartbeat. Keep the scheduled backoff as the+ // recovery source instead of letting every presence cancel it.+ if (retryPending && devices === null) return;+ if (!shouldRefreshForPresence(devices, snap, retryPending ? 'ready' : requestState.status))+ return;+ refresh(false, retryPending);});window.electronAPI.deviceLink.onStatusChanged((p) => {linkStatusRevision += 1;@@ -302,7 +396,12 @@ function ensureStarted(): void {// 登出 / relay 停止:清掉缓存设备。否则登出后(或同进程换账号)上一账号的远程机器会// 一直留在切换栏里被当成可选 / 连接中(listDevices 此时多半失败,catch 又保留旧快照)。// 重新登录 → relay 重连到 'online' 时下面重新拉取。+ clearRetryTimer();+ retryDelayMs = 0;clearDevices();+ backgroundRetryGeneration = null;+ backgroundRetryRefreshPending = false;+ backgroundRetryReplayActive = false;return;}// online / connecting 都是远端目录仍在作用域内的状态:开始新一轮读取。connecting 下@@ -339,7 +438,7 @@ function getInitialRequestSettledSnapshot(): boolean {return initialRequestSettled;}-/** 首次设备清单请求是否已结算;失败也算结算,后续 push / online 事件仍会继续 refresh。 */+/** 首次设备清单请求是否已结算;失败也算结算,后续退避 / push / online 事件仍会继续 refresh。 */export function useDeviceLinkDeviceListSettled(): boolean {return useSyncExternalStore(subscribe, getInitialRequestSettledSnapshot);}@@ -353,7 +452,7 @@ export function useDeviceLinkDeviceListRequestState(): DeviceLinkDeviceListRequereturn useSyncExternalStore(subscribe, getRequestStateSnapshot);}-/** 用户可见错误态的手动重试入口。 */+/** 兼容现有调用方的显式重试入口;正常失败恢复由上面的静默退避自动完成。 */export function retryDeviceLinkDeviceList(): void {if (!started) {ensureStarted();diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.jsonindex efa8439346..216319b485 100644--- a/apps/desktop/src/renderer/i18n/locales/en/common.json+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json@@ -8734,9 +8734,6 @@"tasksLoadFailed": "Can't reach sessions on {{device}} right now — retrying automatically…","tasksPartiallyFailed": "Can't reach sessions on {{device}} right now — retrying automatically; showing what's already loaded","devicesLoading": "Loading remote devices…",- "devicesLoadFailed": "Couldn't load the remote device list. Check the connection and try again.",- "devicesPartiallyFailed": "The remote device list couldn't be refreshed. Showing only content that loaded successfully.",- "retryDevices": "Reload devices","remoteSettings": "Remote connection settings","multiSelect": "Multi-select","deselect": "Deselect",diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.jsonindex d3e7f103f1..64575d906a 100644--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json@@ -8719,9 +8719,6 @@"tasksLoadFailed": "現在 {{device}} のセッションを読み込めません。自動的に再試行中…","tasksPartiallyFailed": "現在 {{device}} のセッションを読み込めません。自動的に再試行中のため、読み込み済みの内容のみ表示しています","devicesLoading": "リモートデバイスを読み込み中…",- "devicesLoadFailed": "リモートデバイスの一覧を読み込めませんでした。接続を確認して再試行してください。",- "devicesPartiallyFailed": "リモートデバイスの一覧を更新できませんでした。読み込み済みの内容のみ表示しています。",- "retryDevices": "デバイスを再読み込み","remoteSettings": "リモート接続設定","multiSelect": "複数選択","deselect": "選択を解除",diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.jsonindex 9c92387acf..bc9dd91e93 100644--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json@@ -8719,9 +8719,6 @@"tasksLoadFailed": "지금은 {{device}}의 세션을 불러올 수 없습니다. 자동으로 다시 시도 중…","tasksPartiallyFailed": "지금은 {{device}}의 세션을 불러올 수 없습니다. 자동으로 다시 시도 중이며 불러온 내용만 표시합니다","devicesLoading": "원격 기기를 불러오는 중…",- "devicesLoadFailed": "원격 기기 목록을 불러오지 못했습니다. 연결을 확인한 후 다시 시도하세요.",- "devicesPartiallyFailed": "원격 기기 목록을 새로 고치지 못했습니다. 불러온 내용만 표시합니다.",- "retryDevices": "기기 다시 불러오기","remoteSettings": "원격 연결 설정","multiSelect": "다중 선택","deselect": "선택 해제",diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.jsonindex 11137b42b2..c27618e7d5 100644--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json@@ -8719,9 +8719,6 @@"tasksLoadFailed": "暂时读取不到 {{device}} 上的任务,正在自动重试…","tasksPartiallyFailed": "暂时读取不到 {{device}} 上的任务,正在自动重试;先显示已加载的内容","devicesLoading": "正在读取远程设备…",- "devicesLoadFailed": "无法读取远程设备列表。请检查连接后重试。",- "devicesPartiallyFailed": "无法刷新远程设备列表,当前仅显示已加载的内容。",- "retryDevices": "重新读取设备","remoteSettings": "远程连接设置","multiSelect": "多选","deselect": "取消勾选",diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.jsonindex f461ac7b92..c166d9adb3 100644--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json@@ -8719,9 +8719,6 @@"tasksLoadFailed": "暫時讀取不到 {{device}} 上的任務,正在自動重試…","tasksPartiallyFailed": "暫時讀取不到 {{device}} 上的任務,正在自動重試;先顯示已載入的內容","devicesLoading": "正在讀取遠端裝置…",- "devicesLoadFailed": "無法讀取遠端裝置列表。請檢查連線後重試。",- "devicesPartiallyFailed": "無法重新整理遠端裝置列表,當前僅顯示已載入的內容。",- "retryDevices": "重新讀取裝置","remoteSettings": "遠端連線設定","multiSelect": "多選","deselect": "取消勾選",