Skip to content

fix(kanban-dashboard): tone down completed-run metadata panel + native collapse (salvage #19980)#23268

Merged
teknium1 merged 2 commits into
mainfrom
salvage/pr-19980-run-meta-toned-down
May 10, 2026
Merged

fix(kanban-dashboard): tone down completed-run metadata panel + native collapse (salvage #19980)#23268
teknium1 merged 2 commits into
mainfrom
salvage/pr-19980-run-meta-toned-down

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

The completed-run metadata panel in the kanban task drawer no longer reads like a crash dump. Tranquil-Flow's restyle (label, pretty-print, max-height, transparent treatment) lands as the first commit. A small follow-up adds native <details> collapse for verbose payloads and skips the panel entirely when metadata is {}.

Background — why hand-rebased

PR #19980's branch was stale against current main (~6 unrelated kanban dashboard fixes had landed since the PR's base, including #21086 code/pre theming, #21230 board-pin authority, #21435 specify, #21541 tooltips, and the salvages from earlier in this batch). Cherry-picking the PR's dist/index.js and dist/style.css directly would have silently reverted those fixes — verified empirically by the investigator. The salvage hand-applies the contributor's intended changes on top of current main instead, preserving Tranquil-Flow's authorship on the substantive restyle commit and adding improvements as a separate follow-up commit.

Commit 1 — Tranquil-Flow's restyle

  • Wrap the meta payload in .hermes-kanban-run-meta-block with an explicit "Metadata" label so it reads as auxiliary detail at a glance.
  • Pretty-print JSON with indent=2 instead of a single unindented monoline.
  • Cap .hermes-kanban-run-meta at max-height: 8.5rem; overflow: auto so verbose blobs scroll instead of swamping the run row.
  • Sub-block uses thin border-left + background: transparent — distinct from the destructive-tinted treatment used by crashed/timed_out/blocked/spawn_failed runs above in the same file.

Commit 2 — improvements during salvage

The contributor flagged native <details>/<summary> collapse as the next step but deferred it pending UX agreement. The agreement is straightforward: collapsed when rendered JSON exceeds 300 chars (the threshold where the height cap actually matters), expanded otherwise. Native <details> was the right primitive — zero JS, browser-handled state, accessible by default. Plus:

  • Suppress the OS-default disclosure marker (Firefox/WebKit triangle) and replace with a CSS ::before chevron that rotates 90deg on [open] for consistent cross-browser look.
  • Object.keys(r.metadata).length > 0 guard so completed tasks with no actual metadata render nothing (was: empty disclosure block containing literal {}).

Validation

Before After
tests/plugins/test_kanban_dashboard_plugin.py 77/77 82/82
New static-asset regression tests 0 5 (2 from contributor + 3 new)

Salvage of #19980. Original substantive commit by @Tranquil-Flow preserved as the committing author on commit 1; improvements are a separate commit. AUTHOR_MAP entry already existed.

Tranquil-Flow and others added 2 commits May 10, 2026 08:28
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/).
Two follow-up improvements to Tranquil-Flow's metadata-panel restyle.
Both stay within the parent PR's "tone down the panel" scope.

1. Native <details>/<summary> collapse for verbose metadata.

   The parent PR consciously deferred this ("adding native expand/collapse
   would be the next step but requires UX agreement"). The default they
   asked for is straightforward: collapsed when the rendered JSON exceeds
   300 chars (the threshold where the max-height: 8.5rem cap actually
   starts mattering), expanded otherwise. <details>/<summary> is the right
   primitive — zero JS, browser-handled state, accessible by default
   (keyboard-navigable, screen-reader announces the disclosure state),
   and survives any react-state churn for free.

   The OS-default disclosure marker is suppressed (list-style: none +
   ::-webkit-details-marker hidden) and replaced with a CSS ::before
   chevron that rotates 90deg on the [open] attribute, so the look is
   consistent across Firefox/WebKit/Blink without the double-marker
   that would otherwise appear on the platforms that still render the
   default triangle.

2. Skip rendering when metadata is an empty object.

   `r.metadata && ...` truthy-checks, but `{}` is truthy in JS — so a
   completed task with no actual metadata would render a "Metadata"
   labeled disclosure block containing literal `{}`. Adds an
   Object.keys(r.metadata).length > 0 guard so empty payloads render
   nothing instead of an empty disclosure stub.

Tests: three new static-asset assertions covering the <details> shape,
the empty-object skip, and the suppress-default-marker + animated-chevron
CSS — all in `tests/plugins/test_kanban_dashboard_plugin.py`.
@teknium1 teknium1 merged commit a91e5a8 into main May 10, 2026
12 of 15 checks passed
@teknium1 teknium1 deleted the salvage/pr-19980-run-meta-toned-down branch May 10, 2026 15:30
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: salvage/pr-19980-run-meta-toned-down vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8060 on HEAD, 8060 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4247 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants