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): debounce inline Python path input, gate arch warning to darwin/arm64

[._.]/ Adam Eivye07659091b04
diff --git a/client/src/components/settings/LocalSetupPanel.jsx b/client/src/components/settings/LocalSetupPanel.jsx
index 1facb0bd15..0728574258 100644
--- a/client/src/components/settings/LocalSetupPanel.jsx
+++ b/client/src/components/settings/LocalSetupPanel.jsx
@@ -12,6 +12,25 @@ export default function LocalSetupPanel({ pythonPath, onPythonPathChange, onPack
const [creatingVenv, setCreatingVenv] = useState(false);
const logRef = useRef(null);
const installEsRef = useRef(null);
+ // Decouple the input from the parent's persisted path. The VideoGen
+ // consumer saves on every onPythonPathChange, so wiring the input to the
+ // prop directly fires a settings PATCH + ~1-2s status re-probe per
+ // keystroke. Typed edits commit on debounce/blur; programmatic updates
+ // (Detect, Switch-to-arm64, Create-venv) still call onPythonPathChange
+ // directly so they take effect immediately.
+ const [draftPath, setDraftPath] = useState(pythonPath || '');
+ const commitTimerRef = useRef(null);
+ useEffect(() => { setDraftPath(pythonPath || ''); }, [pythonPath]);
+ useEffect(() => () => clearTimeout(commitTimerRef.current), []);
+ const commitDraft = (value) => {
+ clearTimeout(commitTimerRef.current);
+ if (value !== (pythonPath || '')) onPythonPathChange(value);
+ };
+ const handleDraftChange = (value) => {
+ setDraftPath(value);
+ clearTimeout(commitTimerRef.current);
+ commitTimerRef.current = setTimeout(() => commitDraft(value), 800);
+ };
// Closing the install EventSource on unmount stops setInstalling /
// setInstallLog calls firing on a torn-down component if the user
@@ -143,8 +162,9 @@ export default function LocalSetupPanel({ pythonPath, onPythonPathChange, onPack
<div className="flex items-center gap-2">
<input
type="text"
- value={pythonPath || ''}
- onChange={(e) => onPythonPathChange(e.target.value)}
+ value={draftPath}
+ onChange={(e) => handleDraftChange(e.target.value)}
+ onBlur={() => commitDraft(draftPath)}
className="flex-1 bg-port-bg border border-port-border rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-port-accent"
placeholder="/usr/local/bin/python3"
/>
diff --git a/server/routes/imageGen.js b/server/routes/imageGen.js
index dc69c9ef85..d647793022 100644
--- a/server/routes/imageGen.js
+++ b/server/routes/imageGen.js
@@ -685,7 +685,13 @@ router.get('/setup/check', asyncHandler(async (req, res) => {
return res.status(400).json({ error: 'pythonPath must be a python interpreter (basename python/python3/python3.NN)' });
}
const health = await probePythonHealth(pythonPath);
- const archMismatch = !!(health.interpreterArch && health.interpreterArch !== HOST_ARCH);
+ // The arch warning is specifically about mlx wheels (arm64-only) on Apple
+ // Silicon. A generic interpreterArch !== HOST_ARCH compare would false-
+ // positive on Windows (Python reports `AMD64`, Node reports `x86_64`) and
+ // on hypothetical arm64 Linux — where mlx isn't even in REQUIRED_PACKAGES.
+ const archMismatch = process.platform === 'darwin'
+ && HOST_ARCH === 'arm64'
+ && health.interpreterArch === 'x86_64';
const suggestedArm64Python = archMismatch ? await detectArm64Python() : null;
res.json({
pythonPath,