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
/* Notch HUD (docs/notch-hud.md) — transparent overlay; only the indicator + panel paint. */
:root {
/* agent-notch's panel is monospaced throughout (NSFont.monospacedSystemFont). Match it. */
--hud-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, 'Cascadia Mono', 'Roboto Mono',
monospace;
/* --- DynamicNotch capsule geometry — TUNE ON A MAC ---------------------------------------
A single black rounded-bottom surface that EXTENDS the physical notch (fused, seamless): its
top edge sits at y=0 sharing the notch's black, its bottom corners are rounded, and the
walking mascots live inside the few px that hang BELOW the menu-bar line. Clicking it grows the
SAME surface downward into the session panel. `--bar`, `--notch-width` and `--notch-center-x`
are pushed from main (notch-hud.ts geometry); the rest are visual tunables. */
--bar: 32px; /* menu-bar / notch strip height (from main) — the fused top zone */
--notch-width: 168px; /* physical notch width (from main) = the capsule's collapsed width */
--notch-center-x: 50%; /* notch horizontal center in px (from main) — the capsule anchor */
/* Unused while collapsed (the capsule never exceeds --bar); kept for the expand math only. */
--capsule-drop: 0px;
--capsule-radius: 16px; /* bottom-corner radius of the fused capsule */
--panel-width: 400px; /* expanded panel width (HUD_PANEL_WIDTH, pushed from main) */
--panel-max-h: 420px; /* expanded panel max content height (rows scroll past it) */
--capsule-bg: #000; /* opaque black — fuses with the physical notch (no seam) */
--capsule-ease: cubic-bezier(0.22, 1, 0.36, 1); /* spring-ish grow */
--capsule-dur: 0.22s;
/* How much the COLLAPSED capsule grows under the pointer, on each side and downward. */
--capsule-hover-grow: 4px;
/* Placement (from main's hudPlacement — see .hud-capsule below); the defaults only cover the
instant before the first push. */
--capsule-x: 50%;
--capsule-top: 0px;
--panel-left: 50%;
/* Floating pill (no notch, a side alignment, or lowered off the notch). The pill's top gap is
PILL_TOP_GAP in notch-hud-geometry.ts and arrives inside --capsule-top. */
--pill-radius: 18px; /* all-corner radius of the floating pill */
--pill-height: 30px; /* collapsed floating-pill height */
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background: transparent;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
-webkit-user-select: none;
user-select: none;
cursor: default;
}
#hud {
position: relative;
width: 100%;
height: 100%;
}
/* The DynamicNotch capsule: one black surface at y=0 that shares the notch's black. COLLAPSED it
sits to the LEFT of the notch, exactly `--bar` tall and only as wide as its mascots — the notch
appears WIDER, never taller (owner's call: no extra height). Its right edge butts against the
notch (square), only the bottom-left corner rounds. EXPANDED the same surface re-centres under
the notch and grows DOWNWARD into the session panel. `max-height` (not `height`) drives the
vertical grow so the reveal animates with content of unknown height.
WHERE it sits is not decided here. Main's pure `hudPlacement` (notch-hud-geometry.ts) pushes
`--capsule-x` (the anchor edge's x), an `anchor-left|center|right` root class (which capsule
edge sits at that x), `--capsule-top`, and `--panel-left` / `--panel-width` for the expanded
box — from the user's side + vertical-offset settings and the display's live bounds. The
renderer only applies them: the capsule element IS the click-through hotspot, so drawing it
from these numbers is what keeps the interactive region wherever the capsule went. */
.hud-capsule {
position: absolute;
top: var(--capsule-top, 0px);
/* Fused: x = notch centre + notch-width/2 with anchor-right, i.e. the right edge pinned to the
notch's right edge — widened SIDEWAYS, never taller (owner: "notch'a ekstra height vermek
istemiyorum") and LEFT-ONLY, so the capsule can never creep over the menu-bar status items
(or swallow their clicks) however many mascots are running. main.ts pads the right by exactly
the notch width; the mascots occupy the strip LEFT of it (issue #78). */
left: var(--capsule-x, 50%);
transform: translateX(-100%);
/* Shrink-to-fit so however many mascots are running, none clip. */
width: auto;
height: auto;
max-height: var(--bar);
overflow: hidden;
background: var(--capsule-bg);
/* Both bottom corners round — the notch simply reads as a wider notch. */
border-radius: 0 0 var(--capsule-radius) var(--capsule-radius);
box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55);
display: flex;
flex-direction: column;
align-items: center;
will-change: width, max-height;
transition:
max-height var(--capsule-dur) var(--capsule-ease),
border-radius var(--capsule-dur) var(--capsule-ease),
left var(--capsule-dur) var(--capsule-ease),
transform var(--capsule-dur) var(--capsule-ease);
}
/* Which edge of the collapsed capsule sits at --capsule-x. Fused pushes anchor-right (the default
transform above); a pill pushes the side the user chose. */
.anchor-left .hud-capsule {
transform: none;
}
.anchor-center .hud-capsule {
transform: translateX(-50%);
}
.anchor-right .hud-capsule {
transform: translateX(-100%);
}
.hud-capsule--hidden {
display: none; /* idle: no empty black pill */
}
/* EXPANDED: grow DOWNWARD into the panel, at the left edge main already clamped ON SCREEN for the
chosen side (centred under the notch for `center`; flush with the margin at an edge — a panel
anchored hard right must not run off the display, the #791 class of bug). The height only
appears on click — collapsed, the strip is never taller than the real notch. */
.hud-capsule.expanded,
.anchor-left .hud-capsule.expanded,
.anchor-center .hud-capsule.expanded,
.anchor-right .hud-capsule.expanded {
left: var(--panel-left, 50%);
transform: none;
width: var(--panel-width);
max-height: calc(var(--bar) + var(--panel-max-h) + 20px);
border-radius: 0 0 var(--capsule-radius) var(--capsule-radius);
}
/* PILL (`fused: false` from main): a standalone floating capsule — all-corner radius so it reads
as its own Dynamic-Island-like element, not a black bar at y=0. This class used to be
`notchless`, and the rename is the point: the shape is no longer only about the display. A
notched Mac draws a pill too when the capsule is on the LEFT/RIGHT, or lowered off the notch by
the vertical-offset setting (a detached surface with square top corners is the "black box below
the menu bar" field bug). A notchless display is a pill at every side.
LOAD-BEARING: by default the pill hangs BELOW `--bar`, never inside it (main computes
`--capsule-top` = bar + PILL_TOP_GAP + offset, clamped ≥ 0). The window's top edge is the
display's, so the top `--bar` px are the menu-bar / notch strip; a pill placed there is centred
on exactly the coordinates a notch occupies. That made every notch MISdetection invisible rather
than merely wrong — issue #508, where scaled resolutions pushed the detector below its threshold
and the pill landed behind the notch. Clearing the strip means the fallback layout is safe even
when the detector is not, and on a genuine notchless display the pill no longer paints over the
menu bar it used to overlap. The user CAN raise it into the strip with a negative offset — that
is their explicit choice, and it stops at the display's top edge. */
.pill .hud-capsule {
max-height: var(--pill-height);
border-radius: var(--pill-radius);
}
.pill .hud-capsule.expanded {
max-height: calc(var(--panel-max-h) + 16px);
border-radius: var(--pill-radius);
}
/* --- Collapsed indicator: the mascots, LEFT and vertically CENTRED in the notch strip ---
The capsule is exactly bar-tall, so the mascots sit centred on the bar's midline, left-packed,
inside black that extends the notch — the notch reads as wider, never taller.
Hidden when expanded (the rows carry their own icons). */
.hud-indicator {
display: flex;
/* Vertically CENTRED in the notch strip, horizontally left-packed (owner's placement). */
align-items: center;
justify-content: flex-start;
gap: 8px;
width: auto;
height: var(--bar);
padding: 0 8px 0 10px;
}
.hud-capsule.expanded .hud-indicator {
display: none;
}
.pill .hud-indicator {
height: var(--pill-height);
padding-top: 0; /* no notch to clear — center in the pill */
}
/* HOVER GROW (collapsed only): the capsule swells a few px sideways and down under the pointer, a
Dynamic-Island-style "I heard you" before the dwell opens the panel (main.ts toggles `.hovering`).
The indicator carries the size, so the capsule's max-height has to make room for it too. The
fused capsule is anchored by its RIGHT edge against the notch, so its sideways grow goes left and
never creeps over the menu-bar items on the right. */
.hud-indicator {
transition:
height var(--capsule-dur) var(--capsule-ease),
padding var(--capsule-dur) var(--capsule-ease);
}
.hud-capsule.hovering:not(.expanded) {
max-height: calc(var(--bar) + var(--capsule-hover-grow));
}
.hud-capsule.hovering:not(.expanded) .hud-indicator {
height: calc(var(--bar) + var(--capsule-hover-grow));
padding-left: calc(10px + var(--capsule-hover-grow));
padding-right: calc(8px + var(--capsule-hover-grow));
}
.pill .hud-capsule.hovering:not(.expanded) {
max-height: calc(var(--pill-height) + var(--capsule-hover-grow));
}
.pill .hud-capsule.hovering:not(.expanded) .hud-indicator {
height: calc(var(--pill-height) + var(--capsule-hover-grow));
}
@media (prefers-reduced-motion: reduce) {
.hud-indicator {
transition: none;
}
}
/* --- Walking mascots (copied from styles.css .term-node__mascot*) --- */
.mascot {
display: inline-block;
flex-shrink: 0;
background-repeat: no-repeat;
image-rendering: pixelated;
will-change: background-position, transform;
}
.mascot--claude {
width: var(--mascot-w);
height: var(--mascot-h);
background-size: calc(var(--mascot-w) * 2) var(--mascot-h);
animation: mascot-walk-claude 0.8s steps(1) infinite;
}
/* Grok, gemini and opencode are their brand mark breathing, not a sprite — same treatment as the
canvas badge. The bloom is a drop-shadow of `currentColor`, so it needs no ink of its own; on this
strip that resolves against --capsule-bg (#000), which is why it reads as a glow here. */
.mascot--pulse {
animation: mascot-pulse-brand 1.6s ease-in-out infinite;
}
/* An asset-based mark (gemini/opencode) is painted as a background image, since those four brand
SVGs are multi-colour documents and cannot be inlined the way grok's monochrome path is.
`image-rendering: auto` undoes .mascot's `pixelated`, which is there for the pixel-art critters
and would harden a vector mark's curves at 13px. */
.mascot--pulse-asset {
background-size: contain;
background-position: center;
image-rendering: auto;
}
@keyframes mascot-pulse-brand {
0%,
100% {
opacity: 0.55;
filter: none;
}
50% {
opacity: 1;
filter: drop-shadow(0 0 1px currentColor) drop-shadow(0 0 4px currentColor);
}
}
@media (prefers-reduced-motion: reduce) {
.mascot--pulse {
animation: none;
opacity: 1;
filter: drop-shadow(0 0 1px currentColor);
}
}
@keyframes mascot-walk-claude {
0% {
background-position-x: 0;
transform: translateY(0);
}
50% {
background-position-x: calc(var(--mascot-w) * -1);
transform: translateY(-1.5px);
}
100% {
background-position-x: calc(var(--mascot-w) * -2);
transform: translateY(0);
}
}
.mascot--codex {
width: var(--cmascot-w);
height: var(--cmascot-h);
background-position: 0 0;
background-size: var(--cmascot-sheet-w) var(--cmascot-sheet-h);
animation: mascot-walk-codex 0.72s steps(6) infinite;
}
@keyframes mascot-walk-codex {
to {
background-position-x: calc(var(--cmascot-w) * -6);
}
}
/* A generic (gemini/custom) working slot: a pulsing coral dot. */
.mascot--dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: rgb(217, 120, 87);
animation: hud-pulse 1.1s ease-in-out infinite;
}
@keyframes hud-pulse {
0%,
100% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.45;
transform: scale(0.82);
}
}
/* Green "done, unseen" blob — a 7×7 crisp green pixel circle (agent-notch look), built as a sprite
in lib/mascot.ts and shown as a pixelated background; CSS drives the shimmer. */
.done-blob {
/* Scaled with the mascots (they shrank ~0.72×) so the slot reads evenly. */
width: 9px;
height: 9px;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
image-rendering: pixelated;
flex-shrink: 0;
animation: hud-shimmer 1.4s ease-in-out infinite;
}
/* Fallback when the pixel sprite couldn't be built (no DOM canvas): a plain round green blob. */
.done-blob--fallback {
border-radius: 50%;
background: #30d158;
box-shadow: 0 0 6px 1px rgba(48, 209, 88, 0.7);
}
@keyframes hud-shimmer {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
/* --- Expanded panel: the session rows, INSIDE the same black capsule ---
No own background / border / radius — it IS the capsule's black surface. Rows start below the
fused top zone (padding-top clears the notch/menu-bar line). Fades in as the capsule grows. */
.hud-panel {
width: 100%;
max-height: var(--panel-max-h);
overflow-y: auto;
padding: 4px 10px 10px;
padding-top: calc(var(--bar) + 4px);
font-family: var(--hud-mono);
color: #f2f2f7;
display: none;
opacity: 0;
transition: opacity 0.16s ease 0.06s;
}
.pill .hud-panel {
padding-top: 8px; /* no notch to clear */
}
.hud-capsule.expanded .hud-panel {
display: block;
opacity: 1;
}
.hud-row {
display: grid;
grid-template-columns: 22px 1fr auto;
grid-template-rows: auto auto;
column-gap: 8px;
align-items: center;
padding: 7px 8px;
border-radius: 9px;
cursor: pointer;
position: relative;
transition: padding-right 0.12s ease;
}
.hud-row:hover {
background: rgba(255, 255, 255, 0.06);
/* Make room for the dismiss × instead of letting it sit on top of the tag. */
padding-right: 26px;
}
/* Dismiss (×): hover-only, so an idle HUD stays clean. Right-click on the row does the same. */
.hud-row__close {
position: absolute;
top: 6px;
right: 5px;
width: 17px;
height: 17px;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
line-height: 1;
color: rgba(255, 255, 255, 0.55);
background: rgba(255, 255, 255, 0.08);
border: none;
border-radius: 50%;
cursor: pointer;
opacity: 0;
transition: opacity 0.12s ease;
}
.hud-row:hover .hud-row__close {
opacity: 1;
}
.hud-row__close:hover {
color: #fff;
background: rgba(255, 69, 58, 0.75);
}
.hud-row__icon {
grid-row: 1 / span 2;
display: flex;
align-items: center;
justify-content: center;
width: 22px;
}
/* Title cell = name + optional Unread badge. The cell is the flex line; the NAME carries the
ellipsis (a grid item defaults to min-width:auto, so min-width:0 is what lets it shrink instead
of pushing the tag column off the row). */
.hud-row__title {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
overflow: hidden;
}
.hud-row__name {
font-family: var(--hud-mono);
font-size: 12px;
font-weight: 600;
letter-spacing: -0.2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* "Unread" — a finished turn you have not looked at. Green, the same ink as the done check and the
collapsed capsule's blob, so the three read as one signal. Never shrinks: the badge is the point
of the row, the title is what gives way. */
.hud-row__badge {
flex-shrink: 0;
font-family: var(--hud-mono);
font-size: 9px;
font-weight: 700;
letter-spacing: 0.3px;
text-transform: uppercase;
color: #30d158;
background: rgba(48, 209, 88, 0.16);
border-radius: 5px;
padding: 1px 5px;
}
.hud-row__tag {
grid-column: 3;
grid-row: 1;
font-family: var(--hud-mono);
font-size: 10px;
font-variant-numeric: tabular-nums;
white-space: nowrap;
opacity: 0.9;
}
.hud-row__tag--working {
color: #0a84ff;
}
.hud-row__tag--needsYou {
color: #ff453a;
}
.hud-row__tag--done {
color: #30d158;
}
.hud-row__tag--idle {
color: #8e8e93;
}
.hud-row__sub {
/* Column 2 ONLY: spanning into column 3 ran the `You: …` line UNDER the Go button. */
grid-column: 2;
grid-row: 2;
min-width: 0;
font-family: var(--hud-mono);
font-size: 11px;
color: #98989d;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.hud-row__sub b {
color: #c7c7cc;
font-weight: 600;
}
/* "+N more · 2 unread" — what the 6-row cap left out, since the list is now ranked and a cut row
is a real omission. Click toggles the full list (the panel already scrolls past --panel-max-h). */
.hud-panel__more {
font-family: var(--hud-mono);
font-size: 10px;
color: #8e8e93;
padding: 7px 8px 2px;
cursor: pointer;
}
.hud-panel__more:hover {
color: #f2f2f7;
}
/* Dithered pixel separator between rows (agent-notch's DitherSeparator: a sparse row of gray
pixels). Two offset dashed gradients read as scattered 2px cells rather than a solid rule. */
.hud-sep {
height: 3px;
margin: 3px 4px;
opacity: 0.6;
background-image:
repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 2px, transparent 2px 6px),
repeating-linear-gradient(90deg, transparent 0 4px, rgba(255, 255, 255, 0.08) 4px 6px);
background-position:
0 0,
3px 0;
}
/* Subagent disclosure */
.hud-subs {
grid-column: 2 / span 2;
grid-row: 3;
margin-top: 4px;
}
.hud-subs__toggle {
font-family: var(--hud-mono);
font-size: 10px;
font-weight: 600;
color: #0a84ff;
padding-left: 20px;
cursor: pointer;
}
.hud-subs__list {
margin: 3px 0 0;
padding: 0;
list-style: none;
}
.hud-subs__list li {
display: flex;
align-items: center;
gap: 6px;
font-family: var(--hud-mono);
font-size: 10.5px;
color: #c7c7cc;
padding: 1px 0 1px 20px;
}
.hud-subs__dot {
width: 6px;
height: 6px;
border-radius: 50%;
flex-shrink: 0;
}
.hud-subs__dot--working {
background: #0a84ff;
}
.hud-subs__dot--done {
background: #30d158;
}
.hud-row__go {
grid-column: 3;
grid-row: 2;
justify-self: end;
font-family: var(--hud-mono);
font-size: 10px;
font-weight: 600;
color: #0a84ff;
background: rgba(10, 132, 255, 0.15);
border-radius: 6px;
padding: 2px 8px;
border: none;
cursor: pointer;
}
.hud-row__go:hover {
background: rgba(10, 132, 255, 0.28);
}
.check {
color: #30d158;
font-size: 15px;
line-height: 1;
}
.needs-dot {
width: 9px;
height: 9px;
border-radius: 50%;
background: #ff453a;
animation: hud-pulse 1.1s ease-in-out infinite;
}