Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): abort stale /setup/check when python path is cleared

[._.]/ Adam Eivy48c0547c3ed8
diff --git a/client/src/components/settings/LocalSetupPanel.jsx b/client/src/components/settings/LocalSetupPanel.jsx
index 123723951f..c19b67e3c9 100644
--- a/client/src/components/settings/LocalSetupPanel.jsx
+++ b/client/src/components/settings/LocalSetupPanel.jsx
@@ -44,10 +44,12 @@ export default function LocalSetupPanel({ pythonPath, onPythonPathChange, onPack
};
const refreshCheck = useCallback(async (path) => {
- if (!path) { setCheck(null); return; }
- // Abort any prior in-flight check so a stale response can't clobber a
- // newer one, and so the fetch is dropped on unmount.
+ // Abort any prior in-flight check first — even when the path was cleared —
+ // so a stale response can't resolve and clobber state for a path that's no
+ // longer selected, and so the fetch is dropped on unmount.
checkAbortRef.current?.abort();
+ checkAbortRef.current = null;
+ if (!path) { setCheck(null); setChecking(false); return; }
const controller = new AbortController();
checkAbortRef.current = controller;
setChecking(true);