Adds GET /api/captures (token-gated, matching the memory/skills enabled-false-not-an-error convention when Server.Captures is nil) and a new dashboard page at /captures listing recent inbound captures, newest first, with per-row expand to explore the redacted payload and headers pretty-printed. Live updates reuse the existing operator-activity event pipeline (Server.emit -> Events.Publish -> the /events SSE stream every other page already subscribes to) rather than polling or inventing new push plumbing: handleCapture now emits a Kind "capture" event with the same field shape the list endpoint returns, so a captured event appears in the inspector without a manual refresh. Frontend follows the tasks/task-row.js precedent: row rendering is split into ui/src/captures/capture-row.js so it can be unit tested without the page's fetch/SSE wiring. "Unbound" is shown for every row today since no binding data model exists yet (t2db.4) -- the column is wired now so that bead only needs to change what it renders, not add it.
62 lines
1.1 KiB
CSS
62 lines
1.1 KiB
CSS
/* Event inspector: captured payloads, explorable per row. */
|
|
|
|
.capture-row {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.capture-row:hover {
|
|
background: var(--bg-raised);
|
|
}
|
|
|
|
.capture-row:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
.capture-detail-row td {
|
|
padding: var(--sp-3) var(--sp-3) var(--sp-4);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.capture-detail {
|
|
display: grid;
|
|
gap: var(--sp-4);
|
|
grid-template-columns: 1fr 1fr;
|
|
}
|
|
|
|
.capture-detail-section {
|
|
min-width: 0;
|
|
}
|
|
|
|
.capture-detail-title {
|
|
font-size: var(--text-xs);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--fg-subtle);
|
|
margin-bottom: var(--sp-2);
|
|
}
|
|
|
|
.capture-payload {
|
|
background: var(--bg-raised);
|
|
border: 1px solid var(--border-strong);
|
|
border-radius: var(--radius-sm);
|
|
padding: var(--sp-3);
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-xs);
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
max-height: 24rem;
|
|
overflow: auto;
|
|
}
|
|
|
|
.capture-empty {
|
|
color: var(--fg-muted);
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.capture-detail {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|