feat(web): row-click inspector drawer for orchestrator events

Mirrors the CredentialsInspector pattern: clicking a row opens a
right-edge drawer with the full event payload pretty-printed and
copyable.  The table view truncates the src/dst id to 8 chars; the
drawer shows the full identifier plus a SOURCE chip
(TOPOLOGY / FLEET / SHARD) so operators can tell at a glance whether
the orchestrator hit a MazeNET decky, a unihost fleet decky, or a
SWARM shard.

Source detection is purely client-side based on id shape — bare UUID
→ topology, "local:*" → fleet, "<host>:*" → shard.  The server
already returns a normalized id from list_running_deckies; this
inspector just labels it.

Backdrop click closes via target===currentTarget guard (per the
React stop-propagation memory: never use stopPropagation on drawer
panels — it breaks native event delegation).

Live (in-flight stream) events use synthetic uuids prefixed "live-";
the drawer hides the EVENT UUID row and shows "LIVE EVENT" in the
header for those, since the server-side id won't exist until the
backend persists the row.
This commit is contained in:
2026-04-26 21:44:52 -04:00
parent 9650366d34
commit 674028d476
3 changed files with 360 additions and 1 deletions

View File

@@ -241,3 +241,188 @@
/* Animations */
@keyframes orch-pulse { from { opacity: 0.5; } to { opacity: 1; } }
@keyframes orch-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
/* ── Row interactivity ─────────────────────────────────── */
.orchestrator-root .logs-table tr.clickable { cursor: pointer; }
.orchestrator-root .logs-table tr.clickable:hover {
background: rgba(238, 130, 238, 0.04);
}
/* ── Inspector drawer ──────────────────────────────────── */
.orchestrator-root .orchestrator-drawer-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
justify-content: flex-end;
z-index: 1000;
animation: od-fade 0.15s ease;
}
@keyframes od-fade { from { opacity: 0; } to { opacity: 1; } }
.orchestrator-root .orchestrator-drawer {
width: min(620px, 100%);
height: 100%;
background: var(--bg);
border-left: 1px solid var(--violet);
box-shadow: -12px 0 40px rgba(238, 130, 238, 0.1);
overflow-y: auto;
display: flex;
flex-direction: column;
animation: od-slide 0.2s ease;
}
@keyframes od-slide {
from { transform: translateX(30px); opacity: 0.6; }
to { transform: none; opacity: 1; }
}
.orchestrator-root .orchestrator-drawer .bd-head {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
border-bottom: 1px solid var(--border);
}
.orchestrator-root .orchestrator-drawer .bd-head h3 {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
letter-spacing: 3px;
color: var(--violet);
margin: 0;
}
.orchestrator-root .orchestrator-drawer .close-btn {
background: transparent;
border: 1px solid var(--border);
color: var(--matrix);
display: flex;
padding: 4px;
cursor: pointer;
}
.orchestrator-root .orchestrator-drawer .close-btn:hover { border-color: var(--violet); }
.orchestrator-root .orchestrator-drawer .bd-body {
padding: 20px;
display: flex;
flex-direction: column;
gap: 20px;
}
.orchestrator-root .orchestrator-drawer .kvs {
display: grid;
grid-template-columns: 130px 1fr;
gap: 10px 12px;
font-size: 0.8rem;
align-items: center;
}
.orchestrator-root .orchestrator-drawer .kvs .k {
opacity: 0.55;
font-size: 0.7rem;
letter-spacing: 1.5px;
display: inline-flex;
align-items: center;
}
.orchestrator-root .orchestrator-drawer .kvs .v { word-break: break-all; }
.orchestrator-root .orchestrator-drawer .kvs .v.mono {
font-family: var(--font-mono);
font-size: 0.78rem;
}
/* Source-tag chips disambiguate the opaque dst id: bare UUIDs come from
topology_deckies, "host_uuid:name" composites come from the fleet
(host_uuid="local") or SWARM shards. */
.orchestrator-root .orchestrator-drawer .src-dst-cell {
display: inline-flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.orchestrator-root .orchestrator-drawer .src-dst-cell .hash-text {
font-family: var(--font-mono);
font-size: 0.74rem;
color: var(--matrix);
}
.orchestrator-root .orchestrator-drawer .chip.src-topology {
border-color: var(--matrix);
color: var(--matrix);
}
.orchestrator-root .orchestrator-drawer .chip.src-fleet {
border-color: var(--violet);
color: var(--violet);
}
.orchestrator-root .orchestrator-drawer .chip.src-shard {
border-color: #ffaa00;
color: #ffaa00;
}
.orchestrator-root .orchestrator-drawer .type-label {
font-size: 0.68rem;
letter-spacing: 2px;
opacity: 0.6;
margin-bottom: 8px;
}
.orchestrator-root .orchestrator-drawer .code-block {
background: var(--panel);
border: 1px solid var(--border);
border-left: 2px solid var(--violet);
padding: 12px 14px;
font-family: var(--font-mono);
font-size: 0.78rem;
color: var(--matrix);
white-space: pre-wrap;
word-break: break-all;
margin: 0;
overflow-x: auto;
max-height: 400px;
overflow-y: auto;
}
.orchestrator-root .orchestrator-drawer .hash-row {
display: flex;
align-items: center;
gap: 8px;
}
.orchestrator-root .orchestrator-drawer .hash-row .hash-text {
font-family: var(--font-mono);
font-size: 0.72rem;
color: var(--matrix);
word-break: break-all;
flex: 1;
}
.orchestrator-root .orchestrator-drawer .icon-btn {
background: transparent;
border: 1px solid var(--border);
color: var(--matrix);
padding: 4px 6px;
display: inline-flex;
cursor: pointer;
}
.orchestrator-root .orchestrator-drawer .icon-btn:hover { border-color: var(--violet); }
.orchestrator-root .orchestrator-drawer .bd-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.orchestrator-root .orchestrator-drawer .btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 14px;
font-family: inherit;
font-size: 0.78rem;
letter-spacing: 1.5px;
background: transparent;
border: 1px solid var(--border);
color: var(--matrix);
cursor: pointer;
transition: all 0.3s ease;
opacity: 0.8;
}
.orchestrator-root .orchestrator-drawer .btn.ghost:hover {
opacity: 1;
border-color: var(--matrix);
box-shadow: var(--matrix-glow);
}