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
chore(glass): probe restores inside try, guard catches negative delays, doc fix
iceclatterWTea537982b7d7
diff --git a/CLAUDE.md b/CLAUDE.mdindex 03e1bf05f..a54c93cb7 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -4005,7 +4005,7 @@ glass never sits over plain black; a wallpaper the user chose is never replaced.secondary text (macOS: tertiary), so on dark glass the modal dialogs raise `--muted` to 0.82 (4.9:1worst case) and Remote access's hard-coded 0.55 lines take it (visual QA round 5, N5-M2); lightcannot, and keeps the typed-text rule. The RAM panel's hard-coded 0.45–0.6 secondary lines take- `--muted` (N5-L2). Destructive menu items (`.ctx-item.danger`, `.tab-menu button.danger`) draw an+ `--muted` (N5-L2). Destructive menu items (`.ctx-item.danger`) draw anink label and keep red only on the icon; their hover is the ordinary lift (N5-M1: the red label was2.7–2.8:1 on dark glass). OK-range usage/context meters areneutral ink under glass (M1: green already means unread/success) — the fills are inline literalsdiff --git a/scripts/glass-trap-probe.mjs b/scripts/glass-trap-probe.mjsindex 1b47f7331..187f80bd5 100644--- a/scripts/glass-trap-probe.mjs+++ b/scripts/glass-trap-probe.mjs@@ -37,7 +37,10 @@* Open the overlay under test first; the probe checks what is on screen. Exits 1 on any trap, 2* when it could not check anything (no page, no answer within 20 s, Liquid Glass off, nothing* scanned) or failed its own restoration check — never a silent 0. It only reads computed styles- * and replays animations the page already declares; it never clicks, types or changes app state.+ * and replays animations the page already declares; it never clicks or types. That replay is not+ * fully inert, though: restarting an animation fires animationcancel/animationend on the page, and+ * the app can react to those the same as it would to a real one (e.g. the drawer refits maximized+ * nodes and marks the workspace dirty when one fires).*/import { realpathSync } from 'node:fs'@@ -130,24 +133,6 @@ export function glassTrapProbe(SCRIMS, midAnim) {void getComputedStyle(el).animationNameel.style.animationName = prev}- if (midAnim) {- for (const el of document.body.querySelectorAll('*')) {- const cs = getComputedStyle(el)- if (none(cs.animationName) || /infinite/.test(cs.animationIterationCount) || /paused/.test(cs.animationPlayState) || cs.display === 'none') continue- const prev = el.style.animationName- restart(el, prev)- replayed.push({ el, prev, hadStyle: stylesBefore.has(el) })- }- void document.body.offsetWidth- for (const a of document.getAnimations()) {- const t = a.effect?.getTiming?.()- if (!t || t.iterations === Infinity || a.playState !== 'running') continue- const d = typeof t.duration === 'number' ? t.duration : a.effect.getComputedTiming().duration- frozen.push({ a, time: a.currentTime })- a.currentTime = (t.delay || 0) + (d || 0) / 2- }- }-const vw = innerWidthconst vh = innerHeightconst traps = []@@ -213,6 +198,23 @@ export function glassTrapProbe(SCRIMS, midAnim) {})}try {+ if (midAnim) {+ for (const el of document.body.querySelectorAll('*')) {+ const cs = getComputedStyle(el)+ if (none(cs.animationName) || /infinite/.test(cs.animationIterationCount) || /paused/.test(cs.animationPlayState) || cs.display === 'none') continue+ const prev = el.style.animationName+ restart(el, prev)+ replayed.push({ el, prev, hadStyle: stylesBefore.has(el), before: stylesBefore.get(el) })+ }+ void document.body.offsetWidth+ for (const a of document.getAnimations()) {+ const t = a.effect?.getTiming?.()+ if (!t || t.iterations === Infinity || a.playState !== 'running') continue+ const d = typeof t.duration === 'number' ? t.duration : a.effect.getComputedTiming().duration+ frozen.push({ a, time: a.currentTime })+ a.currentTime = (t.delay || 0) + (d || 0) / 2+ }+ }for (const el of document.body.querySelectorAll('*')) {check(el, null)check(el, '::before')@@ -222,9 +224,13 @@ export function glassTrapProbe(SCRIMS, midAnim) {// Restarted elements: a fresh animation replaces the seeked one (it plays its entrance once// more, as when the overlay opened). Everything else: seek back to where it was.for (const { a, time } of frozen) if (!wasRestarted(a)) a.currentTime = time- for (const { el, prev, hadStyle } of replayed) {+ // An element that already had a style attribute is restored to that EXACT attribute (not by+ // poking el.style.animationName again, which only ever touched that one property and can drift+ // from what was actually there); one that had none simply loses the attribute the probe put on.+ for (const { el, prev, hadStyle, before } of replayed) {restart(el, prev)- if (!hadStyle) el.removeAttribute('style')+ if (hadStyle) el.setAttribute('style', before)+ else el.removeAttribute('style')}}// Self-check: nothing left behind.diff --git a/src/renderer/styles.glass-traps.test.ts b/src/renderer/styles.glass-traps.test.tsindex 46fd6f806..5e92ac0b3 100644--- a/src/renderer/styles.glass-traps.test.ts+++ b/src/renderer/styles.glass-traps.test.ts@@ -205,7 +205,7 @@ function glassFillsWithoutBlur(css: string): string[] {}/** A `transition` shorthand item with no property name transitions `all`. */-const TIMING = /^(?:[\d.]+m?s|ease(?:-in|-out|-in-out)?|linear|step-start|step-end|allow-discrete|normal|(?:steps|cubic-bezier|linear)\(.*\))$/+const TIMING = /^(?:-?[\d.]+m?s|ease(?:-in|-out|-in-out)?|linear|step-start|step-end|allow-discrete|normal|(?:steps|cubic-bezier|linear)\(.*\))$/const transitionProps = (prop: string, v: string): string[] =>prop === 'transition-property'? splitTop(v)@@ -406,4 +406,12 @@ describe('Liquid Glass: glass never fades (visual QA round 4, N4-H1)', () => {${g} .chip { background: var(--glass-chrome-bg); backdrop-filter: blur(20px); transition: background-color 0.1s ease-out, transform 0.1s; }`expect(glassOpacityMotion(css, [])).toEqual(['.sheet (animation)', '.pane (transition)', '.menu::before (transition)'])})++ it('a negative delay is still a timing value, not a property name (bare-timing transition)', () => {+ const g = ":root[data-nt-glass='on']"+ const css = `+ ${g} .pane { background: var(--glass-chrome-bg); backdrop-filter: blur(20px); }+ .pane { transition: 0.2s -0.05s; }`+ expect(glassOpacityMotion(css, [])).toEqual(['.pane (transition)'])+ })})