Skip to content

[Dashboard] Add the theme Console - #301

Merged
LarsLaskowski merged 27 commits into
mainfrom
claude/epic-volta-wusl4o
Nov 29, 2026
Merged

LarsLaskowski merged 27 commits into
mainfrom
claude/epic-volta-wusl4o

Conversation

@LarsLaskowski

@LarsLaskowski LarsLaskowski commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Pull Request

📖 Description

Adds a second dashboard theme, Console (light and dark): monospace values, segmented bars, stepped sparklines, tight corners and no shadows. In Console, colour marks only warn and crit; the ok level is drawn in the text colour, with green kept for the Pi-hole status dot. The theme is registered in the theme registry and selectable in the "Customize dashboard" dialog. Canvas drawing properties (stepped line, grid, arc width, caps, ok fill) are declared per theme and read with a fallback to Clear's drawing; the number and unit of the CPU and temperature values are now separate elements, and Clear's look is unchanged. Console's palette values and the colour rule are documented in the dashboard area document.

🎫 Issues

Closes #219

Decision records: docs/decisions/0043-console-colour-only-for-warn-and-crit.md (new), extended in place: 0038 and 0042.

💬 Reviewer Notes

Touched: internal/web/assets/ (style.css, theme-init.js, chart.js, gauge.js, app.js), the area document docs/areas/dashboard.md, README.md and two README screenshots (docs/dashboard-console-light.png, docs/dashboard-console-dark.png, rendered from the built binary in headless Chromium). No route, config key, collector or packaging change; no API change. The security area Dashboard XSS is touched through setMetricValue in app.js, which builds the number and unit with createElement and textContent only. Smoke test: open the dashboard, choose Console in "Customize dashboard", switch light and dark, and compare Clear with the previous release.

📑 Test Plan

Go tests over the embedded assets in internal/web cover each acceptance criterion: registry, palette tokens and contrast, colour rule, monospace stack, cards, segmented bars, stepped sparklines, gauge arc, number/unit split, scoped rules and the keyword reader. Existing tests that pinned Clear's drawing literals were adapted to still assert Clear's values. Clear and Console were also rendered in light and dark in a headless browser.

✅ Checklist

  • I have added or updated Unit Tests for the change.
  • I have tested my changes.
  • I have run Format and Build from .squad/stack.md, and the Analyzer gate reports no diagnostic in a changed file.
  • The Coverage gate in .squad/stack.md passes (new or changed production code with the branch conditions its report records, line coverage overall).
  • I have updated the project documentation (README.md, ARCHITECTURE.md) and the area document of every changed behavior to reflect my changes.
  • Each decision with lasting weight has its decision record, committed with the change.
  • I have read the CONTRIBUTING documentation and followed the project's code style guidelines.
  • New dependencies, if any, were added the way Dependencies in .squad/stack.md prescribes.
  • The PR carries its release-notes label (CONTRIBUTING); a change that breaks existing users carries breaking-change and says so in the Description.
  • Reviewer Notes name the touched routes, config keys, collectors or packaging files, and a smoke test on a Pi
    (or what only real hardware can verify).

⏭ Next Steps

None.

@LarsLaskowski LarsLaskowski added the enhancement New feature or request label Nov 29, 2026 — with Claude
@sonarqubecloud

Copy link
Copy Markdown

@LarsLaskowski
LarsLaskowski marked this pull request as ready for review November 29, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dashboard] Add the theme "Console" (light and dark)

2 participants