fix(kanban-dashboard): tone down completed-run metadata panel + native collapse (salvage #19980)#23268
Merged
Merged
Conversation
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`.
Contributor
🔎 Lint report:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'sdist/index.jsanddist/style.cssdirectly 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
.hermes-kanban-run-meta-blockwith an explicit "Metadata" label so it reads as auxiliary detail at a glance.indent=2instead of a single unindented monoline..hermes-kanban-run-metaatmax-height: 8.5rem; overflow: autoso verbose blobs scroll instead of swamping the run row.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:::beforechevron that rotates 90deg on[open]for consistent cross-browser look.Object.keys(r.metadata).length > 0guard so completed tasks with no actual metadata render nothing (was: empty disclosure block containing literal{}).Validation
tests/plugins/test_kanban_dashboard_plugin.pySalvage 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.