Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(theme): light appearance, following the terminal theme

enesc9d25dad4dc1
diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx
index 165f53bd0..ee687d7c7 100644
--- a/src/renderer/App.tsx
+++ b/src/renderer/App.tsx
@@ -8,6 +8,7 @@ import { useSettings } from './state/settings'
import { useViewMode } from './state/viewMode'
import { setWebglEnabled } from './terminal/webgl-budget'
import { resolveTerminalTheme } from './terminal/themes'
+import { useAppTheme } from './state/useAppTheme'
import { resolveGpuRendering } from '../shared/webgl'
import { isMacPlatform } from '../shared/platform-utils'
@@ -33,6 +34,14 @@ export default function App() {
if (background) document.documentElement.style.setProperty('--term-bg', background)
}, [terminalTheme])
+ // Publish the resolved appearance as `data-theme` on <html> — what the light palette in
+ // styles.css keys off. Absent, or 'dark', leaves every token at its original value, so this one
+ // attribute is all that stands between an existing install and the chrome it has always had.
+ const appTheme = useAppTheme()
+ useEffect(() => {
+ document.documentElement.dataset.theme = appTheme
+ }, [appTheme])
+
// Keep the view-mode store's default in sync with the Settings choice, so projects the user
// hasn't explicitly toggled follow it (and flip live when the setting changes).
const defaultView = useSettings((s) => s.settings.defaultProjectView)
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index e10101dd6..690c82e18 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -554,7 +554,9 @@ function StatusAwareMiniMap({ onNodeDoubleClick }: { onNodeDoubleClick: (node: N
zoomable
onClick={onMinimapClick}
onNodeClick={onMinimapNodeClick}
- maskColor="rgba(10,12,18,0.6)"
+ /* The mask dims what's OUTSIDE the viewport rectangle, so it has to be the app's own
+ darkness — a near-black wash over a white minimap would invert the reading. */
+ maskColor="var(--minimap-mask)"
nodeColor={minimapNodeColor}
nodeStrokeColor={nodeStrokeColor}
nodeClassName={nodeClassName}
@@ -7456,7 +7458,9 @@ export function Canvas() {
variant={BackgroundVariant.Dots}
gap={settings.gridSize || GRID}
size={2.5}
- color="#4a4a4a"
+ /* React Flow paints the dots from a JS prop, so this can't be a rule — it reads the
+ token instead. On white the dark-mode grey reads as noise rather than as a grid. */
+ color="var(--canvas-dot)"
/>
<Controls showInteractive={false} position="bottom-left" onFitView={fitAll}>
<ControlButton
diff --git a/src/renderer/components/settings/FieldRow.tsx b/src/renderer/components/settings/FieldRow.tsx
index 494c267ce..bee5943e4 100644
--- a/src/renderer/components/settings/FieldRow.tsx
+++ b/src/renderer/components/settings/FieldRow.tsx
@@ -26,7 +26,7 @@ export function FieldRow({
<p className="mt-1 text-[13px] leading-relaxed text-muted">{description}</p>
) : null}
{note ? (
- <p className="mt-1 text-[12px] leading-relaxed text-[#ff9f0a]">{note}</p>
+ <p className="mt-1 text-[12px] leading-relaxed text-[color:var(--warn)]">{note}</p>
) : null}
</div>
<div className="shrink-0">{control}</div>
diff --git a/src/renderer/components/settings/FontPicker.tsx b/src/renderer/components/settings/FontPicker.tsx
index 79de6a970..67d177258 100644
--- a/src/renderer/components/settings/FontPicker.tsx
+++ b/src/renderer/components/settings/FontPicker.tsx
@@ -120,7 +120,7 @@ export function FontPicker({
onChange={(e) => onChange(e.target.value)}
/>
{missing ? (
- <p className="text-[12px] leading-relaxed text-[#ff9f0a]">
+ <p className="text-[12px] leading-relaxed text-[color:var(--warn)]">
“{primary}” isn’t installed — the next font in the stack is being used.
</p>
) : null}
diff --git a/src/renderer/components/settings/SettingsSidebar.tsx b/src/renderer/components/settings/SettingsSidebar.tsx
index fadeac7d9..06baeec42 100644
--- a/src/renderer/components/settings/SettingsSidebar.tsx
+++ b/src/renderer/components/settings/SettingsSidebar.tsx
@@ -32,7 +32,7 @@ export function SettingsSidebar({
onClick={onClose}
aria-label="Back to app"
style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
- className="flex items-center gap-1.5 rounded-md border-0 bg-transparent px-1.5 py-1 text-sm font-medium text-muted outline-none transition-colors hover:bg-white/10 hover:text-text"
+ className="flex items-center gap-1.5 rounded-md border-0 bg-transparent px-1.5 py-1 text-sm font-medium text-muted outline-none transition-colors hover:bg-fill-weak hover:text-text"
>
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
<path d="M8.5 3.5 5 7l3.5 3.5" />
diff --git a/src/renderer/components/settings/sections/AccountsSection.tsx b/src/renderer/components/settings/sections/AccountsSection.tsx
index 5aa1e5b29..0401c4fb9 100644
--- a/src/renderer/components/settings/sections/AccountsSection.tsx
+++ b/src/renderer/components/settings/sections/AccountsSection.tsx
@@ -213,7 +213,7 @@ export function AccountsSection({ isActive }: { isActive: boolean }): React.JSX.
<SearchableRow {...ROWS.accounts}>
<div className="space-y-4">
{versionWarning ? (
- <div className="flex items-start justify-between gap-3 rounded-md border border-[#ff453a]/40 bg-[#ff453a]/10 px-3 py-2 text-[13px] leading-relaxed text-[#ff453a]">
+ <div className="flex items-start justify-between gap-3 rounded-md border border-[color:var(--danger)]/40 bg-[color:var(--danger)]/10 px-3 py-2 text-[13px] leading-relaxed text-[color:var(--danger)]">
<span>
Your installed Claude CLI is older than the version that scopes credentials per
config dir. Accounts still isolate their config, but on macOS logins may collide in
@@ -241,7 +241,7 @@ export function AccountsSection({ isActive }: { isActive: boolean }): React.JSX.
onChange={(e) => useSettings.getState().update({ systemAccountLabel: e.target.value })}
/>
<span
- className="rounded-full bg-white/10 px-2 py-0.5 text-[11px] font-medium text-muted"
+ className="rounded-full bg-fill-weak px-2 py-0.5 text-[11px] font-medium text-muted"
title="The machine's default Claude login (~/.claude). Used when a node has no account."
>
system
@@ -266,13 +266,13 @@ export function AccountsSection({ isActive }: { isActive: boolean }): React.JSX.
onChange={(e) => setLabel(account.id, e.target.value)}
/>
{account.pending ? (
- <span className="rounded-full bg-[#ff9f0a]/15 px-2 py-0.5 text-[11px] font-medium text-[#ff9f0a]">
+ <span className="rounded-full bg-[color:var(--warn)]/15 px-2 py-0.5 text-[11px] font-medium text-[color:var(--warn)]">
pending
</span>
) : null}
{account.host ? (
<span
- className="rounded-full bg-[#0a84ff]/15 px-2 py-0.5 text-[11px] font-medium text-[#0a84ff]"
+ className="rounded-full bg-[color:var(--accent)]/15 px-2 py-0.5 text-[11px] font-medium text-[color:var(--accent)]"
title={`Remote account on ${account.host}`}
>
{account.host}
@@ -355,7 +355,7 @@ export function AccountsSection({ isActive }: { isActive: boolean }): React.JSX.
: `Creating the config dir on ${addingOn} and installing the status hook and agent skills over SSH — this takes a few seconds. The login terminal opens when it's ready.`}
</p>
) : null}
- {addError ? <p className="text-[12px] text-[#ff453a]">{addError}</p> : null}
+ {addError ? <p className="text-[12px] text-[color:var(--danger)]">{addError}</p> : null}
</div>
) : (
<div className="space-y-2">
@@ -371,7 +371,7 @@ export function AccountsSection({ isActive }: { isActive: boolean }): React.JSX.
Creating the config dir and installing the status hook…
</p>
) : null}
- {addError ? <p className="text-[12px] text-[#ff453a]">{addError}</p> : null}
+ {addError ? <p className="text-[12px] text-[color:var(--danger)]">{addError}</p> : null}
</div>
)}
diff --git a/src/renderer/components/settings/sections/AppearanceSection.tsx b/src/renderer/components/settings/sections/AppearanceSection.tsx
index 31b43c38e..4db712917 100644
--- a/src/renderer/components/settings/sections/AppearanceSection.tsx
+++ b/src/renderer/components/settings/sections/AppearanceSection.tsx
@@ -4,6 +4,7 @@ import { SettingsSection } from '../SettingsSection'
import { SearchableRow } from '../SearchableRow'
import { FieldRow } from '../FieldRow'
import { Switch } from '@renderer/ui/Switch'
+import { SegmentedPill } from '@renderer/ui/SegmentedPill'
import {
HIDEABLE_HEADER_BUTTONS,
HIDEABLE_MENU_ITEMS,
@@ -13,6 +14,10 @@ import {
import { cn } from '@renderer/ui/cn'
const ROWS = {
+ appTheme: {
+ title: 'Appearance',
+ keywords: ['appearance', 'theme', 'light', 'dark', 'mode', 'colour', 'color', 'chrome']
+ },
accent: { title: 'Accent', keywords: ['accent', 'color', 'theme', 'appearance'] },
menuItems: {
title: 'Node menu items',
@@ -48,7 +53,7 @@ function VisibilityToggles({
onChange: (next: string[]) => void
}): React.JSX.Element {
return (
- <div className="mt-3 space-y-3 border-l border-white/10 pl-4">
+ <div className="mt-3 space-y-3 border-l border-border pl-4">
{rows.map((row) => (
<FieldRow
key={row.id}
@@ -67,6 +72,7 @@ function VisibilityToggles({
}
export function AppearanceSection({ isActive }: { isActive: boolean }): React.JSX.Element {
+ const appTheme = useSettings((s) => s.settings.appTheme)
const accent = useSettings((s) => s.settings.accent)
const hiddenNodeMenuItems = useSettings((s) => s.settings.hiddenNodeMenuItems)
const hiddenHeaderButtons = useSettings((s) => s.settings.hiddenHeaderButtons)
@@ -78,6 +84,24 @@ export function AppearanceSection({ isActive }: { isActive: boolean }): React.JS
isActive={isActive}
searchEntries={ENTRIES}
>
+ <SearchableRow {...ROWS.appTheme}>
+ <FieldRow
+ label="Appearance"
+ description="Follow terminal theme uses the colour theme you picked in Settings → Terminal, so a light terminal isn't framed by a dark window."
+ control={
+ <SegmentedPill
+ value={appTheme}
+ options={[
+ { value: 'auto', label: 'Follow terminal' },
+ { value: 'dark', label: 'Dark' },
+ { value: 'light', label: 'Light' }
+ ]}
+ onChange={(v) => update({ appTheme: v })}
+ ariaLabel="Appearance"
+ />
+ }
+ />
+ </SearchableRow>
<SearchableRow {...ROWS.accent}>
<div className="flex items-center justify-between gap-4 py-2.5">
<span className="text-[13px] text-text">Accent</span>
diff --git a/src/renderer/components/settings/sections/NotchSection.tsx b/src/renderer/components/settings/sections/NotchSection.tsx
index 8b248c714..10035bc58 100644
--- a/src/renderer/components/settings/sections/NotchSection.tsx
+++ b/src/renderer/components/settings/sections/NotchSection.tsx
@@ -61,7 +61,7 @@ export function NotchSection({ isActive }: { isActive: boolean }): React.JSX.Ele
<div
className={
- 'mt-3 space-y-3 border-l border-white/10 pl-4' +
+ 'mt-3 space-y-3 border-l border-border pl-4' +
(notchHud ? '' : ' pointer-events-none opacity-40')
}
aria-disabled={!notchHud}
@@ -82,7 +82,7 @@ export function NotchSection({ isActive }: { isActive: boolean }): React.JSX.Ele
onChange={(e) => update({ notchWidth: Number(e.target.value) })}
className="w-40 accent-[var(--accent)]"
/>
- <span className="w-12 text-right text-[12px] text-white/50 tabular-nums">
+ <span className="w-12 text-right text-[12px] text-muted tabular-nums">
{notchWidth} px
</span>
</div>
diff --git a/src/renderer/components/settings/sections/NotificationsSection.tsx b/src/renderer/components/settings/sections/NotificationsSection.tsx
index fbe8c585d..de8d5201b 100644
--- a/src/renderer/components/settings/sections/NotificationsSection.tsx
+++ b/src/renderer/components/settings/sections/NotificationsSection.tsx
@@ -71,7 +71,7 @@ export function NotificationsSection({ isActive }: { isActive: boolean }): React
}
/>
{osBlocked && (
- <div className="mt-2 flex items-center gap-3 text-[13px] text-[#ffd60a]">
+ <div className="mt-2 flex items-center gap-3 text-[13px] text-[color:var(--caution)]">
macOS is blocking notifications for this app.
<Button onClick={() => void window.nodeTerminal.openNotificationSettings()}>
Open System Settings
@@ -98,7 +98,7 @@ export function NotificationsSection({ isActive }: { isActive: boolean }): React
/>
<div
className={
- 'mt-3 space-y-3 border-l border-white/10 pl-4' +
+ 'mt-3 space-y-3 border-l border-border pl-4' +
(soundEffects ? '' : ' pointer-events-none opacity-40')
}
aria-disabled={!soundEffects}
@@ -118,7 +118,7 @@ export function NotificationsSection({ isActive }: { isActive: boolean }): React
onMouseUp={() => playSfx('done', soundVolume)}
className="w-40 accent-[var(--accent)]"
/>
- <span className="w-9 text-right text-[12px] text-white/50 tabular-nums">
+ <span className="w-9 text-right text-[12px] text-muted tabular-nums">
{Math.round(soundVolume * 100)}%
</span>
</div>
@@ -150,7 +150,7 @@ export function NotificationsSection({ isActive }: { isActive: boolean }): React
{/* Per-kind sub-gates. Inert (dimmed, non-interactive) while the master toggle is off. */}
<div
className={
- 'mt-3 space-y-3 border-l border-white/10 pl-4' +
+ 'mt-3 space-y-3 border-l border-border pl-4' +
(mobilePushEnabled ? '' : ' pointer-events-none opacity-40')
}
aria-disabled={!mobilePushEnabled}
diff --git a/src/renderer/components/settings/sections/SpeechSection.tsx b/src/renderer/components/settings/sections/SpeechSection.tsx
index 5b91e5ba8..3f4b81db1 100644
--- a/src/renderer/components/settings/sections/SpeechSection.tsx
+++ b/src/renderer/components/settings/sections/SpeechSection.tsx
@@ -382,8 +382,8 @@ export function SpeechSection({
<span
className={
m.pro
- ? 'rounded-full bg-[#0a84ff]/15 px-2 py-0.5 text-[11px] font-medium text-[#0a84ff]'
- : 'rounded-full bg-white/10 px-2 py-0.5 text-[11px] font-medium text-muted'
+ ? 'rounded-full bg-[color:var(--accent)]/15 px-2 py-0.5 text-[11px] font-medium text-[color:var(--accent)]'
+ : 'rounded-full bg-fill-weak px-2 py-0.5 text-[11px] font-medium text-muted'
}
>
{m.pro ? 'PRO' : 'FREE'}
diff --git a/src/renderer/lib/appTheme.test.ts b/src/renderer/lib/appTheme.test.ts
new file mode 100644
index 000000000..38076ad1f
--- /dev/null
+++ b/src/renderer/lib/appTheme.test.ts
@@ -0,0 +1,21 @@
+import { describe, it, expect } from 'vitest'
+import { resolveAppTheme, type AppThemePref } from './appTheme'
+
+describe('resolveAppTheme', () => {
+ it('follows the terminal theme on auto', () => {
+ expect(resolveAppTheme('auto', true)).toBe('dark')
+ expect(resolveAppTheme('auto', false)).toBe('light')
+ })
+
+ it('honours an explicit choice whatever the terminal theme is', () => {
+ expect(resolveAppTheme('dark', false)).toBe('dark')
+ expect(resolveAppTheme('light', true)).toBe('light')
+ })
+
+ // settings.json is hand-editable and travels between versions; dark is what every existing
+ // install renders, so an unreadable value must land there rather than flipping the app white.
+ it('falls back to dark for an unrecognised preference', () => {
+ expect(resolveAppTheme('sepia' as AppThemePref, true)).toBe('dark')
+ expect(resolveAppTheme(undefined as unknown as AppThemePref, false)).toBe('dark')
+ })
+})
diff --git a/src/renderer/lib/appTheme.ts b/src/renderer/lib/appTheme.ts
new file mode 100644
index 000000000..7124212f7
--- /dev/null
+++ b/src/renderer/lib/appTheme.ts
@@ -0,0 +1,35 @@
+/** What the app chrome follows. `auto` takes it from the terminal colour theme. */
+export type AppThemePref = 'auto' | 'dark' | 'light'
+
+/** What actually gets rendered. */
+export type ResolvedAppTheme = 'dark' | 'light'
+
+/**
+ * Resolve the app's appearance.
+ *
+ * `auto` follows the TERMINAL theme, which is the behaviour the light themes were asked for:
+ * picking Solarized Light and being left with a black window around it reads as a half-finished
+ * setting, because on a canvas the terminal IS most of the window. The explicit values exist
+ * because the coupling isn't a law — a light terminal inside dark chrome is a legitimate taste,
+ * and so is dark-on-light — so `auto` is a default, not the only option.
+ *
+ * Defaults to dark on anything unrecognised: `settings.json` is hand-editable, and dark is what
+ * every existing install renders today.
+ */
+export function resolveAppTheme(pref: AppThemePref, terminalThemeIsDark: boolean): ResolvedAppTheme {
+ if (pref === 'light') return 'light'
+ if (pref === 'dark') return 'dark'
+ if (pref !== 'auto') return 'dark'
+ return terminalThemeIsDark ? 'dark' : 'light'
+}
+
+/**
+ * Monaco's built-in theme for an app appearance.
+ *
+ * Monaco's theme is GLOBAL, not per-editor: the `theme` option on create sets it for every
+ * instance. So editor and diff nodes both pass this at create AND re-assert it on change — from
+ * whichever of them is mounted — rather than trying to own it individually.
+ */
+export function monacoTheme(theme: ResolvedAppTheme): 'vs' | 'vs-dark' {
+ return theme === 'light' ? 'vs' : 'vs-dark'
+}
diff --git a/src/renderer/nodes/DiffNode.tsx b/src/renderer/nodes/DiffNode.tsx
index 346a9654f..7b3fa04c8 100644
--- a/src/renderer/nodes/DiffNode.tsx
+++ b/src/renderer/nodes/DiffNode.tsx
@@ -1,6 +1,8 @@
import { useEffect, useRef, useState } from 'react'
import { NodeResizer, useReactFlow, type NodeProps } from '@xyflow/react'
import { monaco } from '../editor/monaco-setup'
+import { monacoTheme } from '../lib/appTheme'
+import { useAppTheme } from '../state/useAppTheme'
import { useSettings } from '../state/settings'
import { useProjects } from '../state/projects'
import { sshFs } from '../terminal/ssh-fs'
@@ -23,6 +25,16 @@ export function DiffNode({ id, data, selected }: NodeProps<CanvasNode>) {
const editorRef = useRef<monaco.editor.IStandaloneDiffEditor | null>(null)
const originalRef = useRef<monaco.editor.ITextModel | null>(null)
const modifiedRef = useRef<monaco.editor.ITextModel | null>(null)
+ // Monaco's theme is GLOBAL (see monacoTheme): applied at create from the ref, then re-asserted
+ // here whenever the app appearance changes. The ref exists because the create runs inside an
+ // async lazy-load continuation, where reading the reactive value would capture a stale one.
+ const appTheme = useAppTheme()
+ const appThemeRef = useRef(appTheme)
+ appThemeRef.current = appTheme
+ useEffect(() => {
+ if (editorRef.current) monaco.editor.setTheme(monacoTheme(appTheme))
+ }, [appTheme])
+
const [loadError, setLoadError] = useState('')
const cwd = (data.cwd as string) ?? ''
const rel = (data.filePath as string) ?? ''
@@ -92,7 +104,7 @@ export function DiffNode({ id, data, selected }: NodeProps<CanvasNode>) {
originalRef.current = original
modifiedRef.current = modified
editor = monaco.editor.createDiffEditor(el, {
- theme: 'vs-dark',
+ theme: monacoTheme(appThemeRef.current),
readOnly: true,
originalEditable: false,
automaticLayout: true,
diff --git a/src/renderer/nodes/EditorNode.tsx b/src/renderer/nodes/EditorNode.tsx
index 560a83f06..e88d76d71 100644
--- a/src/renderer/nodes/EditorNode.tsx
+++ b/src/renderer/nodes/EditorNode.tsx
@@ -1,6 +1,8 @@
import { useEffect, useRef, useState } from 'react'
import { Handle, NodeResizer, Position, useReactFlow, type NodeProps } from '@xyflow/react'
import { monaco } from '../editor/monaco-setup'
+import { monacoTheme } from '../lib/appTheme'
+import { useAppTheme } from '../state/useAppTheme'
import { renderMarkdown } from '../lib/markdown'
import { useSettings } from '../state/settings'
import { sshFs } from '../terminal/ssh-fs'
@@ -36,6 +38,16 @@ export function EditorNode({ id, data, selected }: NodeProps<CanvasNode>) {
const modelRef = useRef<monaco.editor.ITextModel | null>(null)
const savedRef = useRef<string>('')
const hoveredRef = useRef(false)
+ // Monaco's theme is GLOBAL (see monacoTheme): applied at create from the ref, then re-asserted
+ // here whenever the app appearance changes. The ref exists because the create runs inside an
+ // async lazy-load continuation, where reading the reactive value would capture a stale one.
+ const appTheme = useAppTheme()
+ const appThemeRef = useRef(appTheme)
+ appThemeRef.current = appTheme
+ useEffect(() => {
+ if (editorRef.current) monaco.editor.setTheme(monacoTheme(appTheme))
+ }, [appTheme])
+
const [dirty, setDirty] = useState(false)
const [preview, setPreview] = useState(false)
const [previewHtml, setPreviewHtml] = useState('')
@@ -196,7 +208,7 @@ export function EditorNode({ id, data, selected }: NodeProps<CanvasNode>) {
modelRef.current = model
editor = monaco.editor.create(el, {
model,
- theme: 'vs-dark',
+ theme: monacoTheme(appThemeRef.current),
fontSize: s.fontSize,
fontFamily: s.fontFamily,
minimap: { enabled: false },
diff --git a/src/renderer/state/useAppTheme.ts b/src/renderer/state/useAppTheme.ts
new file mode 100644
index 000000000..835dff3c0
--- /dev/null
+++ b/src/renderer/state/useAppTheme.ts
@@ -0,0 +1,16 @@
+import { useSettings } from './settings'
+import { resolveTerminalTheme } from '../terminal/themes'
+import { resolveAppTheme, type ResolvedAppTheme } from '../lib/appTheme'
+
+/**
+ * The app's resolved appearance, live.
+ *
+ * Both inputs are primitives, so this re-renders only when one of them actually moves — the same
+ * discipline the terminal appearance slice follows. Anything that can't read a CSS variable
+ * (Monaco's theme name, React Flow props passed as JS values) reads this instead.
+ */
+export function useAppTheme(): ResolvedAppTheme {
+ const pref = useSettings((s) => s.settings.appTheme)
+ const terminalTheme = useSettings((s) => s.settings.terminalTheme)
+ return resolveAppTheme(pref, resolveTerminalTheme(terminalTheme).dark)
+}
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index b62e86091..fc47f0e61 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -35,6 +35,14 @@
--muted-2: rgba(var(--tint-rgb), 0.25); /* tertiaryLabel */
--accent: #0a84ff; /* systemBlue */
--accent-hover: #3a9bff;
+ /* Status hues, named so the light theme can darken them for a white field in one place. */
+ --danger: #ff453a;
+ --warn: #ff9f0a;
+ --caution: #ffd60a;
+ --success: #32d74b;
+ /* Canvas chrome that lives on React Flow props rather than in a rule. */
+ --canvas-dot: #4a4a4a;
+ --minimap-mask: rgba(10, 12, 18, 0.6);
--git-graph-ref: var(--accent);
--git-graph-remote-ref: #bf5af2;
--git-graph-base-ref: #ff9f0a;
@@ -50,6 +58,50 @@
sans-serif;
font-size: 13px;
-webkit-font-smoothing: antialiased;
+ /* Tells the engine which way its OWN chrome should go — scrollbars, form controls, the
+ `<select>` popups the settings panel is full of. Without it those stay dark on a light page. */
+ color-scheme: dark;
+}
+
+/* ---- Light appearance ----------------------------------------------------------------------
+ Set by App.tsx from `settings.appTheme` (see lib/appTheme.ts); absent = dark, so an install
+ that never picks one is byte-for-byte unchanged.
+
+ Almost all of this is `--tint-rgb`. Flipping it to black turns every one of the ~280
+ lighten-the-surface overlays into darken-the-surface, at the exact alpha each already used —
+ text, borders, hover fills and gradient stops together. What is left is the handful of opaque
+ surfaces, whose ELEVATION RAMP INVERTS: in dark, further back is darker; in light, further back
+ is greyer and what comes forward goes white. */
+:root[data-theme='light'] {
+ color-scheme: light;
+ --tint-rgb: 0, 0, 0;
+ --text-strong: #000;
+
+ --bg: #ffffff; /* content / canvas */
+ --panel: #f5f5f7; /* bars, panels, node chrome */
+ --panel-header: #ebebf0; /* elevated / hover */
+ --panel-2: #ebebf0;
+ --surface-black: #f7f7f9;
+ --surface-sunken: #f0f0f3; /* wells stay GREYER than the page */
+ --surface-deep: #e8e8ed;
+ --surface-raised: #ffffff; /* …while raised surfaces come up to white */
+ --surface-overlay: #ffffff;
+
+ /* systemBlue's light-mode value — the dark one is deliberately lighter for a dark field and
+ loses contrast against white. */
+ --accent: #007aff;
+ --accent-hover: #0a6ed1;
+
+ /* The status hues are tuned for a dark field: on white, yellow and orange fall under any
+ reasonable contrast floor. Darkened here rather than at each of their ~50 call sites. */
+ --danger: #d70015;
+ --warn: #b25000;
+ --caution: #8a6d00;
+ --success: #1c8b34;
+
+ /* Canvas dots read as grid, not as noise: on white the dark-mode grey is far too heavy. */
+ --canvas-dot: #d0d0d6;
+ --minimap-mask: rgba(255, 255, 255, 0.6);
}
* {
diff --git a/src/renderer/tailwind.css b/src/renderer/tailwind.css
index d3910ba90..2a22fef76 100644
--- a/src/renderer/tailwind.css
+++ b/src/renderer/tailwind.css
@@ -16,6 +16,14 @@
--color-muted: var(--muted);
--color-muted-2: var(--muted-2);
--color-border: var(--border);
+ /* Surface overlays and status hues, so components stop writing `bg-white/10` or
+ `text-[#ff9f0a]` — both of which break the moment the surface under them turns light. */
+ --color-fill: rgba(var(--tint-rgb), 0.15);
+ --color-fill-weak: rgba(var(--tint-rgb), 0.1);
+ --color-danger: var(--danger);
+ --color-warn: var(--warn);
+ --color-caution: var(--caution);
+ --color-success: var(--success);
--radius-sm: var(--radius-sm);
--radius-md: var(--radius);
--radius-lg: var(--radius-lg);
diff --git a/src/renderer/ui/Switch.tsx b/src/renderer/ui/Switch.tsx
index 2bf75ee55..701d8cc15 100644
--- a/src/renderer/ui/Switch.tsx
+++ b/src/renderer/ui/Switch.tsx
@@ -18,7 +18,7 @@ export function Switch({
onClick={() => onChange(!checked)}
className={cn(
'relative box-border block h-[24px] w-[42px] shrink-0 cursor-pointer rounded-full border-0 p-0 outline-none transition-colors duration-200',
- checked ? 'bg-accent' : 'bg-white/15'
+ checked ? 'bg-accent' : 'bg-fill'
)}
>
<span
diff --git a/src/shared/types.ts b/src/shared/types.ts
index 369ed0611..dfc2c2136 100644
--- a/src/shared/types.ts
+++ b/src/shared/types.ts
@@ -684,6 +684,10 @@ export interface Settings {
fontSize: number
fontFamily: string
cursorBlink: boolean
+ /** Appearance of the APP chrome (tab bar, panels, node headers, menus). `auto` (the default)
+ * takes it from the terminal colour theme, so picking a light terminal theme doesn't leave a
+ * black window framing it; `dark`/`light` pin it. See renderer/lib/appTheme.ts. */
+ appTheme: 'auto' | 'dark' | 'light'
/** Terminal colour scheme — an id from `renderer/terminal/themes.ts`. Resolution is tolerant
* (settings.json is hand-editable): an unknown id falls back to the default theme, whose
* colours reproduce the pre-feature hardcoded `#1e1e1e`/`#e6e6e6` exactly. */
@@ -856,6 +860,9 @@ export const DEFAULT_SETTINGS: Settings = {
// Every appearance default below reproduces the pre-feature look bit-for-bit: the default theme
// carries the old hardcoded background/foreground, and block/outline/1/0 are xterm's own
// defaults. Picking a theme is opt-in — an update must not repaint anybody's terminals.
+ // Follows the terminal theme, whose own default is dark — so an install that never touches
+ // either setting keeps the dark chrome it has always had.
+ appTheme: 'auto',
terminalTheme: 'nodeterm-dark',
fontWeight: 400,
fontWeightBold: 700,