Accent
- {ACCENTS.map((a) => (
-
Default shell (empty = auto)
-
void setConfig({ default_shell: e.target.value })}
+
setShellLocal(e.target.value)} onBlur={() => void setConfig({ default_shell: shellLocal })}
style={{ width: "100%", padding: 8, marginBottom: 18, background: COLORS.bgPanel, color: COLORS.textPrimary, border: `1px solid ${COLORS.borderStrong}`, borderRadius: 8 }} />
diff --git a/app/src/TerminalView.tsx b/app/src/TerminalView.tsx
index 35c0361..cc5817a 100644
--- a/app/src/TerminalView.tsx
+++ b/app/src/TerminalView.tsx
@@ -103,10 +103,7 @@ export function TerminalView({ surfaceId, font, palette }: { surfaceId: string;
}, [surfaceId]); // eslint-disable-line react-hooks/exhaustive-deps
// Live re-apply font and theme when config changes without remounting.
- // palette is a new object each render so we depend on a stable key instead.
- const paletteKey = palette
- ? `${palette["bg-panel"]}|${palette["text-primary"]}|${palette["search-match"]}`
- : null;
+ // font and palette are memoized in App.tsx so stable identity = no spurious re-applies.
useEffect(() => {
const t = termRef.current;
if (!t) return;
@@ -116,7 +113,7 @@ export function TerminalView({ surfaceId, font, palette }: { surfaceId: string;
}
if (palette) t.options.theme = xtermTheme(palette);
requestAnimationFrame(() => { try { fitRef.current?.fit(); } catch { /* ignore */ } });
- }, [font?.family, font?.size, paletteKey]); // eslint-disable-line react-hooks/exhaustive-deps
+ }, [font, palette]); // eslint-disable-line react-hooks/exhaustive-deps
return
;
}
diff --git a/app/src/main.tsx b/app/src/main.tsx
index 4340d68..09c0067 100644
--- a/app/src/main.tsx
+++ b/app/src/main.tsx
@@ -1,6 +1,7 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { App } from "./App";
+import { applyTheme } from "./theme";
import "@fontsource/inter/400.css";
import "@fontsource/inter/500.css";
import "@fontsource/inter/600.css";
@@ -9,6 +10,10 @@ import "@fontsource-variable/jetbrains-mono";
import "@xterm/xterm/css/xterm.css";
import "./styles.css";
+// Apply default theme before React renders so CSS vars are never unset,
+// even if the daemon is slow or offline. getConfig() overrides this later.
+applyTheme("dark", "blue");
+
ReactDOM.createRoot(document.getElementById("root")!).render(