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.

fix(glass): flatten the backdrop's brightness under terminal nodes

iceclatterWT346ad65e2fcf
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index 717e129b5..917518983 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -13565,9 +13565,15 @@ body.focus-mode .dock:hover {
--glass-blur: blur(calc(16px + 12px * var(--glass-t))) saturate(calc(200% - 55% * var(--glass-t)))
var(--glass-refract);
/* Terminal nodes frost 15% less than the chrome (the user asked for less blur under the terminal
- windows): same curve, radius × 0.85, same saturation and refraction. */
+ windows): same curve, radius × 0.85, same saturation and refraction. They also FLATTEN the
+ backdrop's luminance (HIG: regular glass "blurs and adjusts the luminosity"): a blurred photo
+ under a big pane otherwise reads as smudges on the glass. contrast() only pulls the backdrop
+ toward mid-grey, so it stays a backdrop colour and cannot touch the 4.5:1 guarantee. Clear
+ keeps the photo (1), Readable 0.3, Tinted 0 (flat — the tint is 0.95 there anyway). Measured
+ at Readable, empty glass over the lake photo's snow/water edge: brightness swing 2.2:1 → 1.28:1
+ (0.51 still left 1.53:1). */
--glass-term-blur: blur(calc((16px + 12px * var(--glass-t)) * 0.85))
- saturate(calc(200% - 55% * var(--glass-t))) var(--glass-refract);
+ saturate(calc(200% - 55% * var(--glass-t))) contrast(calc(1 - var(--glass-t))) var(--glass-refract);
}
/* Outermost chrome: fill + blur. */
diff --git a/src/renderer/styles.palette.test.ts b/src/renderer/styles.palette.test.ts
index 4fad500cb..cbbd113f2 100644
--- a/src/renderer/styles.palette.test.ts
+++ b/src/renderer/styles.palette.test.ts
@@ -260,6 +260,10 @@ describe('terminal glass blur', () => {
expect(chain.indexOf('blur(')).toBe(0)
expect(chain.trim().endsWith('var(--glass-refract)')).toBe(true)
})
+
+ it('terminal glass flattens the backdrop luminance toward Tinted, and not at Clear', () => {
+ expect(blocks(":root[data-nt-glass='on']").get('--glass-term-blur')).toContain('contrast(calc(1 - var(--glass-t)))')
+ })
})
describe('glass rim light', () => {