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(glass): Keep blur while moving

iceclatterWT37f1773f4a20
diff --git a/CLAUDE.md b/CLAUDE.md
index 79d543617..85313377c 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -3899,8 +3899,10 @@ glass never sits over plain black; a wallpaper the user chose is never replaced.
`--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 still pause while the camera
- moves (`.canvas-moving`); chrome keeps both. MEASURED on the live dev build (CDP computed style):
+ may only exist where the promise is already off. 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, Canvas
+ never 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):
Chromium keeps `url("#nt-refract") blur(…) saturate(…)` on the tab bar, dock, sessions sidebar,
minimap, zoom controls and terminal nodes.
- **Needs-you on glass is an INNER light** (the user's pick, "variant B"): the outer red `::after`
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index b18dde0fd..ba1efb33d 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -1,6 +1,7 @@
import { reportTextDelivery } from '../lib/textDelivery'
import { TEXT_NOT_SUBMITTED } from '@shared/text-delivery'
import { VisibleMiniMap } from './VisibleMiniMap'
+import { keepGlassBlurWhileMoving } from '../lib/glassContrast'
import { LINK_ENDPOINT_NOT_FOUND } from '@shared/canvas-link'
import { createControlOpenBatch } from '../lib/controlOpenBatch'
import { commitOwnedLaunchAttempt, registerLaunchCommit } from '../terminal/launch-attempt'
@@ -1528,10 +1529,18 @@ export function Canvas() {
// toggle rather than state, so a pan does not re-render this component twice. The REMOVAL is
// debounced: a wheel zoom driven through setViewport ends a "move" on every packet, and toggling
// the blur back on between packets would re-rasterise it anyway.
+ // Settings → Appearance → "Keep blur while moving" (default on) skips the pause entirely: the
+ // blur and refraction stay live through the move, Apple's behaviour, at a GPU cost. Read
+ // through a ref so the handlers stay stable.
const movingClearRef = useRef<ReturnType<typeof setTimeout> | null>(null)
+ const keepBlurWhileMovingRef = useRef(true)
+ keepBlurWhileMovingRef.current = keepGlassBlurWhileMoving(
+ useSettings((s) => s.settings.glassBlurWhileMoving)
+ )
const onCanvasMoveStart = useCallback(() => {
if (movingClearRef.current) clearTimeout(movingClearRef.current)
movingClearRef.current = null
+ if (keepBlurWhileMovingRef.current) return
flowWrapRef.current?.classList.add('canvas-moving')
}, [])
const onCanvasMoveEnd = useCallback(() => {
diff --git a/src/renderer/components/settings/sections/AppearanceSection.tsx b/src/renderer/components/settings/sections/AppearanceSection.tsx
index 53c09b3e1..39a0ecc3a 100644
--- a/src/renderer/components/settings/sections/AppearanceSection.tsx
+++ b/src/renderer/components/settings/sections/AppearanceSection.tsx
@@ -1,7 +1,11 @@
import { useEffect, useState } from 'react'
import { useSettings } from '../../../state/settings'
import { isLiquidGlass } from '@renderer/lib/appTheme'
-import { GLASS_READABLE_TICK, resolveGlassSlider } from '@renderer/lib/glassContrast'
+import {
+ GLASS_READABLE_TICK,
+ keepGlassBlurWhileMoving,
+ resolveGlassSlider
+} from '@renderer/lib/glassContrast'
import { useGlassA11y } from '@renderer/lib/useGlassA11y'
import { showCanvasDots } from '@renderer/lib/canvasDots'
import {
@@ -76,6 +80,10 @@ const ROWS = {
title: 'Glass',
keywords: ['glass', 'liquid', 'transparency', 'clear', 'tinted', 'frosted', 'blur', 'opacity']
},
+ glassBlurWhileMoving: {
+ title: 'Keep blur while moving',
+ keywords: ['glass', 'blur', 'pan', 'zoom', 'moving', 'gpu', 'performance', 'refraction']
+ },
canvasDots: {
title: 'Show grid dots',
keywords: ['grid', 'dots', 'dot', 'canvas', 'background', 'pattern']
@@ -347,6 +355,9 @@ export function AppearanceSection({ isActive }: { isActive: boolean }): React.JS
const glassSlider = resolveGlassSlider(useSettings((s) => s.settings.glassTint))
const glassA11y = useGlassA11y()
const glassLocked = glassA11y.reduceTransparency || glassA11y.moreContrast
+ const glassBlurWhileMoving = keepGlassBlurWhileMoving(
+ useSettings((s) => s.settings.glassBlurWhileMoving)
+ )
const windowTitleActiveSession = useSettings((s) => s.settings.windowTitleActiveSession)
const update = useSettings((s) => s.update)
// Glass over plain black reads as a dark theme with smudges, so choosing Liquid Glass with no
@@ -415,6 +426,21 @@ export function AppearanceSection({ isActive }: { isActive: boolean }): React.JS
/>
</SearchableRow>
)}
+ {isLiquidGlass(appTheme) && (
+ <SearchableRow {...ROWS.glassBlurWhileMoving}>
+ <FieldRow
+ label="Keep blur while moving"
+ description="Uses more GPU while panning and zooming."
+ control={
+ <Switch
+ checked={glassBlurWhileMoving}
+ onChange={(v) => update({ glassBlurWhileMoving: v })}
+ ariaLabel="Keep blur while moving"
+ />
+ }
+ />
+ </SearchableRow>
+ )}
<SearchableRow {...ROWS.uiScale}>
<UiScaleRow />
</SearchableRow>
diff --git a/src/renderer/lib/glassContrast.test.ts b/src/renderer/lib/glassContrast.test.ts
index 919cf01e2..cc06feeba 100644
--- a/src/renderer/lib/glassContrast.test.ts
+++ b/src/renderer/lib/glassContrast.test.ts
@@ -23,7 +23,8 @@ import {
resolveGlassSlider,
glassSurfaceAlpha,
snapGlassSlider,
- stepGlassSlider
+ stepGlassSlider,
+ keepGlassBlurWhileMoving
} from './glassContrast'
const WHITE = [255, 255, 255] as const
@@ -226,3 +227,17 @@ describe('Glass slider detent (macOS tick-mark feel)', () => {
expect(stepGlassSlider(0, -1)).toBe(0)
})
})
+
+describe('Keep blur while moving', () => {
+ it('defaults on; only a literal false pauses the blur', () => {
+ for (const v of [true, undefined, null, 'x']) expect(keepGlassBlurWhileMoving(v)).toBe(true)
+ expect(keepGlassBlurWhileMoving(false)).toBe(false)
+ })
+
+ it('the camera-move handler skips the pause class when it is on', () => {
+ const src = readFileSync(join(__dirname, '..', 'canvas', 'Canvas.tsx'), 'utf8')
+ const start = src.slice(src.indexOf('const onCanvasMoveStart'))
+ const body = start.slice(0, start.indexOf("classList.add('canvas-moving')"))
+ expect(body).toContain('if (keepBlurWhileMovingRef.current) return')
+ })
+})
diff --git a/src/renderer/lib/glassContrast.ts b/src/renderer/lib/glassContrast.ts
index 134b6f198..4b62c7ff3 100644
--- a/src/renderer/lib/glassContrast.ts
+++ b/src/renderer/lib/glassContrast.ts
@@ -273,3 +273,8 @@ export function stepGlassSlider(v: number, dir: -1 | 1): number {
const crosses = dir > 0 ? v < GLASS_READABLE_TICK && next > GLASS_READABLE_TICK : v > GLASS_READABLE_TICK && next < GLASS_READABLE_TICK
return crosses ? GLASS_READABLE_TICK : snapGlassSlider(next)
}
+
+/** `settings.glassBlurWhileMoving`: only a literal false pauses the blur during camera moves. */
+export function keepGlassBlurWhileMoving(value: unknown): boolean {
+ return value !== false
+}
diff --git a/src/renderer/lib/settingsReset.ts b/src/renderer/lib/settingsReset.ts
index 330c55494..9fea05a57 100644
--- a/src/renderer/lib/settingsReset.ts
+++ b/src/renderer/lib/settingsReset.ts
@@ -42,6 +42,8 @@ export const APPEARANCE_RESET_KEYS = [
'hiddenHeaderButtons',
'showResumeCard',
'canvasDots',
+ 'glassTint',
+ 'glassBlurWhileMoving',
'windowTitleActiveSession'
] as const satisfies readonly (keyof Settings)[]
diff --git a/src/shared/types.ts b/src/shared/types.ts
index 7db7f56ad..868adba83 100644
--- a/src/shared/types.ts
+++ b/src/shared/types.ts
@@ -1696,6 +1696,10 @@ export interface Settings {
/** The Liquid Glass slider (Settings → Appearance), 0 = Clear … 1 = Tinted. null = the Readable
* tick, where text keeps 4.5:1 (renderer/lib/glassContrast.ts `resolveGlassSlider`). */
glassTint: number | null
+ /** Liquid Glass: keep the node blur and refraction live while the canvas pans or zooms (Apple's
+ * behaviour, more GPU). Off = the blur pauses during a camera move and the tint alone stays.
+ * Default ON; only a literal false turns it off (`keepGlassBlurWhileMoving`). */
+ glassBlurWhileMoving: boolean
/** Whether usage percentages render as consumed ("32% used"), remaining ("68% left"), or raw
* token counts ("48k/200k tokens" — context-window surfaces only; provider quota surfaces
* have no token counts and fall back to 'used' display). 'remaining' is the historical
@@ -1942,6 +1946,7 @@ export const DEFAULT_SETTINGS: Settings = {
showResumeCard: false,
canvasDots: true,
glassTint: null,
+ glassBlurWhileMoving: true,
usagePercentMode: 'remaining',
defaultAgent: 'claude',
// Sessions start in auto mode out of the box. Existing users pick this up on hydrate