Skip to content

fix(dashboard): give every live session trace its own gradient fill - #566

Merged
stuffbucket merged 1 commit into
mainfrom
fix/dashboard-sparkline-gradients
Oct 28, 2026
Merged

stuffbucket merged 1 commit into
mainfrom
fix/dashboard-sparkline-gradients

Conversation

@stuffbucket

Copy link
Copy Markdown
Owner

The live sessions card drew a single gradient area, under the selected session or else the busiest one. Every other session's sparkline was a bare line, so only the first row looked filled in.

What changed

  • Each session's trace now has its own area under its line, filled with a gradient in that session's color.
  • Each gradient has its own id (live-fill-N, from a counter), so one session's fill can't point at another's.
  • The fills sit in their own group under all the lines, so a fill never covers another session's line.
  • A fill follows its trace when the trace is dimmed, selected, or removed.
  • style.css takes the fill color from --trace-color, the same variable the line uses, instead of a separate --live-fill-color.

The top opacity of the fill is unchanged at 0.32. With six or more overlapping sessions the card gets busier; lower it if that looks heavy.

Tests

  • New Playwright test in tests/e2e/dashboard-live.spec.ts: with at least three sessions, every trace has its own gradient id, its area's fill references that gradient, the area path isn't empty, and the gradient's stop color equals the line's stroke.
  • Rendered the live-sessions scenario (five sessions) in headless Chromium in light and dark and checked a gradient under every line.
  • bun run typecheck, bun run lint, bun test tests/dashboard-live and the 19 dashboard-live Playwright tests pass.

The live card drew a single area fill, for the selected or busiest
session, so every other trace was a bare line. Each trace now has its
own area and linearGradient with a unique id, inheriting the trace's
series color, and the fills sit under all the lines.
@stuffbucket stuffbucket added this to the v0.5.0 milestone Oct 28, 2026
@stuffbucket
stuffbucket merged commit 411f907 into main Oct 28, 2026
5 checks passed
@stuffbucket
stuffbucket deleted the fix/dashboard-sparkline-gradients branch October 28, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant