134 lines
8.0 KiB
Markdown
134 lines
8.0 KiB
Markdown
# REPORT — TASK-D0: Controller UI re-skin foundation (design system v2) → v0.96.0
|
||
|
||
**Date:** 2026-07-02 · **Deployed:** guest 9201 (`gitea.dooplex.hu/admin/felhom-controller:0.96.0`, healthy)
|
||
|
||
## 1. Baselines
|
||
|
||
- felhom-controller `main` @ `a390e6be293ec70e56d81f90852bc8c2278981e7` (v0.95.0) — **exactly matched
|
||
the spec; main had NOT moved past a390e6b** at session start.
|
||
- felhom.eu `main` @ `8c8196e82b69592bd5c0f2166de0987134921590` — matched.
|
||
|
||
## 2. Commits pushed to `main`
|
||
|
||
| Commit | Content |
|
||
|---|---|
|
||
| `b073cc4` | Part 1: vendored fonts + Lucide sprite + setup CSS fix + tests |
|
||
| `5dc277f` | Part 2: v2 tokens/components, funcmap remap, layout + dashboard + stacks |
|
||
| `f100cef` | Part 3: deploy + backups + monitoring; template-wide var() rename |
|
||
| `7df061c` | Part 4: settings visual pass + remaining pages; grep gate zero |
|
||
| `4906524` | fix(backups): off-box `LastRun` RFC3339-string 500 (pre-existing, found in click-through) |
|
||
| felhom.eu `a336fe3` | docs: `documentation/design/design-system.md` (canonical v2 reference) |
|
||
|
||
## 3. Files created / modified
|
||
|
||
**Created:** `controller/internal/web/static/fonts/{pjs-latin.woff2 27.3K, pjs-latin-ext.woff2 21.7K,
|
||
jbm-latin.woff2 31.4K, jbm-latin-ext.woff2 11.6K}` (4 variable-font files, ~92 KB total — Google now
|
||
serves variable fonts, so one file covers all weights per subset instead of the estimated ~14 files);
|
||
`templates/icons.html` (30-icon Lucide sprite); `internal/web/fonts_test.go`,
|
||
`internal/web/funcmap_test.go`, `internal/setup/css_test.go`;
|
||
`felhom.eu/documentation/design/design-system.md`.
|
||
|
||
**Modified:** `internal/web/{embed.go (fonts FS + StyleCSS()), server.go (/static/fonts/ route),
|
||
funcmap.go (stateColor/usageColor/tempColor remap + timeAgoStr)}`;
|
||
`internal/setup/handlers.go` (handleCSS → embedded CSS; minimalCSS retokened);
|
||
`templates/style.css` (rewritten in place); all 19 web templates; setup templates (v2 token
|
||
fallbacks); CHANGELOG.md, CONTEXT.md, controller/README.md, REPORT.md.
|
||
|
||
## 4. Tests + red-proofs
|
||
|
||
- `go build ./... && go vet ./... && go test ./...` **green after every commit**; final full run exit 0,
|
||
18 packages ok. Test functions 256 → **263** (+7).
|
||
- **funcmap red-proof:** truth-table tests run against the stashed pre-change funcmap **failed exactly
|
||
as required** — `stateColor("stopped") = "red", want "neutral"` and `usageColor(0) = "green", want
|
||
"nominal"` (plus tempColor). Restored; all pass.
|
||
- **setup-CSS red-proof:** Scenario E test against the pre-fix `handleCSS` **failed** with
|
||
`body length = 3592, want > 10000` (minimalCSS served). With the fix: passes, and asserts the
|
||
`--bg-0: #0A1220` literal + byte-equality with `web.StyleCSS()`.
|
||
- Template-parse tests (`TestTemplatesParse`, `TestTemplatesParseWithFuncmap`) already existed and
|
||
cover Group G; they pass with the new funcmap + icons partial.
|
||
|
||
## 5. Grep gate (Test Group F) — counts before → after
|
||
|
||
All 34 patterns measured identically over `controller/internal/{web,setup}` (*.go, *.html, *.css):
|
||
|
||
| Pattern | Before | After | Pattern | Before | After |
|
||
|---|---|---|---|---|---|
|
||
| fonts.googleapis.com | 1 | 0 | system-bar-green | 4 | 0 |
|
||
| border-radius: 999px | 5 | 0 | system-bar-yellow | 4 | 0 |
|
||
| box-shadow | 31 | 0 | system-bar-red | 4 | 0 |
|
||
| #0d1117 | 3 | 0 | state-text-green | 9 | 0 |
|
||
| #161b22 | 1 | 0 | state-text-red | 7 | 0 |
|
||
| #1c2128 | 4 | 0 | state-text-yellow | 3 | 0 |
|
||
| #30363d | 6 | 0 | state-text-orange | 1 | 0 |
|
||
| #238636 | 5 | 0 | ⚙ / ✏ / ✕ / ⏳ | 1/2/1/2 | 0 |
|
||
| #da3633 | 4 | 0 | ✅ / ❌ | 14/5 | 0 |
|
||
| #d29922 | 3 | 0 | ⚠ | 18 | 0 |
|
||
| #db6d28 | 2 | 0 | ℹ️ | 3 | 0 |
|
||
|
||
**Total: 143 → 0.** (🔧🔒📦🔗🔴🟡💾 were 0 in both.) Beyond the gate, related glyphs (✓✗⟳⏸🔄🔍) were
|
||
also swept, and pre-existing never-defined `var(--success/--danger/--primary/--warning/--accent)`
|
||
references in templates were mapped to v2 tokens.
|
||
|
||
## 6. Deployment + live validation (claude-in-chrome)
|
||
|
||
```
|
||
gitea.dooplex.hu/admin/felhom-controller:0.96.0 Up 8 seconds (healthy)
|
||
```
|
||
Startup logs clean (hub report pushed, 5 health probes ok). Sidebar shows 0.96.0.
|
||
|
||
Chrome checks performed on `https://felhom.demo-felhom.eu` (screenshots taken per page; ő-glyph zoom
|
||
saved to disk):
|
||
|
||
1. **Full click-through:** dashboard, Alkalmazások (filters render, grid kept), app-info (calcom),
|
||
deploy page for actualbudget (**opened only — not deployed**; two-segment memory meter renders:
|
||
solid-blue committed + 35%-opacity new), backups, monitoring (charts render in the new palette —
|
||
cpu sky-blue, memory violet; JS-generated host-storage meters blue), logs (mono, blue Élő dot),
|
||
settings (all sections; drive cards with pencil icons, run/USB tags, crit-outline danger buttons).
|
||
2. **Type-to-confirm dialog:** opened the drive-list eject („Meghajtó leválasztása", type-to-confirm
|
||
input, disabled crit-outline Megerősítés) and **cancelled** it; verified afterward the drive is
|
||
still mounted and zero disconnect/eject calls hit the API.
|
||
3. **Scenario D:** zero requests to fonts.googleapis.com/gstatic; `/static/fonts/*.woff2` → 200
|
||
(pjs-latin, pjs-latin-ext, jbm-latin loaded); `document.fonts.check("1em 'Plus Jakarta Sans'")`
|
||
and JBM both `true`; „…rendszermentéstől" ő renders in the brand face (zoom screenshot saved).
|
||
4. **Scenario A (DOM-asserted via JS):** 0 elements with green (35,134,54) backgrounds, 0 elements
|
||
with box-shadow, 0 border-radius values other than 0/2px/50%; „Leállítva 0" stat renders muted;
|
||
running rows blue tag + blue 2px edge.
|
||
5. **Login/logout:** NOT exercisable live — the demo node runs with auth disabled (`/login` is 404,
|
||
no logout link; the known pre-existing unauth-demo state). Login page covered by template-parse
|
||
tests; the two-tone H1 was added (`Otthoni <span>vezérlőpult</span>`).
|
||
|
||
## 7. Bug found & fixed during validation
|
||
|
||
`GET /backups` returned **500** on first visit: `backups.html` passed `OffboxTarget.LastRun` (an
|
||
RFC3339 **string** persisted in settings.json) to `timeAgo` (expects `time.Time`). Pre-existing since
|
||
v0.93.0 (NAS Part B) — it fires on any node where an off-box backup has ever run; the demo node
|
||
qualified. Fixed in `4906524` with a `timeAgoStr` funcmap helper (parses RFC3339, falls back to the
|
||
raw string); 0.96.0 image rebuilt + redeployed, /backups now renders („Rendben … tegnap").
|
||
|
||
## 8. NOT yet live-validated
|
||
|
||
- **Setup wizard visual rendering** — cannot be exercised without re-provisioning; covered by the
|
||
Scenario E unit test (embedded v2 CSS served). Await the next supervised reinstall.
|
||
- **warn/crit meter states on real hardware** — the demo node is healthy (all meters nominal);
|
||
covered at unit level (usageColor thresholds) and by the meter-flag template logic.
|
||
- **`.meter-flag` strings live** — same reason (no disk over 70%).
|
||
|
||
## 9. Observations (structural, NOT acted on — appearance-only scope)
|
||
|
||
1. **settings.html remains monolithic** (~1450 lines, duplicated drive views: template-rendered
|
||
registered-storage cards + JS-rendered agent drive list) — D1 scope. ~50 inline `style="…"`
|
||
attributes remain there and across pages (reduced only where a v2 class covered them).
|
||
2. **Native `confirm()` dialogs** in settings storage actions (`storageDisconnect`, stale-data
|
||
delete) vs the custom type-to-confirm overlay elsewhere — inconsistent UX and they block
|
||
browser automation; suggest migrating to the overlay in D1.
|
||
3. Old `stat-running`/`stat-stopped` class names still appear in backups.html markup (now no-op —
|
||
CSS deleted); harmless, cleanable in D1.
|
||
4. `badge`/`meta-badge`/`db-type-badge`/`validation-badge` markup survives on secondary pages,
|
||
restyled flat by the v2 CSS (2px, dim tokens) — full tag/metarow markup migration on those pages
|
||
can complete in D1–D2.
|
||
5. The catchall + setup pages are standalone (no sprite); they use inline SVGs / plain text. If
|
||
icon needs grow there, consider embedding the sprite per-page.
|
||
6. Baseline grep showed 🔧 at 0 despite layout.html's `🔧 Debug` — some emoji encodings differ from
|
||
the gate's literals; the gate was still measured identically before/after, and independent broader
|
||
sweeps confirmed no emoji remain.
|