Repository navigation
Description
Summary
Add a second dashboard theme, Console (design variant B, "Konsole"): a dense, technical look in the spirit of an instrument panel or htop. Values are set in a monospace face, bars are segmented, sparklines are stepped, corners are tight, there are no shadows — and colour appears only where something needs attention. Everything in the normal range is drawn in the text colour; warn and crit are the only colours on the page apart from small green status dots.
The theme is registered under the id console with the display name "Console" and becomes selectable through the theme selection of #218. It exists in a light and a dark mode. The default theme stays "Clear" (#217).
Depends on
- [Dashboard] Refresh the default look: theme "Clear" (light and dark) #217 — tokens, SVG icons, bar label structure and the other markup this theme restyles.
- [Dashboard] Let the user choose a dashboard theme, stored per browser #218 — theme registry,
data-style, storage and selector, and the pattern for canvas drawing properties.
Design reference
Mockups: docs/design/v1.5.0/theme-b-console-light.png and theme-b-console-dark.png, shown in the first comment of this issue. The text of this issue is the binding specification, the mockups only illustrate it. The mockups show four elements that are tracked in separate issues and are not part of this one: the per-core meter rows, the "5 MIN · MIN/MAX" caption under the sparklines, the "OK" marker in card headers and the "SCALE 0 – 4 · 4 CORES" line under the gauges.
Specification
Same DOM as Clear; everything below is theme CSS plus canvas drawing properties.
1. Palette tokens
| Token | Light | Dark |
|---|---|---|
--bg |
#f4f5f6 |
#0b0c0e |
--card-bg |
#ffffff |
#121417 |
--text |
#111418 |
#e6e8eb |
--muted |
#5a626e |
#98a0ab |
--border |
#d5d9df |
#282c33 |
--track |
#dde0e5 |
#2b2f36 |
--accent |
= --text |
= --text |
--on-accent |
= --card-bg |
= --card-bg |
--ok / --ok-ink |
#16a34a / #15803d |
#22c55e / #4ade80 |
--warn / --warn-ink |
#d97706 / #92400e |
#f59e0b / #fbbf24 |
--crit / --crit-ink |
#dc2626 / #b91c1c |
#ef4444 / #f87171 |
--shadow |
none |
none |
The theme is monochrome: the accent is the text colour. The per-card accent colours of Clear are not used; all card icons are drawn in --muted.
2. Fonts
- Sans (labels, key names): the existing system stack.
- Mono (all values, card titles, header, banner, buttons, captions, footer):
ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace. System fonts only; no font file is added. - Base size 13 px.
3. The colour rule
This is the defining rule of the theme and must hold everywhere:
| Level | Text (values, percentages) | Fills (bars, gauge arcs) |
|---|---|---|
ok |
--text |
--text |
warn |
--warn-ink |
--warn |
crit |
--crit-ink |
--crit |
So a CPU value of 20.5 % is drawn in the text colour, not green; a filesystem at 89.3 % gets an amber percentage and an amber bar. Thresholds and the level of each value are exactly those of today (docs/areas/dashboard.md, Value coloring); only the colour chosen for the ok level differs. Green appears only as a small status dot (the Pi-hole "Up to date" state, see section 9).
4. Header
- No logo tile. Title "PiMonitor" in mono, 18 px, weight 700; below it the subtitle line in mono, 12 px,
--muted. - Layout and theme buttons: 44 × 44 px, 6 px radius,
--card-bg, 1 px--border, no shadow. Icon stroke width 1.75. - Page padding 16 px / 20 px.
5. Alert banner
6 px radius, 1 px solid border in the base colour of the worst level, background = that colour at 10 % opacity, text in the level's ink colour, mono, 13 px, weight 600, alert icon 16 px. Content and visibility unchanged.
6. Cards
--card-bg, 1 px--border, 6 px radius, no shadow, 12 px gap between cards and columns.- The heading is a strip across the top of the card: 44 px minimum height, 14 px horizontal padding, 1 px
--borderbelow it. Icon 14 px in--mutedwithout a chip, then the title in mono, 12 px, weight 600, uppercase, letter-spacing 0.08em,--text. The chevron of clickable cards is 14 px in--muted. In clickable cards the whole strip is the button. - Body padding 12 px 14 px 14 px (8 px 14 px 10 px for cards that hold only key/value rows).
- The hover/focus highlight of clickable cards uses
--text.
7. Key/value rows
13 px; key in sans and --muted, value in mono, regular weight, right-aligned, wrapping anywhere; rows divided by a 1 px dashed --border line; 6 px vertical padding.
8. Metric values
Mono, 30 px, weight 600, letter-spacing −0.03em, line-height 1.1. The unit (%, °C) is set apart: 15 px, weight 500, --muted, 4 px left margin. This needs the number and the unit to be separate elements; if #217 left them as one string, split them here (both via textContent). Sub lines: mono, 12 px, --muted.
9. Updates card
- Count as a metric value; "Checked …" as a sub line.
- Button: outlined — 1 px solid
--text, transparent background,--text, mono, 13 px, weight 600, 6 px radius, 44 px minimum height. - Pi-hole section: separated by a 1 px dashed
--border; the status is mono text preceded by a 6 × 6 px square dot in the base colour of its level (--okfor "Up to date",--warnfor "Update available"). The text itself follows the colour rule of section 3. Version and "Checked" lines in mono, 12 px,--muted.
10. Bars (Memory & Swap, Filesystems)
- Segmented: the track is a row of 6 px wide segments with 2 px gaps, 12 px high, square corners, in
--track; the fill uses the same segment pattern in the colour of section 3. Arepeating-linear-gradienton track and fill gives this without extra markup; fill and track patterns must stay aligned. - Label row in mono, 12 px: name at weight 600; percentage at weight 600 in the colour of section 3; byte figures in
--muted. - 12 px between bar rows.
11. Sparklines and detail chart
Drawing properties for chart.js (see #218 for the mechanism):
- Stepped line: each sample is held horizontally until the next one (horizontal segment, then vertical), instead of straight segments between samples.
- Line 1.5 px in
--text; flat fill under the line in--textat 7 % opacity (9 % in dark); no gradient and no end dot. - A solid 1 px baseline in
--borderat the bottom and two dashed 1 px grid lines in--border(dash 2 px, gap 4 px) at 25 % and 62.5 % of the height from the top. - Height 48 px. Scaling and the "fewer than two points" rule are unchanged.
- The detail chart of the modal uses the same stepped style.
12. Load gauges
Drawing properties for gauge.js: arc 5 px wide with butt caps, track --track, value arc in the colour of section 3. Value inside the arc in mono, 18 px, weight 600; label below in mono, 11 px, uppercase, letter-spacing 0.06em, --muted.
13. Network card
Mono; interface name at weight 600; rates preceded by 13 px arrow icons in --muted; rows divided by a dashed line.
14. Badges, dialogs, footer
- Alert badges and the stale badge: rectangular (no radius), 1 px border in the base colour of the level, background at 10 % opacity, ink text, mono, 11 px, uppercase, with a 6 × 6 px square dot in the base colour in front.
- Dialogs: 6 px radius, 1 px
--border, mono headings; buttons outlined as in section 9; the active range button is filled with--textand labelled in--card-bg. Table of updates in mono. - Footer: mono, 12 px,
--muted; the link in--text(underlined).
Constraints
- Everything in Constraints of [Dashboard] Refresh the default look: theme "Clear" (light and dark) #217 holds: no inline styles or scripts (CSP
style-src 'self'; script-src 'self'), no external resources or web fonts, no non-emptyinnerHTML, unchanged card structure, ids, layout mechanics and breakpoints, no API change. - The theme is CSS overrides plus declared canvas drawing properties ([Dashboard] Let the user choose a dashboard theme, stored per browser #218). No Console-specific markup in
index.html, no Console-specific branches for HTML rendering inapp.js. - Selecting or leaving the theme changes nothing but the appearance: polling, alerts, layout, detail view and API key handling behave identically in every theme.
- Contrast: text at least 4.5:1 in both modes; graphical elements (bar fills, arcs, icons, dots) at least 3:1 against their background. Note that in the
oklevel the bars are text-coloured, so their contrast is high by construction; the segmented track is decorative.
Out of scope
- Per-core meter rows, the sparkline caption, the "OK" header marker and the gauge scale line (separate issues in this milestone).
- Any new data or behaviour.
Acceptance criteria
- AC1 — The registry holds a theme with the id
consoleand the display name "Console"; it can be chosen in the "Customize dashboard" dialog and is applied before first paint when stored. - AC2 — The theme defines every palette token in its light block and in both dark blocks with the values of section 1, and the two dark blocks are identical.
- AC3 — A value in the
oklevel is drawn in--text(text and fills);warnandcrituse their ink colour for text and their base colour for fills. This holds for CPU usage, temperature, RAM, swap, every filesystem and the load gauges. - AC4 — Values, card titles, header, banner, buttons, captions and footer use the monospace stack; no font file is requested from the network or added to the embedded assets.
- AC5 — Cards have a 6 px radius, no shadow and a heading strip with a bottom border; card icons are drawn in
--mutedwithout a chip and without the per-card colours of Clear. - AC6 — Memory, swap and filesystem bars are segmented (6 px segments, 2 px gaps, 12 px high); fill and track segments are aligned at every fill width.
- AC7 — Sparklines and the detail chart are drawn as a stepped line in
--textwith a flat low-opacity fill, a baseline and two dashed grid lines; with fewer than two points nothing is drawn. - AC8 — Load gauges are drawn with a 5 px arc and butt caps; the arc is not clipped at any column width.
- AC9 — The number and the unit of a metric value are separate elements, the unit smaller and muted.
- AC10 — Switching between Clear and Console, and between light and dark while Console is active, restyles the page and redraws every canvas widget without a reload.
- AC11 — Text contrast is at least 4.5:1 for
--text,--mutedand the three ink tokens against--card-bg, and for--textand--mutedagainst--bg, in both modes. - AC12 — With the theme Clear active, the page looks and behaves exactly as before this issue.
- AC13 — No inline style or script is added;
app.jsassigns no non-emptyinnerHTML; the existing tests underinternal/webpass.
Testing notes
Go tests over the embedded assets, as for #217 and #218: registry entry (AC1), token blocks and contrast computed from the token values (AC2, AC11), absence of font files and @font-face (AC4), the canvas drawing properties being declared for this theme and read by chart.js / gauge.js with a fallback to the Clear drawing (AC7, AC8).
Documentation
docs/areas/dashboard.md: add Console to the list of themes and state the colour rule of section 3 under Value coloring, since it changes which colour theoklevel takes in this theme.README.md: a screenshot of the theme (light and dark) next to the default one.- Decision record: "In Console, colour is reserved for
warnandcrit".
Activity
LarsLaskowski commentedon Nov 13, 2026
Design mockups
The mockups referenced under Design reference are in the repository at
docs/design/v1.5.0/onmain. Sample data; the issue text stays the binding specification. The per-core rows (#221), the sparkline caption (#222), the header status dot (#223), the "OK" markers and the gauge scale line (#224) that are visible here are not part of this issue.Console — light
Console — dark
LarsLaskowski commentedon Nov 29, 2026
Squad working record
Verification matrix of feature-219-theme-console on
042a6d3TestThemeRegistry_HasConsole_AC1042a6d3TestStyleCSS_ConsolePalette_AC2(three blocks, §1 values, dark blocks identical)042a6d3TestStyleCSS_ConsoleColourRule_AC3;TestGaugeJS_OkFill_AC3042a6d3TestStyleCSS_ConsoleMonospace_AC4042a6d3TestStyleCSS_ConsoleCards_AC5042a6d3TestStyleCSS_ConsoleSegmentedBars_AC6042a6d3TestChartJS_ConsoleSparkline_AC7; adaptedTestChartJS_Sparkline_AC7042a6d3TestGaugeJS_ConsoleArc_AC8; adaptedTestGaugeJS_ArcNeverClipped_AC8042a6d3TestAppJS_MetricValueUnit_AC9042a6d3TestAppJS_ThemeSwitchRedraws_AC10042a6d3TestStyleCSS_ThemeContrast_AC11042a6d3TestStyleCSS_ConsoleRulesScoped_AC12; existing Clear tests; manual: Clear light and dark on the branch build042a6d3xss_test.go,TestIndexHTML_NoInlineStyle_AC11, wholeinternal/websuite042a6d3TestThemeInit_KeywordReader_AC14; adaptedTestThemeInit_DrawingFallbacks_AC17042a6d3TestStyleCSS_ConsoleChrome_AC15; manual: Console light and dark against §4–§14042a6d3Manual checks (step 9): Clear light and dark on the branch build keep the previous look (AC12); Console light and dark rendered against §4–§14 (AC15). The two README screenshots are still to be supplied by the Product Manager (tasks.md row 8).
log.md
Log: #219 Theme Console
One line per pipeline step: date and time of day (UTC), step, member, result. Lead decisions and escalations
are quoted in full.
Lessons: #302
Squad run metrics
Template: LarsLaskowski/Squad-Spec-Repository-Template v2026.11.15 (commit 96342d9fa5f8)
Tokens per kind and their weighted figure (every token at its list price, in tokens of Sonnet input:
.squad/tools/session-usage.py):Session usage
Tokens per model (the session and all its subagents; Claude Code's own background calls are not in the transcripts, so this is a lower bound):
Subagents:
Orchestrator (this session without its subagents): 3,340,486 weighted, 36 % of the total, on claude-sonnet-5-5.
Weighted: every token at its list price, in tokens of Sonnet input (
PRICESin.squad/tools/session-usage.py); a model of no listed family has none (–).Generated by Claude Code