Connect-host wizard: set everConnected in the poll callback (no setState-in-effect lint)
ci / gates (push) Successful in 7s
ci / sandbox-k8s (push) Failing after 9s
ci / rust (push) Failing after 30s
ci / frontend (push) Failing after 50s
ci / e2e (push) Has been skipped

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-26 15:34:29 -07:00
co-authored by Claude Opus 4.8
parent 447bf04932
commit 43432289fd
@@ -73,6 +73,7 @@ export function ConnectHostWizard({ onClose }: { onClose: () => void }) {
if (stop) return; if (stop) return;
const n = d.nodes.find((x) => x.id === nodeId) ?? null; const n = d.nodes.find((x) => x.id === nodeId) ?? null;
setNode(n); setNode(n);
if (n?.status === "online") setEverConnected(true);
}) })
.catch(() => {}); .catch(() => {});
}; };
@@ -84,10 +85,6 @@ export function ConnectHostWizard({ onClose }: { onClose: () => void }) {
}; };
}, [step, nodeId]); }, [step, nodeId]);
useEffect(() => {
if (node?.status === "online") setEverConnected(true);
}, [node]);
// Cancelling before the daemon ever connected → drop the orphan pending node so // Cancelling before the daemon ever connected → drop the orphan pending node so
// we don't leave a "waiting for daemon" card behind. // we don't leave a "waiting for daemon" card behind.
const handleClose = useCallback(() => { const handleClose = useCallback(() => {