From 4fee9da9f5d8619d959a22f9fbcf85eafc5f5124 Mon Sep 17 00:00:00 2001 From: orca-bug-scan-bot Date: Tue, 19 May 2026 12:22:11 -0700 Subject: [PATCH] fix: address pr-bug-scan validated finding from #2316 Wrapped await refresh() in try/catch inside the polling run() so a rejected scan no longer skips the setTimeout reschedule, keeping the LocalWorkspacePortsPanel poll loop alive across transient RPC er --- src/renderer/src/components/right-sidebar/PortsPanel.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/right-sidebar/PortsPanel.tsx b/src/renderer/src/components/right-sidebar/PortsPanel.tsx index 6ed2e72c2d1..967e5ba7dfa 100644 --- a/src/renderer/src/components/right-sidebar/PortsPanel.tsx +++ b/src/renderer/src/components/right-sidebar/PortsPanel.tsx @@ -275,7 +275,11 @@ function LocalWorkspacePortsPanel({ isVisible }: { isVisible: boolean }): React. } async function run(): Promise { - await refresh() + try { + await refresh() + } catch { + // Why: a transient RPC failure must not halt the poll loop. + } if (!cancelled) { timeout = setTimeout(() => void run(), LOCAL_PORT_SCAN_INTERVAL_MS) }