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(theme): the surfaces the light theme missed, and a test so it can't recur
enes781301eec849
diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 657f9ed33..d93f63822 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -35,11 +35,30 @@--muted-2: rgba(var(--tint-rgb), 0.25); /* tertiaryLabel */--accent: #0a84ff; /* systemBlue */--accent-hover: #3a9bff;+ /* Accent as TEXT on a surface — lighter than the fill accent so it reads on a dark panel, and+ the light theme has to go the other way. Was `#6cb0ff`/`#a9c0ff` at ~14 hover/link sites. */+ --accent-text: #6cb0ff;/* 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;++ /* THE CANVAS. Deliberately blacker than `--bg` in dark — the nodes are the content and the+ field behind them recedes. In light it has to go the other way, off-white and slightly+ greyer than a node, or the nodes lose their edges. */+ --canvas-bg: #000000;+ /* Floating surfaces, each written as a triple so every per-use alpha survives (same idea as+ --tint-rgb). Menus/dock/banners, popovers, and cards sit at three different depths. */+ --menu-rgb: 40, 40, 42;+ --popover-rgb: 20, 20, 22;+ --card-rgb: 28, 28, 30;+ /* Drop-shadow weight multiplier. A shadow is black in BOTH themes — what changes is how hard it+ may land: 0.55 black reads as depth over a dark field and as mud over a white one. Every+ box-shadow alpha is multiplied by this, so the light theme turns them all down at once+ without touching 54 rules. Scrims are excluded: darkening IS a scrim's job. */+ --shadow-k: 1;+/* Canvas chrome that lives on React Flow props rather than in a rule. */--canvas-dot: #4a4a4a;--minimap-mask: rgba(10, 12, 18, 0.6);@@ -91,6 +110,18 @@loses contrast against white. */--accent: #007aff;--accent-hover: #0a6ed1;+ /* Accent as text has to DARKEN on white, where the dark theme's lightened blue disappears. */+ --accent-text: #0060df;++ /* Off-white, and slightly greyer than a node's own surface, so nodes keep their edges instead+ of dissolving into the field. */+ --canvas-bg: #f7f7fa;+ /* Floating surfaces come UP to near-white in light (see the elevation note above). */+ --menu-rgb: 252, 252, 254;+ --popover-rgb: 255, 255, 255;+ --card-rgb: 252, 252, 254;+ /* macOS light-mode shadows are a third of the weight of its dark ones. */+ --shadow-k: 0.35;/* The status hues are tuned for a dark field: on white, yellow and orange fall under anyreasonable contrast floor. Darkened here rather than at each of their ~50 call sites. */@@ -355,10 +386,10 @@ body,flex-direction: column;gap: 2px;padding: 6px;- background: rgba(40, 40, 42, 0.98);+ background: rgba(var(--menu-rgb), 0.98);border: 1px solid var(--border);border-radius: 10px;- box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);+ box-shadow: 0 12px 36px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));}.tab-menu button {@@ -379,7 +410,7 @@ body,}.tab-menu button.danger {- color: #ff453a;+ color: var(--danger);}.tab-menu button:disabled {@@ -449,11 +480,11 @@ body,align-items: center;gap: 4px;padding: 7px 10px;- background: rgba(40, 40, 42, 0.92);+ background: rgba(var(--menu-rgb), 0.92);backdrop-filter: blur(10px);border: 1px solid var(--border);border-radius: 16px;- box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);+ box-shadow: 0 10px 32px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));}.dock-btn {@@ -529,7 +560,7 @@ body,}.dock-dirty.dirty {- background: #ffd60a;+ background: var(--caution);}/* Add-node menu above the dock */@@ -542,11 +573,11 @@ body,flex-direction: column;gap: 2px;padding: 6px;- background: rgba(40, 40, 42, 0.98);+ background: rgba(var(--menu-rgb), 0.98);backdrop-filter: blur(10px);border: 1px solid var(--border);border-radius: 12px;- box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);+ box-shadow: 0 12px 36px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));}.dock-menu button {@@ -591,11 +622,11 @@ body,flex-direction: column;gap: 10px;padding: 12px 14px;- background: rgba(40, 40, 42, 0.98);+ background: rgba(var(--menu-rgb), 0.98);backdrop-filter: blur(10px);border: 1px solid var(--border);border-radius: 14px;- box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);+ box-shadow: 0 20px 56px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));}.dictation__head {@@ -667,7 +698,7 @@ body,.dictation__mic--active {background: rgba(255, 69, 58, 0.18);border-color: rgba(255, 69, 58, 0.5);- color: #ff453a;+ color: var(--danger);animation: dictation-pulse 1.4s ease-in-out infinite;}@@ -703,7 +734,7 @@ body,.dictation__meter-fill {height: 100%;- background: #ff453a;+ background: var(--danger);border-radius: 3px;transition: width 80ms linear;}@@ -793,7 +824,7 @@ body,padding: 7px 10px;border-radius: 8px;font-size: 12px;- color: #ff453a;+ color: var(--danger);background: rgba(255, 69, 58, 0.12);border: 1px solid rgba(255, 69, 58, 0.35);}@@ -893,7 +924,7 @@ body,width: 4px;min-height: 4px;border-radius: 2px;- background: #ff453a;+ background: var(--danger);transition: height 70ms ease-out;}@@ -913,7 +944,7 @@ body,display: inline-flex;align-items: center;justify-content: center;- background: #ff453a;+ background: var(--danger);border: none;border-radius: 50%;color: #fff;@@ -935,7 +966,7 @@ body,border-top-width: 3px;border-radius: 10px;overflow: hidden;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));}.term-node.selected {@@ -954,7 +985,7 @@ body,box-shadow:0 0 0 1px rgba(10, 132, 255, 0.5),0 0 16px 1px rgba(10, 132, 255, 0.35),- 0 8px 28px rgba(0, 0, 0, 0.4);+ 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));}.react-flow__node:has(.term-node.unread)::after {@@ -991,7 +1022,7 @@ body,box-shadow:0 0 0 1px rgba(217, 119, 87, 0.35),0 0 14px 1px rgba(217, 119, 87, 0.22),- 0 8px 28px rgba(0, 0, 0, 0.4);+ 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));}.react-flow__node:has(.term-node.working)::after {@@ -1025,7 +1056,7 @@ body,box-shadow:0 0 0 1px rgba(255, 69, 58, 0.4),0 0 14px 1px rgba(255, 69, 58, 0.25),- 0 8px 28px rgba(0, 0, 0, 0.4);+ 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));}.react-flow__node:has(.term-node.attention)::after {@@ -1060,7 +1091,7 @@ body,height: 13px;background: var(--accent);border: 2px solid var(--panel);- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);+ box-shadow: 0 1px 4px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));opacity: 0.4;z-index: 20;transition: opacity 0.12s ease, transform 0.12s ease;@@ -1084,11 +1115,11 @@ body,border-radius: 6px;background: var(--surface-black);border: 1px solid var(--border);- color: var(--label);+ color: var(--text);font-size: 11px;font-weight: 500;line-height: 1;- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);+ box-shadow: 0 6px 20px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));opacity: 0;pointer-events: none;transition: opacity 0.12s ease;@@ -1212,7 +1243,7 @@ body,/* Account folder missing at spawn → session fell back to the system account (orange warning). */.node-account-chip--warning {- color: #ff9f0a;+ color: var(--warn);background: rgba(255, 159, 10, 0.16);}@@ -1226,7 +1257,7 @@ body,font-size: 9.5px;font-weight: 700;letter-spacing: 0.06em;- color: #30d158;+ color: var(--success);}.term-node__status-dot {@@ -1299,7 +1330,7 @@ body,/* NEEDS YOU is red everywhere (same as the sidebar attention dot). */.term-node__status--attention {- color: #ff453a;+ color: var(--danger);}.term-node__status--loop {@@ -1355,7 +1386,7 @@ body,white-space: nowrap;}.term-node__approve-btn--allow {- color: #30d158;+ color: var(--success);border-color: rgba(48, 209, 88, 0.5);background: rgba(48, 209, 88, 0.12);}@@ -1363,7 +1394,7 @@ body,background: rgba(48, 209, 88, 0.22);}.term-node__approve-btn--deny {- color: #ff453a;+ color: var(--danger);border-color: rgba(255, 69, 58, 0.5);background: rgba(255, 69, 58, 0.12);}@@ -1398,7 +1429,7 @@ body,padding: 5px 9px;border-radius: 7px;border: 1px solid var(--border);- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);+ box-shadow: 0 6px 20px rgba(0, 0, 0, calc(0.45 * var(--shadow-k)));pointer-events: none;white-space: nowrap;}@@ -1417,7 +1448,7 @@ body,.term-node__ai:hover:not(:disabled) {background: rgba(10, 132, 255, 0.18);- color: #6cb0ff;+ color: var(--accent-text);}.term-node__ai:disabled {@@ -1439,7 +1470,7 @@ body,.term-node__move-worktree:hover {background: rgba(10, 132, 255, 0.18);- color: #6cb0ff;+ color: var(--accent-text);}.term-node__search {@@ -1457,7 +1488,7 @@ body,.term-node__search:hover {background: rgba(10, 132, 255, 0.18);- color: #6cb0ff;+ color: var(--accent-text);}.term-node__refresh {@@ -1475,7 +1506,7 @@ body,.term-node__refresh:hover {background: rgba(10, 132, 255, 0.18);- color: #6cb0ff;+ color: var(--accent-text);}.term-node__mic {@@ -1493,7 +1524,7 @@ body,.term-node__mic:hover {background: rgba(10, 132, 255, 0.18);- color: #6cb0ff;+ color: var(--accent-text);}.term-node__chat {@@ -1511,7 +1542,7 @@ body,.term-node__chat:hover {background: rgba(10, 132, 255, 0.18);- color: #6cb0ff;+ color: var(--accent-text);}.term-node__find {@@ -1519,7 +1550,7 @@ body,flex-direction: column;gap: 4px;padding: 6px 8px;- background: #2a2a2a;+ background: var(--surface-raised);border-bottom: 1px solid rgba(var(--tint-rgb), 0.08);}@@ -1535,7 +1566,7 @@ body,background: var(--bg);border: 1px solid rgba(var(--tint-rgb), 0.12);border-radius: 4px;- color: #e6e6e6;+ color: var(--text);font-size: 12px;padding: 3px 6px;outline: none;@@ -1566,7 +1597,7 @@ body,.term-node__find-btn:hover:not(:disabled) {background: rgba(10, 132, 255, 0.18);- color: #6cb0ff;+ color: var(--accent-text);}.term-node__find-btn:disabled {@@ -1579,7 +1610,7 @@ body,align-items: baseline;gap: 6px;font-size: 11px;- color: #cfcfcf;+ color: var(--muted);overflow: hidden;}@@ -1587,7 +1618,7 @@ body,white-space: nowrap;overflow: hidden;text-overflow: ellipsis;- font-family: var(--mono, monospace);+ font-family: monospace;}.term-node__find-tag {@@ -1603,7 +1634,7 @@ body,.term-node__find-tag--claude {background: rgba(10, 132, 255, 0.22);- color: #6cb0ff;+ color: var(--accent-text);}.term-node__close {@@ -1619,7 +1650,7 @@ body,.term-node__close:hover {background: rgba(247, 118, 142, 0.2);- color: #ff453a;+ color: var(--danger);}.term-node__body {@@ -1652,7 +1683,7 @@ body,}.term-node__upload.failed {- color: #ff453a;+ color: var(--danger);}.term-node__upload-spin {@@ -1734,7 +1765,7 @@ body,text-align: center;font-size: 12px;color: var(--muted);- background: rgba(30, 30, 30, 0.88);+ background: rgba(var(--card-rgb), 0.88);flex-direction: column;gap: 10px;}@@ -1744,7 +1775,7 @@ body,this client's stale cwd and silently undo the worktree move (see CoState.ended). */.term-node__reopen {padding: 4px 12px;- border: 1px solid var(--separator);+ border: 1px solid var(--border);border-radius: 6px;background: rgba(var(--tint-rgb), 0.06);color: var(--text);@@ -1831,7 +1862,7 @@ body,}.term-md__content pre {- background: #000;+ background: var(--canvas-bg);border: 1px solid var(--border);border-radius: 8px;padding: 10px 12px;@@ -1870,7 +1901,7 @@ body,inset: 0;display: flex;flex-direction: column;- background: var(--bg, #0a0a0a);+ background: var(--bg, var(--bg));z-index: 5;}.term-chat__bar {@@ -1880,7 +1911,7 @@ body,flex: 0 0 auto;padding: 4px 8px;font-size: 11px;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ color: rgba(var(--tint-rgb), 0.55);border-bottom: 1px solid rgba(var(--tint-rgb), 0.08);}.term-chat__hint {@@ -1901,7 +1932,7 @@ body,.term-chat__empty {margin: auto;font-size: 12px;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.4));+ color: rgba(var(--tint-rgb), 0.4);display: flex;flex-direction: column;align-items: center;@@ -1911,7 +1942,7 @@ body,}.term-chat__empty-detail {font-size: 11px;- color: var(--label-tertiary, rgba(var(--tint-rgb), 0.28));+ color: rgba(var(--tint-rgb), 0.28);max-width: 34ch;line-height: 1.4;}@@ -1919,7 +1950,7 @@ body,margin-top: 2px;padding: 3px 10px;font-size: 11px;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ color: rgba(var(--tint-rgb), 0.55);background: rgba(var(--tint-rgb), 0.06);border: 1px solid rgba(var(--tint-rgb), 0.1);border-radius: 6px;@@ -1944,7 +1975,7 @@ body,.term-chat__msg--assistant {align-self: flex-start;background: rgba(var(--tint-rgb), 0.06);- color: var(--label, rgba(var(--tint-rgb), 0.92));+ color: rgba(var(--tint-rgb), 0.92);}.term-chat__text > :first-child {margin-top: 0;@@ -1985,12 +2016,12 @@ body,text-overflow: ellipsis;white-space: nowrap;opacity: 0.7;- font-family: var(--mono, ui-monospace, monospace);+ font-family: ui-monospace, monospace;}.term-chat__tool-result {margin: 6px 0 0;white-space: pre-wrap;- font-family: var(--mono, ui-monospace, monospace);+ font-family: ui-monospace, monospace;font-size: 11px;opacity: 0.85;}@@ -2006,7 +2037,7 @@ body,padding: 8px;font-family: inherit;font-size: 13px;- color: var(--label, #fff);+ color: var(--text-strong);background: rgba(var(--tint-rgb), 0.06);border: 1px solid rgba(var(--tint-rgb), 0.12);border-radius: 8px;@@ -2091,7 +2122,7 @@ body,}.node-tag button:hover {- color: #ff453a;+ color: var(--danger);}.node-tag-add {@@ -2144,7 +2175,7 @@ body,}.react-flow {- background: #000000;+ background: var(--canvas-bg);}.flow-wrap {@@ -2157,12 +2188,12 @@ body,.remote-dialog {width: 440px;max-width: calc(100vw - 32px);- background: var(--bg, #16181c);- border: 1px solid var(--separator, rgba(var(--tint-rgb), 0.12));+ background: var(--bg, var(--panel));+ border: 1px solid rgba(var(--tint-rgb), 0.12);border-radius: 12px;padding: 18px 20px 20px;- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);- color: var(--label, #fff);+ box-shadow: 0 20px 60px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));+ color: var(--text-strong);}.remote-dialog__head {display: flex;@@ -2177,18 +2208,18 @@ body,.remote-dialog__x {background: transparent;border: none;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ color: rgba(var(--tint-rgb), 0.55);font-size: 18px;line-height: 1;cursor: pointer;}.remote-dialog__x:hover {- color: var(--label, #fff);+ color: var(--text-strong);}.remote-dialog__desc {margin: 6px 0 14px;font-size: 12px;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ color: rgba(var(--tint-rgb), 0.55);}.remote-dialog__head4 {margin: 14px 0 8px;@@ -2207,12 +2238,12 @@ body,.remote-dialog__hint {margin: 0;font-size: 12px;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ color: rgba(var(--tint-rgb), 0.55);}.remote-dialog__err {margin: 12px 0 0;font-size: 12px;- color: #ff9f0a;+ color: var(--warn);}/* ---- Welcome / empty state ---- */@@ -2225,7 +2256,7 @@ body,align-items: center;justify-content: center;gap: 6px;- background: #000;+ background: var(--canvas-bg);}.welcome__brand {@@ -2370,7 +2401,7 @@ body,.welcome__recent-del:hover {background: rgba(255, 69, 58, 0.15);- color: #ff453a;+ color: var(--danger);}/* ---- Right-click context menu ---- */@@ -2388,10 +2419,10 @@ body,flex-direction: column;gap: 1px;padding: 6px;- background: rgba(40, 40, 42, 0.98);+ background: rgba(var(--menu-rgb), 0.98);border: 1px solid var(--border);border-radius: 10px;- box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);+ box-shadow: 0 12px 36px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));}.ctx-item {@@ -2432,7 +2463,7 @@ body,}.ctx-item.danger {- color: #ff453a;+ color: var(--danger);}.ctx-item.danger:hover:not(:disabled) {@@ -2609,7 +2640,7 @@ body,width: 280px;padding: 16px;background: var(--panel, var(--panel));- border: 1px solid #ff6b6b;+ border: 1px solid var(--danger);border-radius: 10px;color: var(--text);}@@ -2617,7 +2648,7 @@ body,.node-error__title {font-size: 13px;font-weight: 600;- color: #ff8585;+ color: var(--danger);}.node-error__msg {@@ -2635,11 +2666,11 @@ body,border: 1px solid;border-radius: 10px;overflow: hidden;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.35 * var(--shadow-k)));}.sticky-node.selected {- box-shadow: 0 0 0 1px var(--accent), 0 8px 28px rgba(0, 0, 0, 0.4);+ box-shadow: 0 0 0 1px var(--accent), 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));}.sticky-node__header {@@ -2734,10 +2765,10 @@ body,flex-direction: column;gap: 10px;padding: 18px 20px;- background: rgba(28, 28, 30, 0.98);+ background: rgba(var(--card-rgb), 0.98);border: 1px solid rgba(var(--tint-rgb), 0.08);border-radius: 14px;- box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);+ box-shadow: 0 12px 40px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));color: var(--text);-webkit-app-region: no-drag;}@@ -2763,7 +2794,7 @@ body,background: transparent;border: none;border-radius: 6px;- color: var(--text-dim, rgba(var(--tint-rgb), 0.6));+ color: rgba(var(--tint-rgb), 0.6);font-size: 13px;cursor: pointer;}@@ -2775,7 +2806,7 @@ body,.update-card__body {margin: 0;font-size: 13.5px;- color: var(--text-dim, rgba(var(--tint-rgb), 0.75));+ color: rgba(var(--tint-rgb), 0.75);}.update-card__link {@@ -2783,7 +2814,7 @@ body,padding: 0;background: none;border: none;- color: var(--text-dim, rgba(var(--tint-rgb), 0.7));+ color: rgba(var(--tint-rgb), 0.7);font-size: 13px;text-decoration: underline;cursor: pointer;@@ -2810,7 +2841,7 @@ body,.update-card__pct {margin: 0;font-size: 12.5px;- color: var(--text-dim, rgba(var(--tint-rgb), 0.6));+ color: rgba(var(--tint-rgb), 0.6);}.update-card__btn {@@ -2850,7 +2881,7 @@ body,.set-value {font-size: 13px;- color: var(--text-dim, rgba(var(--tint-rgb), 0.6));+ color: rgba(var(--tint-rgb), 0.6);}.set-btn {@@ -2876,21 +2907,21 @@ body,gap: 10px;max-width: 560px;padding: 6px 8px 6px 14px;- background: rgba(40, 40, 42, 0.96);+ background: rgba(var(--menu-rgb), 0.96);border: 1px solid var(--border);border-left: 3px solid var(--accent);border-radius: 10px;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.45 * var(--shadow-k)));font-size: 12.5px;color: var(--text);}.announce-banner--success {- border-left-color: #30d158;+ border-left-color: var(--success);}.announce-banner--warning {- border-left-color: #ff9f0a;+ border-left-color: var(--warn);}.announce-banner__dot {@@ -2902,11 +2933,11 @@ body,}.announce-banner--success .announce-banner__dot {- background: #30d158;+ background: var(--success);}.announce-banner--warning .announce-banner__dot {- background: #ff9f0a;+ background: var(--warn);}.announce-banner__content {@@ -2924,7 +2955,7 @@ body,}.announce-banner__body {- color: var(--text-dim, rgba(var(--tint-rgb), 0.6));+ color: rgba(var(--tint-rgb), 0.6);white-space: nowrap;overflow: hidden;text-overflow: ellipsis;@@ -2956,7 +2987,7 @@ body,background: transparent;border: none;border-radius: 6px;- color: var(--text-dim, rgba(var(--tint-rgb), 0.6));+ color: rgba(var(--tint-rgb), 0.6);font-size: 12px;cursor: pointer;}@@ -2975,7 +3006,7 @@ body,background: rgba(255, 159, 10, 0.15);border: 1px solid rgba(255, 159, 10, 0.4);border-radius: 10px;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.45 * var(--shadow-k)));font-size: 12.5px;color: var(--text);}@@ -3004,13 +3035,13 @@ body,display: inline-flex;align-items: center;justify-content: center;- background: rgba(40, 40, 42, 0.92);+ background: rgba(var(--menu-rgb), 0.92);border: 1px solid var(--border);border-radius: 9px;color: var(--text);font-size: 15px;cursor: pointer;- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);+ box-shadow: 0 6px 20px rgba(0, 0, 0, calc(0.3 * var(--shadow-k)));}.controls-cluster > button:hover {@@ -3083,7 +3114,7 @@ body,height: 100%;background: var(--panel);border-left: 1px solid var(--border);- box-shadow: -16px 0 48px rgba(0, 0, 0, 0.5);+ box-shadow: -16px 0 48px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));display: flex;flex-direction: column;}@@ -3229,7 +3260,7 @@ body,margin: 12px 0 6px;font-size: 12px;font-weight: 600;- color: var(--label);+ color: var(--text);}/* ---- Source control ---- */@@ -3347,7 +3378,7 @@ body,.scm-branch {background: rgba(122, 162, 247, 0.15);- color: #a9c0ff;+ color: var(--accent-text);border: 1px solid rgba(122, 162, 247, 0.3);border-radius: 7px;padding: 3px 9px;@@ -3365,7 +3396,7 @@ body,}.scm-ahead {- color: #32d74b;+ color: var(--success);}.scm-behind {@@ -3420,7 +3451,7 @@ body,.scm-section-head button {background: transparent;border: none;- color: #a9c0ff;+ color: var(--accent-text);font-size: 12px;cursor: pointer;font-family: inherit;@@ -3493,12 +3524,12 @@ body,}.scm-path:hover {- color: #a9c0ff;+ color: var(--accent-text);text-decoration: underline;}.scm-file.open .scm-path {- color: #a9c0ff;+ color: var(--accent-text);}.scm-discard {@@ -3512,7 +3543,7 @@ body,}.scm-discard:hover {- color: #ff453a;+ color: var(--danger);}.scm-diff {@@ -3534,12 +3565,12 @@ body,}.scm-diff .d-add {- color: #32d74b;+ color: var(--success);background: rgba(158, 206, 106, 0.08);}.scm-diff .d-del {- color: #ff453a;+ color: var(--danger);background: rgba(247, 118, 142, 0.08);}@@ -3562,11 +3593,11 @@ body,}.scm-add {- color: #32d74b;+ color: var(--success);}.scm-del {- color: #ff453a;+ color: var(--danger);}.scm-commit {@@ -3616,7 +3647,7 @@ body,justify-content: center;background: rgba(10, 132, 255, 0.14);border: 1px solid rgba(10, 132, 255, 0.32);- color: #6cb0ff;+ color: var(--accent-text);border-radius: 7px;font-size: 13px;line-height: 1;@@ -3799,11 +3830,11 @@ body,}.ex-dl.done {- color: var(--ok, #34c759);+ color: var(--success);}.ex-dl.error {- color: var(--danger, #ff6b6b);+ color: var(--danger, var(--danger));font-weight: 700;}@@ -3843,7 +3874,7 @@ body,}.ex-dls__row.error {- color: var(--danger, #ff6b6b);+ color: var(--danger, var(--danger));}.ex-dls__name {@@ -3903,10 +3934,10 @@ body,max-height: 85vh;display: flex;flex-direction: column;- background: rgba(40, 40, 42, 0.99);+ background: rgba(var(--menu-rgb), 0.99);border: 1px solid var(--border);border-radius: 14px;- box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);+ box-shadow: 0 24px 64px rgba(0, 0, 0, calc(0.6 * var(--shadow-k)));padding: 18px;}@@ -3984,7 +4015,7 @@ body,border-radius: 6px;background: var(--panel-header);color: var(--muted);- font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;font-size: 11px;white-space: nowrap;overflow: hidden;@@ -4050,7 +4081,7 @@ body,border: 1px solid rgba(255, 69, 58, 0.4);border-radius: 6px;background: rgba(255, 69, 58, 0.12);- color: #ff8a80;+ color: var(--danger);font-size: 11px;line-height: 1.4;white-space: pre-wrap;@@ -4106,7 +4137,7 @@ body,.clone-dialog__error {margin-top: 8px;font-size: 11px;- color: #ff6b6b;+ color: var(--danger);word-break: break-word;}.clone-dialog__progress {@@ -4151,7 +4182,7 @@ body,background: var(--surface-deep);border: 1px solid var(--border);border-radius: 18px;- box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);+ box-shadow: 0 30px 80px rgba(0, 0, 0, calc(0.65 * var(--shadow-k)));}.consent-icon {@@ -4265,7 +4296,7 @@ body,gap: 8px;margin: -6px 0 14px;font-size: 12.5px;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ color: rgba(var(--tint-rgb), 0.55);cursor: pointer;}@@ -4307,7 +4338,7 @@ body,}.confirm__btn.danger {- background: #ff453a;+ background: var(--danger);border-color: transparent;color: #fff;font-weight: 600;@@ -4369,7 +4400,7 @@ body,text-align: left;font-size: 12px;color: var(--muted);- font-family: var(--mono, monospace);+ font-family: monospace;}.dir-picker__list {@@ -4435,10 +4466,10 @@ body,max-height: 80vh;display: flex;flex-direction: column;- background: rgba(40, 40, 42, 0.99);+ background: rgba(var(--menu-rgb), 0.99);border: 1px solid var(--border);border-radius: 14px;- box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);+ box-shadow: 0 24px 64px rgba(0, 0, 0, calc(0.6 * var(--shadow-k)));overflow: hidden;}@@ -4512,10 +4543,10 @@ body,max-height: 60vh;display: flex;flex-direction: column;- background: rgba(40, 40, 42, 0.99);+ background: rgba(var(--menu-rgb), 0.99);border: 1px solid var(--border);border-radius: 14px;- box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);+ box-shadow: 0 24px 64px rgba(0, 0, 0, calc(0.6 * var(--shadow-k)));overflow: hidden;}@@ -4578,7 +4609,7 @@ body,}.palette__secondary:hover {background: rgba(10, 132, 255, 0.18);- color: #6cb0ff;+ color: var(--accent-text);}.palette__section {@@ -4708,7 +4739,7 @@ body,/* The worktree is gone from disk — muted/warning, not colorful. */.group-node__branch--stale {- color: #ff9f0a;+ color: var(--warn);cursor: help;}@@ -4722,7 +4753,7 @@ body,}.group-node__wt-dirty {- color: #ff9f0a;+ color: var(--warn);}.group-node__wt-btn {@@ -4784,7 +4815,7 @@ body,.react-flow__node.selected .subagent-node,.react-flow__node.selected .loop-node {border-color: var(--accent);- box-shadow: 0 0 0 1.5px var(--accent), 0 6px 20px rgba(0, 0, 0, 0.45);+ box-shadow: 0 0 0 1.5px var(--accent), 0 6px 20px rgba(0, 0, 0, calc(0.45 * var(--shadow-k)));}/* ---- Subagent (ephemeral, hook-driven) node ---- */@@ -4799,7 +4830,7 @@ body,border: 1px solid var(--border);border-left: 3px solid #d97757;border-radius: 10px;- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);+ box-shadow: 0 6px 20px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));font-size: 12px;color: var(--text);overflow: hidden;@@ -4832,7 +4863,7 @@ body,min-height: 0;padding: 10px;border-radius: 8px;- background: #0e0e0e;+ background: var(--surface-black);border: 1px solid var(--border);overflow: auto;font-family: 'SF Mono', Menlo, Monaco, monospace;@@ -4862,7 +4893,7 @@ body,}.subagent-node.done .subagent-node__dot {- background: #30d158;+ background: var(--success);}.subagent-node__type {@@ -4931,7 +4962,7 @@ body,border: 1px solid var(--border);border-left: 3px solid #bf7af0;border-radius: 10px;- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);+ box-shadow: 0 6px 20px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));font-size: 12px;color: var(--text);overflow: hidden;@@ -5086,11 +5117,11 @@ body,/* ---- Minimap ---- */.minimap {- background: rgba(40, 40, 42, 0.85) !important;+ background: rgba(var(--menu-rgb), 0.85) !important;border: 1px solid var(--border);border-radius: 10px;overflow: hidden;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));}/* Minimap-scale status glow: same language as the node glows (amber working / red@@ -5151,7 +5182,7 @@ body,.react-flow__controls {border-radius: 10px;overflow: hidden;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));}.react-flow__controls-button {@@ -5206,9 +5237,9 @@ body,height: 26px;padding: 0 9px;border-radius: 13px;- background: rgba(28, 28, 30, 0.92);+ background: rgba(var(--card-rgb), 0.92);border: 1px solid rgba(var(--tint-rgb), 0.08);- color: var(--label, #fff);+ color: var(--text-strong);font-size: 12px;font-variant-numeric: tabular-nums;cursor: pointer;@@ -5224,7 +5255,7 @@ body,overflow: hidden;}.usage-pill__minibar-fill { display: block; height: 100%; border-radius: 3px; }-.usage-pill__num { color: var(--label, #fff); }+.usage-pill__num { color: var(--text-strong); }.usage-pill__sep { color: rgba(var(--tint-rgb), 0.4); }/* Non-Claude provider segments read one step quieter than the Claude numbers, so a long pillstill scans as "Claude first, others after" without needing separate icons per provider. */@@ -5240,7 +5271,7 @@ body,width: 24px;height: 24px;border-radius: 12px;- background: rgba(28, 28, 30, 0.92);+ background: rgba(var(--card-rgb), 0.92);border: 1px solid rgba(var(--tint-rgb), 0.08);color: rgba(var(--tint-rgb), 0.7);font-size: 13px;@@ -5258,10 +5289,10 @@ body,width: 280px;padding: 14px 16px;border-radius: 12px;- background: rgba(20, 20, 22, 0.98);+ background: rgba(var(--popover-rgb), 0.98);border: 1px solid rgba(var(--tint-rgb), 0.1);- box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);- color: var(--label, #fff);+ box-shadow: 0 12px 40px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));+ color: var(--text-strong);}.usage-popover__head { margin-bottom: 12px; }.usage-popover__title { display: block; font-size: 15px; font-weight: 600; }@@ -5324,7 +5355,7 @@ body,border-radius: 9px;background: rgba(var(--tint-rgb), 0.06);border: 1px solid rgba(var(--tint-rgb), 0.08);- color: var(--label-secondary, rgba(var(--tint-rgb), 0.7));+ color: rgba(var(--tint-rgb), 0.7);font-size: 10px;font-variant-numeric: tabular-nums;cursor: pointer;@@ -5335,7 +5366,7 @@ body,overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.7));+ color: rgba(var(--tint-rgb), 0.7);}.ctx-pill__bar {display: inline-block;@@ -5354,10 +5385,10 @@ body,width: 220px;padding: 12px 14px;border-radius: 10px;- background: rgba(20, 20, 22, 0.98);+ background: rgba(var(--popover-rgb), 0.98);border: 1px solid rgba(var(--tint-rgb), 0.1);- box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);- color: var(--label, #fff);+ box-shadow: 0 10px 32px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));+ color: var(--text-strong);z-index: 20;}.ctx-popover__title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }@@ -5523,7 +5554,7 @@ body,word-break: break-word;font-size: 11px;line-height: 1.4;- color: #ff8a80;+ color: var(--danger);}.scm-error__dismiss {flex: none;@@ -5555,7 +5586,7 @@ body,background: var(--panel-2, var(--bg));border: 1px solid var(--border);border-radius: 10px;- box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);+ box-shadow: 0 18px 50px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));padding: 6px;overflow: hidden;}@@ -5649,15 +5680,15 @@ body,.ss-row.is-active { background: rgba(var(--tint-rgb), 0.06); border-color: var(--border); }.ss-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }-.ss-dot--idle { background: rgba(160, 160, 160, 0.4); }+.ss-dot--idle { background: var(--muted-2); }/* done renders as a check icon (ss-check), not a dot — see SessionRow. */-.ss-check { color: #30d158; margin-top: 2px; flex: 0 0 auto; line-height: 0; }+.ss-check { color: var(--success); margin-top: 2px; flex: 0 0 auto; line-height: 0; }/* Unread: the same check, accent-blue and pulsing until the user visits the node. */.ss-check--unread { color: var(--accent); animation: nt-pulse 1.1s ease-in-out infinite; }.ss-check svg { width: 13px; height: 13px; }/* attention renders as a red bell (ss-bell) — "it's ringing for you". Gentle pulse,same cadence as the header badge dot. */-.ss-bell { color: #ff453a; margin-top: 2px; flex: 0 0 auto; line-height: 0; animation: nt-pulse 1.1s ease-in-out infinite; }+.ss-bell { color: var(--danger); margin-top: 2px; flex: 0 0 auto; line-height: 0; animation: nt-pulse 1.1s ease-in-out infinite; }.ss-bell svg { width: 13px; height: 13px; }.ss-dot--working {background: transparent;@@ -5673,9 +5704,9 @@ body,.ss-title.is-unread { font-weight: 600; }.ss-title-input { font-size: 12.5px; background: var(--panel); color: var(--text); border: 1px solid var(--accent); border-radius: 4px; padding: 1px 4px; }.ss-chip { font-size: 10px; color: var(--text); opacity: 0.7; background: var(--panel-header); border-radius: 4px; padding: 0 5px; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 0 auto; }-.ss-loop { font-size: 9.5px; color: #ffd60a; border: 1px solid rgba(255, 214, 10, 0.4); border-radius: 4px; padding: 0 4px; flex: 0 0 auto; }-.ss-meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: rgba(180, 180, 185, 0.85); min-width: 0; }-.ss-meta__cwd { font-family: var(--mono, monospace); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+.ss-loop { font-size: 9.5px; color: var(--caution); border: 1px solid rgba(255, 214, 10, 0.4); border-radius: 4px; padding: 0 4px; flex: 0 0 auto; }+.ss-meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); min-width: 0; }+.ss-meta__cwd { font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.ss-meta__ssh { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }.ss-ctx { font-size: 9.5px; padding: 0 5px; border-radius: 4px; color: #000; font-weight: 600; flex: 0 0 auto; }.ss-row__ai { margin-left: auto; opacity: 0; border: none; background: transparent; color: var(--text); cursor: pointer; font-size: 12px; line-height: 1; padding: 0 2px; flex: 0 0 auto; }@@ -5684,7 +5715,7 @@ body,.ss-row__ai:disabled { opacity: 0.6; cursor: default; color: var(--accent); }.ss-row__close { opacity: 0; border: none; background: transparent; color: var(--text); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; flex: 0 0 auto; }.ss-row:hover .ss-row__close { opacity: 0.6; }-.ss-row__close:hover { opacity: 1 !important; color: #ff453a; }+.ss-row__close:hover { opacity: 1 !important; color: var(--danger); }/* Sessions sidebar — shell */.sessions-sidebar {@@ -5696,15 +5727,15 @@ body,max-height: calc(100vh - 96px);display: flex;flex-direction: column;- background: rgba(28, 28, 30, 0.96);+ background: rgba(var(--card-rgb), 0.96);border: 1px solid var(--border);border-radius: 12px;- box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);+ box-shadow: 0 12px 40px rgba(0, 0, 0, calc(0.45 * var(--shadow-k)));overflow: hidden;}.sessions-sidebar__head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }.sessions-sidebar__title { font-size: 12.5px; font-weight: 600; color: var(--text); }-.sessions-sidebar__count { font-size: 10.5px; color: rgba(180, 180, 185, 0.85); }+.sessions-sidebar__count { font-size: 10.5px; color: var(--muted); }.sessions-sidebar__head-actions { margin-left: auto; display: flex; gap: 4px; }.sessions-sidebar__head-actions button { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--text); cursor: pointer; border-radius: 6px; }.sessions-sidebar__head-actions button:hover { background: var(--panel-header); }@@ -5712,7 +5743,7 @@ body,.sessions-sidebar__search { margin: 8px 10px 4px; }.sessions-sidebar__search input { width: 100%; box-sizing: border-box; font-size: 12px; padding: 5px 8px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 7px; }.sessions-sidebar__body { overflow-y: auto; padding: 4px 6px 8px; }-.sessions-sidebar__empty { padding: 18px 12px; text-align: center; font-size: 12px; color: rgba(180, 180, 185, 0.8); }+.sessions-sidebar__empty { padding: 18px 12px; text-align: center; font-size: 12px; color: var(--muted); }.ss-group__head { display: flex; align-items: center; gap: 6px; padding: 6px 6px; cursor: pointer; border-radius: 6px; border: 1px solid transparent; }.ss-group__head:hover { background: var(--panel-header); }@@ -5734,22 +5765,22 @@ body,text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);flex: 0 0 auto;}-.ss-group__chev { font-size: 9px; color: rgba(180, 180, 185, 0.85); width: 10px; }+.ss-group__chev { font-size: 9px; color: var(--muted); width: 10px; }.ss-group__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }.ss-group__name { font-size: 12px; font-weight: 600; color: var(--text); }.ss-group.is-active .ss-group__name { color: var(--accent); }-.ss-group__branch { font-size: 10px; color: rgba(180, 180, 185, 0.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }-.ss-group__count { font-size: 10px; color: rgba(180, 180, 185, 0.8); }+.ss-group__branch { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+.ss-group__count { font-size: 10px; color: var(--muted); }/* Signal badges on the project header: 🔔 needs-you count / ✓ unread count. Visible evenwhile the group is collapsed — that's their main job. */.ss-group__sig { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; flex: 0 0 auto; line-height: 0; }.ss-group__sig svg { width: 11px; height: 11px; }-.ss-group__sig--attention { color: #ff453a; }+.ss-group__sig--attention { color: var(--danger); }.ss-group__sig--unread { color: var(--accent); }.ss-group__add { margin-left: auto; opacity: 0; border: none; background: transparent; color: var(--text); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }.ss-group__head:hover .ss-group__add { opacity: 0.7; }.ss-group__add:hover { opacity: 1 !important; color: var(--accent); }-.ss-group__empty { padding: 4px 8px 6px 22px; font-size: 11px; color: rgba(180, 180, 185, 0.6); }+.ss-group__empty { padding: 4px 8px 6px 22px; font-size: 11px; color: var(--muted); }/* Canvas-group sub-section inside a project */.ss-subgroup {@@ -5769,7 +5800,7 @@ body,.ss-subgroup__ai:hover { opacity: 1 !important; color: var(--accent); }.ss-subgroup__ai:disabled { opacity: 0.6; cursor: default; color: var(--accent); }.ss-ungrouped { margin: 2px 0 0 15px; border: 1px solid transparent; border-radius: 6px; }-.ss-ungrouped__label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(180, 180, 185, 0.6); padding: 4px 6px 2px 8px; }+.ss-ungrouped__label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 4px 6px 2px 8px; }/* Drop-target highlight while dragging a session onto a group / project header */.is-drop-target { border-color: var(--accent) !important; background: color-mix(in srgb, var(--accent) 14%, transparent); }.ss-row[draggable='true'] { cursor: grab; }@@ -5784,7 +5815,7 @@ body,.ss-group.is-drop-before::before { content: ''; position: absolute; top: -1px; left: 6px; right: 6px; height: 2px; border-radius: 1px; background: var(--accent); pointer-events: none; z-index: 1; }.sessions-icon-cluster { position: absolute; top: 54px; left: 14px; z-index: 11; }-.sessions-icon-cluster button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: rgba(40, 40, 42, 0.92); border: 1px solid var(--border); border-radius: 9px; color: var(--text); cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }+.sessions-icon-cluster button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--menu-rgb), 0.92); border: 1px solid var(--border); border-radius: 9px; color: var(--text); cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, calc(0.3 * var(--shadow-k))); }.sessions-icon-cluster button:hover { background: var(--panel-header); }/* --- Dino node (T-Rex Runner game) --------------------------------------- */@@ -5793,8 +5824,8 @@ body,flex-direction: column;width: 100%;height: 100%;- background: #0b0b0f;- border: 1px solid var(--separator, #3a3a3c);+ background: var(--surface-black);+ border: 1px solid var(--border);border-radius: 10px;overflow: hidden;}@@ -5806,12 +5837,12 @@ body,align-items: center;gap: 6px;padding: 4px 6px;- background: #2a2a2c;+ background: var(--surface-overlay);}.dino-node__body {flex: 1;min-height: 0;- background: #0b0b0f;+ background: var(--surface-black);outline: none;}/* "▷ <name> is playing" — shown while spectating a peer's live run. Tiny, non-interactive. */@@ -6014,7 +6045,7 @@ body,border-top-style: solid;border-radius: 10px;overflow: hidden;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));}.chat-node.selected {border-color: var(--accent);@@ -6030,7 +6061,7 @@ body,.chat-node__title {font-size: 12px;font-weight: 600;- color: var(--label, rgba(var(--tint-rgb), 0.92));+ color: rgba(var(--tint-rgb), 0.92);overflow: hidden;text-overflow: ellipsis;white-space: nowrap;@@ -6052,7 +6083,7 @@ body,}/* NEEDS YOU is red everywhere (same as the terminal attention badge). */.chat-node__badge--needs {- color: #ff453a;+ color: var(--danger);background: rgba(255, 69, 58, 0.15);animation: nt-pulse 1.1s ease-in-out infinite;}@@ -6060,7 +6091,7 @@ body,flex: 0 0 auto;font-size: 11px;font-variant-numeric: tabular-nums;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ color: rgba(var(--tint-rgb), 0.55);}.chat-node__msgs {flex: 1 1 auto;@@ -6085,7 +6116,7 @@ body,width: 6px;height: 6px;border-radius: 50%;- background: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ background: rgba(var(--tint-rgb), 0.55);animation: chat-typing 1.2s ease-in-out infinite;}.chat-node__typing span:nth-child(2) {@@ -6121,7 +6152,7 @@ body,padding: 8px 10px;border-radius: 8px;font-size: 12px;- color: #ff453a;+ color: var(--danger);background: rgba(255, 69, 58, 0.12);border: 1px solid rgba(255, 69, 58, 0.35);}@@ -6155,7 +6186,7 @@ body,.chat-node__errorbar-msg {flex: 1 1 auto;font-size: 12px;- color: #ff453a;+ color: var(--danger);}.chat-node__errorbar-reconnect {flex: 0 0 auto;@@ -6165,7 +6196,7 @@ body,border-radius: 6px;border: 1px solid rgba(255, 69, 58, 0.5);background: rgba(255, 69, 58, 0.15);- color: #ff453a;+ color: var(--danger);cursor: pointer;}.chat-node__errorbar-reconnect:hover {@@ -6180,7 +6211,7 @@ body,.chat-node__permission-title {font-size: 12px;font-weight: 600;- color: var(--label, rgba(var(--tint-rgb), 0.92));+ color: rgba(var(--tint-rgb), 0.92);margin-bottom: 6px;}.chat-node__permission-input {@@ -6188,7 +6219,7 @@ body,max-height: 140px;overflow: auto;white-space: pre-wrap;- font-family: var(--mono, ui-monospace, monospace);+ font-family: ui-monospace, monospace;font-size: 11px;opacity: 0.85;}@@ -6203,7 +6234,7 @@ body,border-radius: 6px;border: 1px solid rgba(var(--tint-rgb), 0.12);background: rgba(var(--tint-rgb), 0.06);- color: var(--label, #fff);+ color: var(--text-strong);cursor: pointer;}.chat-node__permission-actions button:hover {@@ -6225,7 +6256,7 @@ body,font-size: 11px;border-radius: 5px;background: rgba(var(--tint-rgb), 0.08);- color: var(--label-secondary, rgba(var(--tint-rgb), 0.7));+ color: rgba(var(--tint-rgb), 0.7);}.chat-node__queue-item button {border: none;@@ -6259,7 +6290,7 @@ body,border-radius: 6px;border: 1px solid rgba(255, 69, 58, 0.5);background: rgba(255, 69, 58, 0.15);- color: #ff453a;+ color: var(--danger);cursor: pointer;}.chat-node__stop:hover {@@ -6290,7 +6321,7 @@ body,background: var(--panel);border: 1px solid var(--border);border-radius: 8px;- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);+ box-shadow: 0 8px 24px rgba(0, 0, 0, calc(0.45 * var(--shadow-k)));padding: 4px;z-index: 20;}@@ -6298,7 +6329,7 @@ body,padding: 4px 8px;font-size: 12px;font-variant-numeric: tabular-nums;- color: var(--label, rgba(var(--tint-rgb), 0.92));+ color: rgba(var(--tint-rgb), 0.92);border-radius: 5px;white-space: nowrap;overflow: hidden;@@ -6354,7 +6385,7 @@ body,.chat-node__attach-note {flex: 1 1 100%;font-size: 11px;- color: var(--label-secondary, rgba(var(--tint-rgb), 0.55));+ color: rgba(var(--tint-rgb), 0.55);}/* ---- team presence: cursors, chat bubbles (docs/team-presence.md) ---- */@@ -6399,7 +6430,7 @@ body,padding: 4px 8px;max-width: 320px;border-radius: 10px;- background: rgba(28, 28, 30, 0.95);+ background: rgba(var(--card-rgb), 0.95);border: 1px solid rgba(var(--tint-rgb), 0.14);color: var(--text);font-size: 12px;@@ -6414,7 +6445,7 @@ body,padding: 6px 10px;border-radius: 10px;border: 1px solid var(--accent);- background: rgba(28, 28, 30, 0.96);+ background: rgba(var(--card-rgb), 0.96);color: var(--text);font-size: 13px;outline: none;@@ -6428,7 +6459,7 @@ body,max-width: 320px;padding: 4px 8px;border-radius: 10px;- background: rgba(28, 28, 30, 0.95);+ background: rgba(var(--card-rgb), 0.95);border: 1px solid rgba(var(--tint-rgb), 0.14);color: var(--text);font-size: 12px;@@ -6575,7 +6606,7 @@ body,padding: 0 4px;border-radius: 8px;background: rgba(var(--tint-rgb), 0.16);- color: var(--label);+ color: var(--text);border-color: rgba(var(--tint-rgb), 0.18);}@@ -6590,7 +6621,7 @@ body,border-radius: 12px;background: var(--panel);border: 1px solid var(--border);- box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);+ box-shadow: 0 12px 32px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));}.presence-prompt__title {@@ -6710,10 +6741,10 @@ body,width: 264px;padding: 14px 16px;border-radius: 12px;- background: rgba(20, 20, 22, 0.98);+ background: rgba(var(--popover-rgb), 0.98);border: 1px solid rgba(var(--tint-rgb), 0.1);- box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);- color: var(--label, #fff);+ box-shadow: 0 12px 40px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));+ color: var(--text-strong);display: flex;flex-direction: column;align-items: center;@@ -6726,6 +6757,8 @@ body,}.phone-pair__qr {border-radius: 10px;+ /* theme-exempt: a QR code needs a light quiet zone to be readable by a camera, in both themes.+ This is the one background in the sheet that is content rather than chrome. */background: #fff;padding: 8px;}@@ -6736,12 +6769,12 @@ body,}.phone-pair__warn {font-size: 12px;- color: #ff9f0a;+ color: var(--warn);text-align: center;}.phone-pair__ok {font-size: 12px;- color: #30d158;+ color: var(--success);text-align: center;}.phone-pair__btn {@@ -6750,7 +6783,7 @@ body,border-radius: 7px;border: 1px solid rgba(var(--tint-rgb), 0.14);background: rgba(var(--tint-rgb), 0.08);- color: var(--label, #fff);+ color: var(--text-strong);cursor: pointer;}.phone-pair__btn:hover { background: rgba(var(--tint-rgb), 0.14); }@@ -6796,7 +6829,7 @@ body,right: 0;bottom: 0;z-index: 25; /* over the flow, under the tab bar (30) and the drawers/dialogs (40+) */- background: #000;+ background: var(--canvas-bg);display: flex;flex-direction: column;overflow: hidden;@@ -6857,7 +6890,7 @@ body,.kanban-col--drop {border-color: var(--accent);background: rgba(10, 132, 255, 0.07);- box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0, 0, 0, 0.35);+ box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0, 0, 0, calc(0.35 * var(--shadow-k)));}.kanban-col__header {display: flex;@@ -6909,7 +6942,7 @@ body,padding: 0;}.kanban-col__close:hover {- color: #ff453a;+ color: var(--danger);}.kanban-col__swatches {display: flex;@@ -7034,13 +7067,13 @@ body,flex: 0 0 auto;}.kanban-badge--running {- color: #32d74b;+ color: var(--success);background: rgba(50, 215, 75, 0.12);/* reuse the terminal-header badge pulse (nt-pulse) rather than a bespoke keyframe */animation: nt-pulse 1.1s ease-in-out infinite;}.kanban-badge--needs {- color: #ff9f0a;+ color: var(--warn);background: rgba(255, 159, 10, 0.12);}.kanban-card__unread {@@ -7135,7 +7168,7 @@ body,background: var(--surface-deep);border: 1px solid rgba(var(--tint-rgb), 0.12);border-radius: 8px;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));padding: 4px;z-index: 5;display: flex;@@ -7219,7 +7252,7 @@ body,background: var(--surface-sunken);border: 1px solid rgba(var(--tint-rgb), 0.12);border-radius: 12px;- box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);+ box-shadow: 0 24px 80px rgba(0, 0, 0, calc(0.6 * var(--shadow-k)));overflow: hidden;}.kanban-modal__header {@@ -7474,7 +7507,7 @@ body,background: var(--surface-sunken);border: 1px solid rgba(var(--tint-rgb), 0.12);border-radius: 10px;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));overflow: hidden;z-index: 5;}@@ -7574,7 +7607,7 @@ body,background: var(--surface-raised);border: 1px solid rgba(var(--tint-rgb), 0.14);border-radius: 8px;- box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);+ box-shadow: 0 16px 40px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));padding: 8px;display: flex;flex-direction: column;@@ -7699,10 +7732,10 @@ body,width: 170px;max-height: 240px;overflow-y: auto;- background: #262628;+ background: var(--surface-raised);border: 1px solid rgba(var(--tint-rgb), 0.16);border-radius: 7px;- box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);+ box-shadow: 0 14px 36px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));padding: 5px;display: flex;flex-direction: column;@@ -7817,7 +7850,7 @@ body,background: var(--surface-raised);border: 1px solid rgba(var(--tint-rgb), 0.14);border-radius: 8px;- box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);+ box-shadow: 0 16px 40px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));padding: 6px;display: flex;flex-direction: column;@@ -7916,7 +7949,7 @@ body,background: var(--surface-deep);border: 1px solid rgba(var(--tint-rgb), 0.12);border-radius: 8px;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));padding: 4px;z-index: 6;display: flex;@@ -7943,7 +7976,7 @@ body,text-align: left;}.kanban-meta__check {- color: #32d74b;+ color: var(--success);}.kanban-meta__due {background: rgba(var(--tint-rgb), 0.06);@@ -7963,7 +7996,7 @@ body,font-size: 11px;}.kanban-meta__clear:hover {- color: #ff453a;+ color: var(--danger);}.kanban-due {font-size: 10px;@@ -8035,7 +8068,7 @@ body,display: flex;align-items: center;justify-content: center;- background: #000;+ background: var(--canvas-bg);color: var(--text);}@@ -8154,7 +8187,7 @@ body,border: 1px solid var(--border);border-radius: 16px;overflow: hidden;- box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);+ box-shadow: 0 24px 70px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));}.onb-scene {flex: 0 0 46%;@@ -8363,7 +8396,7 @@ body,.onb-model__ok {display: inline-flex;align-items: center;- color: #34c759;+ color: var(--success);margin-left: auto; /* right-aligned when it's the only trailing chip… */}.onb-pro + .onb-model__ok {@@ -8429,7 +8462,7 @@ body,.onb-tryit.is-done {border-style: solid;border-color: rgba(52, 199, 89, 0.5);- color: #34c759;+ color: var(--success);font-weight: 600;}@@ -8520,7 +8553,7 @@ body,border-top-width: 3px;border-radius: 10px;overflow: hidden;- box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);+ box-shadow: 0 8px 28px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));opacity: 0;animation: onb-node-pop 7s cubic-bezier(0.34, 1.4, 0.5, 1) infinite;}@@ -8590,7 +8623,7 @@ body,min-width: 34px;height: 34px;padding: 0 8px;- background: #1d1d21;+ background: var(--surface-deep);border: 1px solid var(--border);border-bottom-width: 3px;border-radius: 8px;@@ -8755,10 +8788,10 @@ body,gap: 5px;height: 24px;padding: 0 7px;- background: #1c1c20;+ background: var(--surface-deep);border: 1px solid var(--border);border-radius: 6px;- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);+ box-shadow: 0 4px 12px rgba(0, 0, 0, calc(0.35 * var(--shadow-k)));transition: left 0.7s cubic-bezier(0.4, 0.9, 0.3, 1), top 0.7s cubic-bezier(0.4, 0.9, 0.3, 1),transform 0.7s ease, width 0.7s ease;}@@ -8798,9 +8831,9 @@ body,max-width: 340px;border-radius: 12px 12px 6px 6px;border: 1px solid rgba(var(--tint-rgb), 0.14);- background: #0b0b0d;+ background: var(--surface-black);overflow: visible;- box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);+ box-shadow: 0 18px 40px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));}.onb-lid__bar {position: relative;@@ -8826,7 +8859,7 @@ body,align-items: center;height: 26px;padding-left: 8px;- background: #000;+ background: var(--canvas-bg);border-radius: 0 0 10px 10px;animation: onb-capsule 6s ease-in-out infinite;}@@ -8864,7 +8897,7 @@ body,display: flex;flex-direction: column;gap: 6px;- background: #000;+ background: var(--canvas-bg);border-radius: 0 0 12px 12px;transform-origin: top center;animation: onb-notchpanel 6s ease-in-out infinite;@@ -8913,11 +8946,11 @@ body,align-items: center;gap: 10px;width: 82%;- background: rgba(40, 40, 46, 0.92);+ background: rgba(var(--menu-rgb), 0.92);border: 1px solid rgba(var(--tint-rgb), 0.14);border-radius: 12px;padding: 10px 12px;- box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);+ box-shadow: 0 14px 36px rgba(0, 0, 0, calc(0.5 * var(--shadow-k)));animation: onb-notif 5s ease infinite;}@keyframes onb-notif {@@ -8966,7 +8999,7 @@ body,background: var(--surface-sunken);border: 2px solid rgba(var(--tint-rgb), 0.16);border-radius: 24px;- box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);+ box-shadow: 0 18px 50px rgba(0, 0, 0, calc(0.55 * var(--shadow-k)));padding: 28px 10px 12px;animation: onb-float 7s ease-in-out infinite;}@@ -9028,7 +9061,7 @@ body,letter-spacing: 0.08em;padding: 4px 11px;border-radius: 999px;- box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);+ box-shadow: 0 8px 20px rgba(0, 0, 0, calc(0.4 * var(--shadow-k)));animation: onb-soon 3.2s ease-in-out infinite;}@keyframes onb-soon {@@ -9193,9 +9226,9 @@ body,overflow-y: auto;padding: 34px 34px 28px;border-radius: 20px;- background: #0b0b0d;+ background: var(--surface-black);border: 1px solid rgba(139, 92, 246, 0.35);- box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);+ box-shadow: 0 30px 90px rgba(0, 0, 0, calc(0.6 * var(--shadow-k)));text-align: center;color: var(--text);}diff --git a/src/renderer/styles.theme.test.ts b/src/renderer/styles.theme.test.tsnew file mode 100644index 000000000..c6851f0d4--- /dev/null+++ b/src/renderer/styles.theme.test.ts@@ -0,0 +1,128 @@+import { describe, it, expect } from 'vitest'+import { readFileSync } from 'node:fs'+import { join } from 'node:path'++/**+ * Guards on the stylesheet's theming, written after the light theme shipped with a black canvas+ * and a dark sessions sidebar.+ *+ * The bug was not any one rule — it was the AUDIT. The literals were found by listing the most+ * frequent colours, which silently skips the ones used once: `.react-flow { background: #000000 }`+ * is the entire canvas and appeared exactly once. A test doesn't get bored at entry 26.+ */++const CSS = readFileSync(join(__dirname, 'styles.css'), 'utf8')++/** Everything before the end of the `:root[data-theme='light']` block — where literals belong. */+const TOKEN_BLOCK_END = CSS.indexOf('\n}\n', CSS.indexOf(":root[data-theme='light']")) + 3+const RULES = CSS.slice(TOKEN_BLOCK_END)++function luminance(r: number, g: number, b: number): number {+ return (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255+}++function parseColor(lit: string): { lum: number; alpha: number } | null {+ const hex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(lit.trim())+ if (hex) {+ const h = hex[1].length === 3 ? [...hex[1]].map((c) => c + c).join('') : hex[1]+ return {+ lum: luminance(parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16)),+ alpha: 1+ }+ }+ const rgb = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)$/i.exec(lit.trim())+ if (rgb) {+ return {+ lum: luminance(+rgb[1], +rgb[2], +rgb[3]),+ alpha: rgb[4] === undefined ? 1 : +rgb[4]+ }+ }+ return null+}++/**+ * Scrims: a translucent wash whose JOB is to darken whatever is under it. Black is correct in+ * both themes, so these are the one legitimate place for a literal dark background. Listed+ * explicitly, so adding one is a decision rather than an oversight.+ */+const SCRIM_ALPHA_MAX = 0.8++describe('every opaque surface is themed', () => {+ // `background: <literal>` outside the token block. An opaque near-black or near-white here is a+ // surface that will not follow the theme — exactly the canvas/dock/sidebar failure.+ const offenders: string[] = []+ let selector = ''+ const lines = RULES.split('\n')+ lines.forEach((line, i) => {+ if (line.includes('{')) selector = line.split('{')[0].trim() || selector+ const decl = /^\s*background(?:-color)?:\s*([^;]+);/.exec(line)+ if (!decl) return+ // Drop `var(--x, <fallback>)` wholesale before looking for literals: a fallback is only+ // reached when the variable is undefined, and the previous test already proves none are.+ // An explicit `theme-exempt:` comment on the line above opts a rule out — the QR quiet zone+ // is content, not chrome, and has to stay light in both themes. A marker makes that a stated+ // decision instead of an oversight, which is the whole point of this test.+ if (lines[i - 1]?.includes('theme-exempt:') || lines[i - 2]?.includes('theme-exempt:')) return+ const value = decl[1].replace(/var\([^)]*\)/g, '')+ for (const lit of value.match(/#[0-9a-fA-F]{3,8}|rgba?\([^)]*\)/g) ?? []) {+ const c = parseColor(lit)+ if (!c) continue+ const extreme = c.lum < 0.25 || c.lum > 0.85+ if (extreme && c.alpha > SCRIM_ALPHA_MAX) {+ offenders.push(`${selector || '?'} (line ~${i + 1}): ${lit}`)+ }+ }+ })++ it('has no un-themed near-black or near-white background', () => {+ expect(offenders).toEqual([])+ })+})++describe('every CSS variable resolves', () => {+ // `var(--label, #fff)` looked themed and was not: `--label` never existed, so every one of those+ // sites was a hardcoded white. A referenced-but-undefined variable is either that trap or a+ // typo — unless the renderer sets it at runtime.+ const SET_FROM_JS = new Set([+ '--term-bg', // App.tsx, from the terminal theme+ '--peer-color', // presence chips, per peer+ '--group-label-boost', // GroupNode, zoom-compensated label size+ '--mascot-w',+ '--mascot-h',+ '--cmascot-w',+ '--cmascot-h',+ '--cmascot-sheet-w',+ '--cmascot-sheet-h' // notch HUD sprite sheets+ ])++ it('references no variable that is never defined', () => {+ const defined = new Set(Array.from(CSS.matchAll(/^\s*(--[a-z0-9-]+)\s*:/gm), (x) => x[1]))+ const used = new Set(Array.from(CSS.matchAll(/var\(\s*(--[a-z0-9-]+)/g), (x) => x[1]))+ const dangling = [...used].filter((v) => !defined.has(v) && !SET_FROM_JS.has(v)).sort()+ expect(dangling).toEqual([])+ })+})++describe('the light theme overrides every themeable token', () => {+ // A token defined in `:root` but absent from the light block keeps its DARK value on a light+ // page. Colour-valued tokens must appear in both; geometry (radii, fonts) is theme-independent.+ it('covers every colour token', () => {+ const dark = CSS.slice(CSS.indexOf(':root {'), CSS.indexOf(":root[data-theme='light']"))+ const light = CSS.slice(CSS.indexOf(":root[data-theme='light']"), TOKEN_BLOCK_END)+ const colourish = (decl: string): boolean =>+ /#[0-9a-f]{3,8}|rgba?\(|^\s*\d+,\s*\d+,\s*\d+\s*$/i.test(decl)++ const darkTokens = Array.from(dark.matchAll(/^\s*(--[a-z0-9-]+)\s*:\s*([^;]+);/gm))+ .filter(([, , v]) => colourish(v))+ .map(([, k]) => k)+ const lightTokens = new Set(+ Array.from(light.matchAll(/^\s*(--[a-z0-9-]+)\s*:/gm), (x) => x[1])+ )++ // The git-graph lane hues are branch IDENTITY, not chrome: they must stay the same colour in+ // both themes or a graph would change meaning when the theme flips.+ const themeIndependent = (k: string): boolean => k.startsWith('--git-graph-')+ const missing = darkTokens.filter((k) => !lightTokens.has(k) && !themeIndependent(k))+ expect(missing).toEqual([])+ })+})