You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing ui/ is a 6-page vanilla-JS multi-page app: solid plumbing, no charting library, no shared component model, no "selling" framing. Every page reads as an operator's console.
This issue tracks rebuilding it so HEM can:
Adjust runtime settings end-to-end — the API already exposes 33 runtime-tunable keys via GET/PUT /api/v1/settings + batch simulate/apply with the X-Simulation-Id header. Today's settings.html surfaces only a subset. Especially: DHW night/morning targets (DHW_TEMP_NORMAL_C, DHW_TEMP_PV_ABUNDANCE_TARGET_C, DHW_TANK_OVERNIGHT_TARGET_C) need to be one click in.
See forecast vs actuals — overlay PV forecast (Quartz/Open-Meteo via /weather) on Fox realised (/execution/today); same for outdoor temperature; plus the Agile rate timeline. No such view exists.
Look like a "selling" dashboard — landing page with a savings narrative ("£X saved vs fixed last month"), tariff comparison, attribution donut. Pulled from /energy/report, /energy/monthly, /attribution/day.
Token-economical polling — never hit /daikin/status?refresh=true from the cockpit; poll cached /cockpit/now only.
Stack decisions
Framework
Preact 10 (~5 KB) + wouter-preact (~3 KB)
Charts
ECharts 5, lazy-loaded chunk
Build
Vite 5 + TypeScript 5 strict
Replacement
Full ui/* rewrite in one PR; /history, /insights, /workbench ride along as legacy HTML until a follow-up
Plan file: /home/stkoverflow/.claude/plans/let-s-rebuild-the-ui-hazy-snowflake.md (not committed; lives in local Claude session state).
Scope ✅ in this PR
/ landing — hero savings number, KPI strip, monthly-savings bar chart, attribution donut, "how it works" cards
The existing
ui/is a 6-page vanilla-JS multi-page app: solid plumbing, no charting library, no shared component model, no "selling" framing. Every page reads as an operator's console.This issue tracks rebuilding it so HEM can:
GET/PUT /api/v1/settings+ batch simulate/apply with theX-Simulation-Idheader. Today'ssettings.htmlsurfaces only a subset. Especially: DHW night/morning targets (DHW_TEMP_NORMAL_C,DHW_TEMP_PV_ABUNDANCE_TARGET_C,DHW_TANK_OVERNIGHT_TARGET_C) need to be one click in./weather) on Fox realised (/execution/today); same for outdoor temperature; plus the Agile rate timeline. No such view exists./energy/report,/energy/monthly,/attribution/day./daikin/status?refresh=truefrom the cockpit; poll cached/cockpit/nowonly.Stack decisions
ui/*rewrite in one PR;/history,/insights,/workbenchride along as legacy HTML until a follow-upPlan file:
/home/stkoverflow/.claude/plans/let-s-rebuild-the-ui-hazy-snowflake.md(not committed; lives in local Claude session state).Scope ✅ in this PR
/landing — hero savings number, KPI strip, monthly-savings bar chart, attribution donut, "how it works" cards/cockpit— animated power flow SVG, SoC ring, dispatch reason chips, next-transition strip, polling/forecast— three stacked ECharts (PV / outdoor temp / Agile prices) with synchronised hover/settings— Mode switcher (OPTIMIZATION_PRESET) prominent at top, 8 grouped sections covering all 33 keys, simulate → apply flow/history,/insights,/workbenchstill serve from the same containerOut of scope (follow-ups)
/history,/insights,/workbench— they stay on vanilla HTML