fix(kanban-dashboard): tone down completed-run metadata panel (#19548)

Hand-rebased onto current main from PR #19980; the original branch was stale
against main (~6 unrelated dashboard fixes had landed since), so applying
the PR's dist files directly would have silently reverted them.

The run-history panel in the task drawer rendered each completed run's
`metadata` field as a `<code class="hermes-kanban-run-meta">` containing
`JSON.stringify(r.metadata)` — a single unindented monoline. With
`white-space: pre-wrap` and a monospace font, a writer task's metadata
(changed_files paths, source URLs, generated-artifact details) wrapped
into a tall block of code-ish text that filled the parent run row. The
container's faint `--color-foreground 3%` background then made the whole
thing read like a crash dump even though the run completed normally.

Restyle and label, no interactivity changes:

- Wrap the meta payload in a `.hermes-kanban-run-meta-block` sub-block
  with an explicit `Metadata` label (small, uppercase, muted) so the
  panel reads as auxiliary detail at a glance.
- Pretty-print the JSON (`indent=2`) so the structure is scannable
  instead of a wall of monoline text.
- Cap `.hermes-kanban-run-meta` at `max-height: 8.5rem; overflow: auto`
  so a verbose blob scrolls inside its own pane rather than swamping
  the run row.
- Sub-block uses a thin `border-left` rule and `background: transparent`
  — distinct from the destructive-tinted treatment used by crashed /
  timed_out / blocked / spawn_failed runs higher in the same file.

Tests: two new static-asset assertions in
`tests/plugins/test_kanban_dashboard_plugin.py` lock in the rendered
shape (the plugin ships built-only, no src/).
This commit is contained in:
Tranquil-Flow 2026-05-10 08:28:48 -07:00 committed by Teknium
parent d4b26df897
commit 0e0ddaac8f
3 changed files with 76 additions and 3 deletions

View file

@ -2398,8 +2398,11 @@
? h("div", { className: "hermes-kanban-run-error" }, r.error)
: null,
r.metadata
? h("code", { className: "hermes-kanban-run-meta" },
JSON.stringify(r.metadata))
? h("div", { className: "hermes-kanban-run-meta-block" },
h("div", { className: "hermes-kanban-run-meta-label" }, "Metadata"),
h("code", { className: "hermes-kanban-run-meta" },
JSON.stringify(r.metadata, null, 2)),
)
: null,
);
}),

View file

@ -863,15 +863,37 @@
padding: 0.15rem 0 0;
font-family: var(--font-mono, ui-monospace, monospace);
}
/* Run metadata is a secondary detail panel. Render it as a clearly-labeled
* sub-block with a thin left rule, capped height, and muted treatment so
* a verbose JSON blob (e.g. changed_files + URLs from a writer task) does
* not visually swamp the parent run row or get mistaken for a crash dump.
* See issue #19548. */
.hermes-kanban-run-meta-block {
margin-top: 0.4rem;
padding: 0.25rem 0.5rem;
border-left: 2px solid var(--color-border);
background: transparent;
}
.hermes-kanban-run-meta-label {
font-size: 0.65rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--color-muted-foreground);
padding-bottom: 0.15rem;
}
.hermes-kanban-run-meta {
display: block;
max-height: 8.5rem;
overflow: auto;
font-size: 0.72rem;
line-height: 1.5;
padding: 0.15rem 0 0;
padding: 0;
color: var(--color-muted-foreground);
white-space: pre-wrap;
word-break: break-word;
font-family: var(--font-mono, ui-monospace, monospace);
background: transparent;
}
/* -------------------------------------------------------------------------