fix(#553): unify Dashboard-tree row counts and move Add panel to the Panels row - #562
Merged
Merged
Conversation
…ls row Dashboard, Variables and Panels rows now share one inline `· N` count placement after the label instead of the Dashboard row's own count competing with its action cluster on the right; the rightmost column is actions only. Add panel moves from the Dashboard row to the Panels group row, since it creates a member of that group. #552's narrow-sidebar container query (reused verbatim, no second breakpoint) now also hides these counts, with the count staying in each row's accessible name while visually hidden. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GiubaoqEuBzAyo5C4P8Vqr
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.
What & why
Closes #553. Dashboard tree rows used inconsistent columns for counts and actions: the Dashboard row's panel count was right-aligned trailing text competing with the action cluster, while Variables and Panels used an inline
· N. At narrow sidebar widths that right-aligned metadata ate the space the Dashboard and group names needed.Now all three rows use one placement, and the rightmost column is actions only:
The change is in the pure model, not the renderer.
src/ui/dashboard-tree.tsrendersrow.count/row.actionsgenerically, so both halves flowed throughsrc/application/dashboard-tree-model.tswith no render change:meta(right-aligned) intocount(inline), and itsmetais now always'';add-panelmoves off the Dashboard row'sactionsonto the Panels group row, because it creates a member of that group rather than acting on the Dashboard document. A newaddPanelActionhelper preserves the availability rules exactly — an ambiguous Dashboard id or the 100-tile ceiling still render the control disabled with a reason rather than withholding it (Dashboard tree: replace overflow menus with direct Panel focus, edit and delete actions (#429 phase 4) #494's "vocabulary must not silently shrink"). The Variables group row still has no actions.The accessible name is provably unchanged.
rowAccessibleNamecomposes[label, count, status, meta, marker]and drops empties, so a Dashboard row that wascount: null, meta: '7'→"Sales revenue 7"is nowcount: 7, meta: ''→ the same string. Hiding the count at the breakpoint is purely visual: the row'saria-labelis set explicitly, so a screen reader still announces the count. There's an explicit e2e assertion for that at ≤220px.Narrow width reuses #552's breakpoint
One line added to the existing
@container sidebar (max-width: 220px)block from #552 —.dash-tree-count { display: none; }. No second container, no second threshold, no new class.Verification
npm test→ 201 files / 6630 tests,dashboard-tree-model.tsandui/dashboard-tree.tsboth clear the per-file floor.npm run buildandnpm run check:archpass.New e2e coverage: a
Dashboard tree counts at the narrow sidebar (#553)block (3 tests) plus a Panels-row keyboard/Tab-order test, covering the narrow state, the restored wider state, and that expand/collapse and row actions stay usable by mouse and keyboard at both widths.tests/e2e/tile-open-workbench.spec.js's Add-panel flow is retargeted to the Panels row.Verified visually in Chromium at 1280px and dragged to 200px: counts disappear, a long dashboard title visibly gains the recovered space, and Panels'
+stays present and reachable.Note on two unrelated e2e failures
tests/e2e/tile-open-workbench.spec.jshas 2 failures (grid-tile widen width/height) that reproduce on the base branch — confirmed by stashing this branch's changes and re-running on a private port, after checking via/proc/<pid>/cwdthat the shared Playwright port was held by another worktree (see #560). They are pre-existing and outside this issue's scope; filed separately rather than folded in here.Checklist
npm testpasses (the per-file coverage gate is non-negotiable)npm run buildsucceeds (single-filedist/sql.html)src/core/, network insrc/net/(injected fetch), DOM insrc/ui/CHANGELOG.md([Unreleased]) updated if behavior or the deployed surface changed🤖 Generated with Claude Code
https://claude.ai/code/session_01GiubaoqEuBzAyo5C4P8Vqr