Repository navigation
[Dashboard] Add the theme Console - #301
Merged
Merged
Conversation
|
LarsLaskowski
marked this pull request as ready for review
November 29, 2026 21:03
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.



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
warnandcrit; theoklevel 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 documentdocs/areas/dashboard.md,README.mdand 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 throughsetMetricValueinapp.js, which builds the number and unit withcreateElementandtextContentonly. 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/webcover 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
.squad/stack.md, and the Analyzer gate reports no diagnostic in a changed file..squad/stack.mdpasses (new or changed production code with the branch conditions its report records, line coverage overall).README.md,ARCHITECTURE.md) and the area document of every changed behavior to reflect my changes..squad/stack.mdprescribes.breaking-changeand says so in the Description.(or what only real hardware can verify).
⏭ Next Steps
None.