feat(maestro): debug HUD overlay for inferred session metrics (#20)
ci / rust (push) Failing after 1m49s
ci / rust (push) Failing after 1m49s
A game-HUD-style debug overlay (FPS-counter for sessions) that surfaces the daemon-inferred fields from #18 — activity, foreground, idle time, status — on the active session, live off the existing events WS. Lets us validate the inferred data before designing any "real" UI, and stays useful as a permanent debugging tool. - Off by default; toggled via Ctrl+Shift+D (persisted in localStorage) or `?hud` in dev (debug.ts). - Fixed bottom-right overlay, pointer-events:none so it never blocks the terminal; activity value is color-coded (active/awaiting/idle). - Generic: renders every non-client-owned Session field, so a new daemon-derived field (#19 `detail`, later metrics) surfaces with no overlay change. Idle time re-renders on a 1s ticker; values update on SessionUpdated. - Pure consumer-side: no daemon/protocol/registry changes. The `?mock` fixture seeds varied activity so the HUD can be reviewed without a daemon. Closes #20 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1831,3 +1831,65 @@ textarea {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------- debug HUD (#20) ---------- */
|
||||
|
||||
.debug-hud {
|
||||
position: fixed;
|
||||
right: var(--sp-3);
|
||||
bottom: var(--sp-3);
|
||||
z-index: var(--z-toast);
|
||||
min-width: 180px;
|
||||
max-width: 280px;
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
background: color-mix(in oklab, var(--surface) 88%, transparent);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--r-2);
|
||||
box-shadow: var(--shadow-2);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--fs-12);
|
||||
line-height: 1.5;
|
||||
/* Diagnostics only — never intercept clicks on the terminal beneath it. */
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.hud-head {
|
||||
color: var(--ink);
|
||||
font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding-bottom: 2px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.hud-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-3);
|
||||
}
|
||||
|
||||
.hud-k {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.hud-v {
|
||||
color: var(--ink);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.hud-v[data-activity="Active"] {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.hud-v[data-activity="AwaitingInput"] {
|
||||
color: var(--warn);
|
||||
}
|
||||
|
||||
.hud-v[data-activity="Idle"] {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user