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(glass): rim light instead of a diagonal sheen
iceclatterWTfb43e6aefd83
diff --git a/CLAUDE.md b/CLAUDE.mdindex 85313377c..903eca058 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -3893,13 +3893,13 @@ glass never sits over plain black; a wallpaper the user chose is never replaced.guarantee is off. Measured: chrome dark 0.20 / 0.70 / 0.95, chrome light 0.20 / 0.745 / 0.95,nodeterm-dark 0.20 / 0.675 / 0.95 (Clear / Readable / Tinted). App.tsx sets `--glass-t` (blur16→28px on chrome and × 0.85 = 13.6→23.8px on terminal nodes via `--glass-term-blur`, saturation- 200→145%) and `--glass-sheen`. **Refraction** is ONE shared SVG filter+ 200→145%). **Refraction** is ONE shared SVG filter(`components/GlassRefraction.tsx`, `#nt-refract`: a 256² edge-lens displacement map generated once,`primitiveUnits="objectBoundingBox"` so one filter fits every element), referenced from- `--glass-blur` as `url(#nt-refract)` — no per-node filters. Its scale is `0.06 × (1 − t)`; it moves- backdrop pixels, never the tint, so it cannot touch contrast. The specular sheen is a background- gradient scaled by `glassSheen(t)`, which is ZERO from the tick on — it lightens the surface, so it- may only exist where the promise is already off. Node blur+refraction pause while the camera moves+ `--glass-blur` as `url(#nt-refract)` — no per-node filters. Its scale is `0.025 × (1 − t)`; it moves+ backdrop pixels, never the tint, so it cannot touch contrast. Glass NODES carry a 1px rim light instead of a sheen: a+ masked-ring `::before` (anchored to the React Flow wrapper), brightest top-left; a surface-wide+ diagonal sheen was tried and washed the pane out. Refraction scale max is 0.025 (was 0.06). Node blur+refraction pause while the camera moves(`.canvas-moving`) ONLY when **Keep blur while moving** is off (`settings.glassBlurWhileMoving`,default ON, read through `keepGlassBlurWhileMoving` — only a literal `false` pauses): on, Canvasnever adds the class, so the glass stays live through a pan at a GPU cost; chrome keeps both always. MEASURED on the live dev build (CDP computed style):@@ -3914,7 +3914,7 @@ glass never sits over plain black; a wallpaper the user chose is never replaced.- **Accessibility outranks the slider** (HIG liquid-glass.md, like iOS). `lib/useGlassA11y.ts`reads `prefers-reduced-transparency` and `prefers-contrast: more` (one subscription, Electron andbrowser alike) and `glassSurfaceAlpha` applies them to every tint alpha: **Reduce Transparency**- = alpha 1, no blur, no refraction filter in the DOM, no sheen, and the slider row is disabled+ = alpha 1, no blur, no refraction filter in the DOM, no rim light, and the slider row is disabledwith the reason; **Increase Contrast** = the slider pins to Tinted, `--glass-edge` goes to 0.5,terminal borders thicken and the `--sys-*` palette takes HIG's increased-contrast columns(`SYSTEM_COLORS.darkContrast|lightContrast`, pinned to the CSS). The alpha half lives in JSdiff --git a/src/renderer/App.tsx b/src/renderer/App.tsxindex 1db80f3ef..02a4b814d 100644--- a/src/renderer/App.tsx+++ b/src/renderer/App.tsx@@ -19,7 +19,7 @@ import { resolveUiScale } from '../shared/ui-scale'import { resolveTabBarHeight } from '../shared/window-chrome-metrics'import { useAppTheme } from './state/useAppTheme'import { installWindowActivityOnDocument } from './lib/windowActivity'-import { glassChromeAlpha, glassSheen, glassSurfaceAlpha, parseCssColor, resolveGlassSlider } from './lib/glassContrast'+import { glassChromeAlpha, glassSurfaceAlpha, parseCssColor, resolveGlassSlider } from './lib/glassContrast'import { useGlassA11y } from './lib/useGlassA11y'import { GlassRefraction } from './components/GlassRefraction'import { isLiquidGlass } from './lib/appTheme'@@ -84,7 +84,7 @@ export default function App() {// of the theme that effect just applied. An unparseable token leaves the chrome opaque.const liquidGlass = isLiquidGlass(useSettings((s) => s.settings.appTheme))// The Glass slider moves every surface between Clear and Tinted through its own readable alpha- // (glassSliderAlpha); `--glass-t` scales the blur and `--glass-sheen` the specular wash in CSS.+ // (glassSliderAlpha); `--glass-t` scales the blur in CSS.const glassSlider = resolveGlassSlider(useSettings((s) => s.settings.glassTint))// Reduce Transparency / Increase Contrast outrank the slider (opaque / Tinted), like iOS.const glassA11y = useGlassA11y()@@ -94,7 +94,6 @@ export default function App() {delete root.dataset.ntGlassroot.style.removeProperty('--glass-chrome-bg')root.style.removeProperty('--glass-t')- root.style.removeProperty('--glass-sheen')return}// Read the tokens with the glass overrides OFF: under them `--panel` IS the glass fill, and a@@ -112,7 +111,6 @@ export default function App() {: panel)root.style.setProperty('--glass-t', glassSlider.toFixed(3))- root.style.setProperty('--glass-sheen', glassA11y.reduceTransparency ? '0' : glassSheen(glassSlider).toFixed(3))root.dataset.ntGlass = 'on'}, [liquidGlass, appTheme, glassSlider, glassA11y])diff --git a/src/renderer/lib/glassContrast.test.ts b/src/renderer/lib/glassContrast.test.tsindex cc06feeba..22adae76a 100644--- a/src/renderer/lib/glassContrast.test.ts+++ b/src/renderer/lib/glassContrast.test.ts@@ -17,7 +17,6 @@ import {GLASS_READABLE_TICK,GLASS_TINTED_ALPHA,glassRefraction,- glassSheen,glassSliderAlpha,glassTint,resolveGlassSlider,@@ -187,9 +186,8 @@ describe('Glass slider (Clear ↔ Tinted)', () => {expect(resolveGlassSlider(7)).toBe(1)})- it('the sheen appears only left of the tick; refraction fades to nothing at Tinted', () => {- expect(glassSheen(0)).toBe(1)- for (const t of [GLASS_READABLE_TICK, 0.85, 1]) expect(glassSheen(t)).toBe(0)+ it('refraction is strongest at Clear and fades to nothing at Tinted', () => {+ expect(glassRefraction(0)).toBe(0.025)expect(glassRefraction(0)).toBeGreaterThan(glassRefraction(GLASS_READABLE_TICK))expect(glassRefraction(1)).toBe(0)})diff --git a/src/renderer/lib/glassContrast.ts b/src/renderer/lib/glassContrast.tsindex 4b62c7ff3..cd1e3baa3 100644--- a/src/renderer/lib/glassContrast.ts+++ b/src/renderer/lib/glassContrast.ts@@ -230,15 +230,9 @@ export function glassSliderAlpha(t: number, readable: number): number {return readable + ((tinted - readable) * (t - GLASS_READABLE_TICK)) / (1 - GLASS_READABLE_TICK)}-/** Specular sheen strength, 0..1: full at Clear, ZERO from the Readable tick on — the sheen is a- * white wash under the text, so it may only appear where the contrast promise is already off. */-export function glassSheen(t: number): number {- return Math.max(0, (GLASS_READABLE_TICK - t) / GLASS_READABLE_TICK)-}-/** Edge-lens displacement (feDisplacementMap `scale`, objectBoundingBox units): strongest at* Clear, flat at Tinted. It moves backdrop pixels, never the tint, so it cannot touch contrast. */-export const GLASS_REFRACT_MAX = 0.06+export const GLASS_REFRACT_MAX = 0.025export function glassRefraction(t: number): number {return GLASS_REFRACT_MAX * (1 - t)}diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 33e3c326f..3b10b3d1c 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -13534,11 +13534,10 @@ body.focus-mode .dock:hover {--tabbar-bg: var(--glass-chrome-bg);--glass-edge: rgba(var(--tint-rgb), 0.2);/* The Glass slider (App.tsx sets the live values inline; these are the Readable-tick defaults):- `--glass-t` 0 = Clear … 1 = Tinted, `--glass-sheen` the specular wash (0 from the tick on).+ `--glass-t` 0 = Clear … 1 = Tinted.Clearer glass blurs a little less and saturates a little more, and refracts at its rim(`#nt-refract`, components/GlassRefraction.tsx — its strength also follows the slider). */--glass-t: 0.7;- --glass-sheen: 0;--glass-refract: url(#nt-refract);--glass-blur: var(--glass-refract) blur(calc(16px + 12px * var(--glass-t)))saturate(calc(200% - 55% * var(--glass-t)));@@ -13546,17 +13545,6 @@ body.focus-mode .dock:hover {windows): same curve, radius × 0.85, same saturation and refraction. */--glass-term-blur: var(--glass-refract) blur(calc((16px + 12px * var(--glass-t)) * 0.85))saturate(calc(200% - 55% * var(--glass-t)));- /* A diagonal light across the surface, strongest at the top-left rim. Painted as a background- layer (under the content), and only left of the Readable tick: it lightens the surface, so it- may only appear where the contrast promise is already off. */- --glass-sheen-image: linear-gradient(- 135deg,- rgba(255, 255, 255, calc(0.22 * var(--glass-sheen))) 0%,- rgba(255, 255, 255, calc(0.04 * var(--glass-sheen))) 22%,- rgba(255, 255, 255, 0) 50%,- rgba(255, 255, 255, calc(0.06 * var(--glass-sheen))) 85%,- rgba(255, 255, 255, calc(0.14 * var(--glass-sheen))) 100%- );}/* Outermost chrome: fill + blur. */@@ -13587,11 +13575,40 @@ body.focus-mode .dock:hover {.nt-settings) {background: var(--glass-chrome-bg) !important;- background-image: var(--glass-sheen-image) !important;-webkit-backdrop-filter: var(--glass-blur);backdrop-filter: var(--glass-blur);}+/* Rim light: a 1px specular edge, brightest at the top-left and faint along the rest, drawn as a+ masked ring on the node's ::before (it anchors to the React Flow wrapper, which is the node's+ box). It replaces a diagonal sheen across the whole surface, which washed out the pane; an edge+ highlight is all the light a pane needs, and it never sits under text. */+:root[data-nt-glass='on'] :is(.term-node, .files-node, .loop-node, .subagent-node, .trigger-node, .dino-node)::before {+ --glass-rim: linear-gradient(+ 135deg,+ rgba(255, 255, 255, 0.55) 0%,+ rgba(255, 255, 255, 0.1) 30%,+ rgba(255, 255, 255, 0.04) 60%,+ rgba(255, 255, 255, 0.28) 100%+ );+ content: '';+ position: absolute;+ inset: 0;+ border-radius: inherit;+ padding: 1px;+ pointer-events: none;+ z-index: 4;+ background: var(--glass-rim);+ -webkit-mask:+ linear-gradient(#000 0 0) content-box,+ linear-gradient(#000 0 0);+ -webkit-mask-composite: xor;+ mask:+ linear-gradient(#000 0 0) content-box,+ linear-gradient(#000 0 0);+ mask-composite: exclude;+}+/* Nested inside a blurred container (or unknown nesting): the fill only. */:root[data-nt-glass='on']:is(.dock-menu, .dock-menu__sub, .usage-refresh, .sessions-icon-cluster button) {@@ -13615,7 +13632,6 @@ body.focus-mode .dock:hover {background: var(--glass-chrome-bg);}:root[data-nt-glass='on'] :is(.term-node, .files-node, .loop-node, .subagent-node, .trigger-node, .dino-node) {- background-image: var(--glass-sheen-image);-webkit-backdrop-filter: var(--glass-blur);backdrop-filter: var(--glass-blur);}@@ -13724,8 +13740,9 @@ body.focus-mode .dock:hover {:root[data-nt-glass='on'] {--glass-blur: none;--glass-term-blur: none;- --glass-sheen: 0;- --glass-sheen-image: none;+ }+ :root[data-nt-glass='on'] :is(.term-node, .files-node, .loop-node, .subagent-node, .trigger-node, .dino-node)::before {+ display: none;}}@@ -13766,6 +13783,9 @@ body.focus-mode .dock:hover {:root[data-nt-glass='on'] .term-node {border-width: 1.5px;}+ :root[data-nt-glass='on'] :is(.term-node, .files-node, .loop-node, .subagent-node, .trigger-node, .dino-node)::before {+ --glass-rim: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.3) 30%, rgba(255, 255, 255, 0.2) 60%, rgba(255, 255, 255, 0.5) 100%);+ }}/* Reduce Motion (every appearance): the state glows stop pulsing and hold lit, the same staticdiff --git a/src/renderer/styles.palette.test.ts b/src/renderer/styles.palette.test.tsindex 97f825db9..214189b99 100644--- a/src/renderer/styles.palette.test.ts+++ b/src/renderer/styles.palette.test.ts@@ -177,11 +177,11 @@ describe('Liquid Glass accessibility fallbacks', () => {return ''}- it('Reduce Transparency drops blur, refraction and sheen on glass', () => {+ it('Reduce Transparency drops blur, refraction and the rim light on glass', () => {const m = media('(prefers-reduced-transparency: reduce)')expect(m).toContain(":root[data-nt-glass='on']")expect(m).toMatch(/--glass-blur:\s*none/)- expect(m).toMatch(/--glass-sheen-image:\s*none/)+ expect(m).toMatch(/:is\(\.term-node[^)]*\)::before \{\s*display: none/)})it('Increase Contrast strengthens edges and takes the HIG increased-contrast palette', () => {@@ -238,3 +238,14 @@ describe('terminal glass blur', () => {expect(reduce.slice(0, reduce.indexOf('}'))).toMatch(/--glass-term-blur:\s*none/)})})++describe('glass rim light', () => {+ it('a masked 1px ring on the glass nodes, never a surface-wide sheen', () => {+ const i = CSS.indexOf(":root[data-nt-glass='on'] :is(.term-node, .files-node, .loop-node, .subagent-node, .trigger-node, .dino-node)::before {\n --glass-rim")+ const r = CSS.slice(i, CSS.indexOf('\n}', i))+ expect(r).toContain('padding: 1px')+ expect(r).toContain('pointer-events: none')+ expect(r).toContain('-webkit-mask-composite: xor')+ expect(CSS).not.toContain('--glass-sheen')+ })+})