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
docs(glyphgrid): the plate's half-side clamp is unreachable through the UI — say so
enes212aa153c90f
diff --git a/docs/superpowers/plans/2026-08-03-phase1b-device-checklist.md b/docs/superpowers/plans/2026-08-03-phase1b-device-checklist.mdindex 58792087e..06358a7e8 100644--- a/docs/superpowers/plans/2026-08-03-phase1b-device-checklist.md+++ b/docs/superpowers/plans/2026-08-03-phase1b-device-checklist.md@@ -245,7 +245,8 @@ Auto after you switched builds, that is why: re-select Shared and carry on.node overlapping another, which leaves the shared canvas for xterm's DOM renderer — L15): thetwo cursors must behave the same, both while typing and while idle. A shared cursor that keepsflashing while you type is the drift the matched 600 ms period exists to prevent.- **The cursor honours Settings → Terminal → Cursor style.** Walk all three: `block` INVERTS the+ **The cursor honours Settings → Terminal → Cursor** (the row's segmented control, beside the+ `blink` switch). Walk all three: `block` INVERTS theglyph under it (the letter goes dark on a bright cell — a block is drawn as a CELL, and that isthe only path that can invert), `bar` is a hairline down the LEFT edge with the glyph stillreadable beside it, `underline` is one along the bottom. Change the setting while the terminal@@ -261,7 +262,7 @@ Auto after you switched builds, that is why: re-select Shared and carry on.glyph inside it readable, which is exactly what xterm's DOM renderer draws for an unfocusedterminal — and a selection made before the blur is **dimmer** than it was, in the same hue.Compare a focused and a blurred terminal side by side; the two selections must be- distinguishable at a glance. Then set Settings → Terminal → **Inactive cursor style** to+ distinguishable at a glance. Then set Settings → Terminal → **When unfocused** to`none` (no cursor at all on blur), to `block` (a solid one, glyph inverted, on the blurredterminal) and back to `outline`. **The outline is the DEFAULT** — every terminal on the canvasexcept the focused one is drawing it, so judge it at normal zoom on a busy canvas, not only on@@ -280,10 +281,11 @@ Auto after you switched builds, that is why: re-select Shared and carry on.corners stay square**, which is correct — they sit against the opaque header/labels row andare not corners on screen, so rounding them would carve a notch of canvas out of the body.Then **zoom out to ~0.3 and in to ~3**: the corner keeps its proportion at every zoom, and it- never inverts into a corner-shaped hole. Finally **drag a node's bottom edge up until the- body collapses to a few pixels tall** — the radius clamps at half the shorter side, so the- plate goes stadium-shaped and then to a sliver; what must not appear at any point is a- flash of missing background. Report any band you still see —+ never inverts into a corner-shaped hole. The half-side radius clamp (`plateRadiusDevice`) is+ **defensive and NOT reachable through the UI — do not try to produce it**: a node's body+ bottoms out around ~120 world px (`NodeResizer minHeight={160}`) while the clamp engages below+ ~18, and zoom cannot get there because the radius and the shape are measured at the same+ scale. Report any band you still see —a band now means the plate rect is not tracking the body, not that it is undersized bydesign. **Judge bands only AFTER a resize gesture settles.** The plate is re-pushed on theResizeObserver's coalesced tick (80 ms after the last resize event — the same settle the@@ -446,7 +448,11 @@ Auto after you switched builds, that is why: re-select Shared and carry on.canvas at the moment of the move is expected, and a brief flash of DOM-rendered text is fine.A terminal left blank, transparent-but-empty, or stuck on the DOM renderer is not.**Report specifically:** any `[glyphgrid] atlas cell … does not match …` line in the console- after a move. The re-registration is expected to read the NEW display's cell (the epoch bump+ after a move. If a move produces NOTHING AT ALL — no repaint, text simply left soft or+ over-sharp — the trigger did not fire rather than the rebuild failing: two are wired, the+ window `resize` event and a `screen and (resolution: Xdppx)` media query (the one xterm+ itself relies on), so say which display pair and which direction. The re-registration is+ expected to read the NEW display's cell (the epoch bumptears the grid down first, which restores a DomRenderer that recomputes its dimensions againstthe live dpr), so that line means the rebuild adopted the OLD one and the sharpness is onlyhalf fixed. Also report whether the SECOND move rebuilds again or the fix latches after the@@ -526,7 +532,11 @@ Auto after you switched builds, that is why: re-select Shared and carry on.one naming the loss and one naming the restore; the Settings row still reads Shared and themode is NOT failed. Note anything that comes back WRONG rather than blank (soft or garbledglyphs would mean the atlas page did not survive the GPU event, which the restore assumes it- does — the fix is a forced repack, and `GlyphAtlas` already has the machinery for it).+ does — the fix is a forced repack, and `GlyphAtlas` already has the machinery for it). If the+ terminals do NOT come back on the shared renderer — blank bodies, or a permanent fallback to+ DOM after a loss the browser DID restore — that is a **BLOCKING** finding, for the same reason+ 5.2b's hang is: a canvas that never returns from a restore is as unusable as one that never+ stops waiting.**Keep `x` — 5.2 needs the same object.**- [ ] **5.2 A second loss inside a minute falls back permanently, as designed.** Within 60 s of 5.1(`RESTORE_COOLDOWN_MS` — the cooldown is armed by 5.1's SUCCESSFUL restore, so 5.1 must have@@ -699,6 +709,13 @@ Auto after you switched builds, that is why: re-select Shared and carry on.bounding boxes, slots sized to the INK rather than to the cell, quads sized to the glyph. Thattouches the atlas allocator, the slot-rect derivation and the shader's uv maths at once, and itchanges what the LOD/gutter argument defends. Phase 2.+- **L17 — A TOP-layer decoration renders as NOTHING.** xterm resolves decorations twice per cell,+ `bottom` before the selection and `top` after it; this engine resolves a cell once, with the+ selection last, so only `bottom` is expressible. Nothing in `src/` registers a decoration at all+ today, and `@xterm/addon-search` — the reason the module exists — registers its matches with no+ layer, which is `bottom` by xterm's own default, so it costs nothing to observe. **Trigger:** a+ top-layer decoration ever being shipped; `decorations.ts` (`decorationAt`) is where the second+ override stage goes.---diff --git a/docs/superpowers/plans/2026-08-05-glyphgrid-phase2-promotion.md b/docs/superpowers/plans/2026-08-05-glyphgrid-phase2-promotion.mdindex 8e0ab13aa..35341d0e7 100644--- a/docs/superpowers/plans/2026-08-05-glyphgrid-phase2-promotion.md+++ b/docs/superpowers/plans/2026-08-05-glyphgrid-phase2-promotion.md@@ -563,6 +563,7 @@ it('an explicit choice still wins over the platform', () => {Named so nobody rediscovers them, and so nobody builds them speculatively:- **L16 — font ink wider than the cell is clipped.** Line art is covered by the geometric table; a face whose ordinary glyphs overflow would need per-glyph bounding boxes, ink-sized slots and glyph-sized quads (what xterm's atlas does). **Trigger:** a device report of a clipped glyph that is NOT box-drawing.+- **L17 — a TOP-layer decoration renders as nothing** (the deviation stated in full at `decorations.ts`). T1 closes L12 for `bottom`, which is what the search addon registers and the only layer anything in `src/` could produce; expressing "after the selection" needs a second override stage. **Trigger:** a top-layer decoration ever being registered — `decorationAt` is where the stage goes.- **L8 — the kanban card modal stays on the DOM renderer.** Not a promotion regression: on macOS the modal renders exactly as it does today, because today's default IS the DOM renderer. **Trigger:** the board becoming a primary surface for terminal work, or a report of the modal looking worse than the canvas.- **True LRU atlas eviction.** Reset-on-full is the v1 model. **Trigger:** device reports of frequent `[glyphgrid] atlas page reset #N`.- **Dirty-rect atlas upload + manual mips.** **Trigger:** `generateMipmap` showing up in a profile.@@ -574,7 +575,7 @@ Named so nobody rediscovers them, and so nobody builds them speculatively:## Self-Review-1. **Coverage of the promotion gate.** The regressions that a default flip would ship: search highlights (T1), cursor style/wide/blur (T2), blink (T3), square corners (T4), context loss (T5), dpr (T6). The waste item is T7. The evidence gate is T8, the flip is T9. Every `L`-entry in the checklist is either closed by a task or listed in Deferred with a trigger — L1 T3, L2 T2, L3 see below, L4 T4, L8 deferred, L9 T5, L10 T6, L11 T7, L12 T1, L13 T2, L14 narrowed by T6, L15 by design, L16 deferred.+1. **Coverage of the promotion gate.** The regressions that a default flip would ship: search highlights (T1), cursor style/wide/blur (T2), blink (T3), square corners (T4), context loss (T5), dpr (T6). The waste item is T7. The evidence gate is T8, the flip is T9. Every `L`-entry in the checklist is either closed by a task or listed in Deferred with a trigger — L1 T3, L2 T2, L3 see below, L4 T4, L8 deferred, L9 T5, L10 T6, L11 T7, L12 T1, L13 T2, L14 narrowed by T6, L15 by design, L16 deferred, L17 deferred (T1's top-layer remainder, added to the checklist in the final fix round).2. **Gap found and closed while reviewing:** L3 (selection does not dim on blur) had no task. It is one line once T2 has the focus flag in the feed — the theme carries no *inactive* selection colour, so the honest fix is to blend the selection background toward the plate by a fixed factor when unfocused. **Added to Task 2, Step 6** rather than given its own task: same file, same flag, same reviewer.3. **Type consistency.** `CursorShape` is produced in `cursor.ts` (T2) and consumed by `GridDrawParams.cursor` (T2) and the blink clock (T3). `DecorationReader` is produced in `decorations.ts` (T1) and consumed by `RowFeedOpts.decorations` (T1). `suspendGpu`/`reviveGpu` are produced in T5 and consumed only there. `plateRadiusDevice` is produced in `plate.ts` (T4) and consumed by `gl-webgl2.ts` (T4). No name is used before the task that defines it.4. **The park is honoured.** T1 and T2 wake through damage; T3 introduces `pulse()` precisely so it does not hold the loop; T7 stops the loop outright. No task adds a timer that draws unconditionally.diff --git a/src/renderer/glyphgrid/plate.ts b/src/renderer/glyphgrid/plate.tsindex 6465a22ad..bf9521d85 100644--- a/src/renderer/glyphgrid/plate.ts+++ b/src/renderer/glyphgrid/plate.ts@@ -94,9 +94,15 @@ export function plateRectDevice(* multiplication at the call site. The rounded-rect SDF works by shrinking the rect by the radius* on every side and measuring distance to that inner box; a radius past half the shorter side* makes the inner box's half-extent NEGATIVE, and the field it produces is no longer the- * rectangle's — it paints a corner-shaped hole rather than a corner. A node being dragged shut- * passes through every height between its body and zero, so this is a state the renderer reaches- * in ordinary use, not a pathological input.+ * rectangle's — it paints a corner-shaped hole rather than a corner.+ *+ * THE CLAMP IS DEFENSIVE, AND IS NOT REACHABLE THROUGH THE UI — do not go hunting for the case.+ * A node's body bottoms out around ~120 world px (`NodeResizer minHeight={160}` in `TerminalNode`,+ * and `terminalNodeSize()`'s own floor), while the clamp only engages below roughly twice the+ * radius, ~18 world px. Zoom cannot reach it either: the caller passes `zoom * dpr` as the scale+ * AND measures the shape at that same scale, so the radius-to-side ratio is zoom-invariant by+ * construction. It is kept because the guarantee is a stylesheet value and two layout constants+ * away from being false, and the failure it prevents is the terminal's background disappearing.** Degenerate inputs answer 0 — a square plate, i.e. exactly the pre-Phase-2 rectangle — rather* than NaN or Infinity. The result is a uniform the SDF SUBTRACTS, so a NaN would not merely