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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
fix(terminal): glass header text takes the terminal theme's foreground
iceclatterWT4a4de8db5d7f
diff --git a/src/renderer/lib/glassContrast.ts b/src/renderer/lib/glassContrast.tsindex f9a8f230a..6038502f7 100644--- a/src/renderer/lib/glassContrast.ts+++ b/src/renderer/lib/glassContrast.ts@@ -95,16 +95,21 @@ export interface GlassTint {background: string/** The header's extra layer on top of it — slightly more opaque in total. */header: string+ /** The theme foreground: header text sits on the TERMINAL's tint, so it takes the terminal's+ * text colour, not the app's (a light app theme over a dark terminal theme measured 1.31:1). */+ foreground: string}/** CSS for a theme's glass, or null when its background is not a colour we can parse. */export function glassTint(theme: { background?: string; foreground?: string }): GlassTint | null {const bg = theme.background ? parseHex(theme.background) : nullif (!bg) return null- const alpha = glassTintAlpha(theme.foreground ?? '#ffffff', theme.background!)+ const foreground = theme.foreground ?? '#ffffff'+ const alpha = glassTintAlpha(foreground, theme.background!)const rgb = bg.join(', ')return {background: `rgba(${rgb}, ${alpha.toFixed(3)})`,- header: `rgba(${rgb}, 0.35)`+ header: `rgba(${rgb}, 0.35)`,+ foreground}}diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsxindex ef11ce057..f7ee06430 100644--- a/src/renderer/nodes/TerminalNode.tsx+++ b/src/renderer/nodes/TerminalNode.tsx@@ -1251,7 +1251,11 @@ export function TerminalNode({if (!glass) return nullconst tint = glassTint(resolveTerminalTheme(visual.terminalTheme).theme)return tint- ? ({ '--term-glass-bg': tint.background, '--term-glass-header-bg': tint.header } as React.CSSProperties)+ ? ({+ '--term-glass-bg': tint.background,+ '--term-glass-header-bg': tint.header,+ '--term-glass-fg': tint.foreground+ } as React.CSSProperties): null}, [glass, visual.terminalTheme])// The account list, for the chip and for the READERS below: a config dir the user links whilediff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 89708bd39..104d8e97f 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -1476,6 +1476,13 @@ body,0 1px 3px rgba(0, 0, 0, calc(0.25 * var(--shadow-k)));}.term-node--glass .term-node__header {+ /* The header sits on the TERMINAL theme's tint, so its text takes the terminal's foreground:+ with the app's own --text, a light app theme over a dark terminal theme measured 1.31:1.+ Redefined as tokens so every header child that reads them (title, session chip, icons)+ follows; the header layer only adds tint, so the foreground's 4.5:1 holds here too. */+ --text: var(--term-glass-fg);+ --muted: color-mix(in srgb, var(--term-glass-fg) 75%, transparent);+ color: var(--term-glass-fg);background: var(--term-glass-header-bg);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.28),diff --git a/src/renderer/styles.theme.test.ts b/src/renderer/styles.theme.test.tsindex 0b55ada10..b6c5bc354 100644--- a/src/renderer/styles.theme.test.ts+++ b/src/renderer/styles.theme.test.ts@@ -108,6 +108,7 @@ describe('every CSS variable resolves', () => {'--term-bg', // App.tsx, from the terminal theme'--term-glass-bg', // TerminalNode, glass tint per node theme (lib/glassContrast.ts)'--term-glass-header-bg',+ '--term-glass-fg','--peer-color', // presence chips, per peer'--group-label-boost', // GroupNode, zoom-compensated label size'--mascot-w',