Commit Graph

8 Commits

Author SHA1 Message Date
80466464e6 feat: add timeline current-hour highlight and comfort risk card
Pass profile timezone through DashboardData so the frontend can
compute the current hour and highlight it on the heatmap (white ring +
orange triangle marker). Only activates when the dashboard date matches
today in the profile timezone.

In cold weather (peak < 22°C, risk low), the risk card now shows a
teal "Comfortable" presentation with a checkmark icon instead of the
generic green "Low" shield.
2026-02-10 04:36:04 +01:00
84d645ff21 feat: fix cold-weather thermal logic, add comfort mode, and dashboard forecast refresh
- Fix ComputeRoomBudget: no-AC rooms check if open-window ventilation
  can offset gains instead of defaulting to Overloaded. Net-cooling
  rooms are now Comfortable; ventilation-solvable rooms are Marginal.
- Add "comfort" cool mode for hours where outdoor is >5°C below indoor
  and budget is not overloaded (winter/cold scenarios).
- Reorder determineCoolMode: sealed now before overloaded, fixing
  humid+cold+no-AC giving "overloaded" instead of "sealed".
- Update LLM prompts: document comfort coolMode, add cold-weather
  guidance for summary and actions generation.
- Add dashboard forecast refresh button: fetches fresh forecast +
  warnings, then re-runs compute and LLM pipelines.
- Extract forecast fetch into shared fetchForecastForProfile() in db.js,
  deduplicating logic between setup.js and dashboard.js.
- Add indoor humidity support, pressure display, and cool mode sealed
  integration test.
2026-02-10 04:26:53 +01:00
5e6696aa42 feat: add AI-powered actions endpoint and timeline annotations
Add LLM actions endpoint that generates hour-specific heat
management recommendations. Replace static action engine with
AI-driven approach. Add cool mode logic (ventilate/ac/overloaded),
indoor temperature tracking, and timeline legend with annotations.
2026-02-10 03:54:09 +01:00
c23ac1611a feat: gate AI actions on heat threshold and restructure dashboard layout
Skip LLM actions call when peakTempC < 22°C and risk is low. Add
low-risk guidance to both summary and actions system prompts so the
LLM returns appropriate responses on mild days. Restructure dashboard
into a top-level two-column grid with sidebar beside all main content
and remove max-w-7xl cap for full-width layout.
2026-02-09 15:14:01 +01:00
d5452409b6 feat: rewrite to stateless web app with IndexedDB frontend
Replace CLI + SQLite architecture with a Go web server + vanilla JS
frontend using IndexedDB for all client-side data storage.

- Remove: cli, store, report, static packages
- Add: compute engine (BuildDashboard), server package, web UI
- Add: setup page with CRUD for profiles, rooms, devices, occupants, AC
- Add: dashboard with SVG temperature timeline, risk analysis, care checklist
- Add: i18n support (English/German) with server-side Go templates
- Add: LLM provider selection UI with client-side API key storage
- Add: per-room indoor temperature, edit buttons, language-aware AI summary
2026-02-09 13:31:38 +01:00
a89720fded feat: add LLM provider settings to web UI with encrypted API key storage
Add full LLM configuration section to the setup page with provider
dropdown, model/API key fields for cloud providers (Anthropic, OpenAI,
Gemini), and endpoint/model fields for Ollama. API keys are encrypted
with AES-256-GCM and stored in the database.
2026-02-09 11:41:16 +01:00
c63e70cab0 feat: add Google Gemini LLM provider
Add Gemini provider using the generativelanguage.googleapis.com API
with systemInstruction support. Activated via --llm gemini with
GEMINI_API_KEY env var. Default model: gemini-2.0-flash.
2026-02-09 10:50:48 +01:00
1c9db02334 feat: add web UI with full CRUD setup page
Add server-side rendered setup UI accessible via `heatwave web`.
The dashboard is now re-rendered per request and includes a nav bar
linking to the new /setup page. Setup provides full CRUD for profiles,
rooms, devices, occupants, AC units (with room assignment), scenario
toggles, and forecast fetching — all via POST/redirect/GET forms.

- Add ShowNav field to DashboardData for conditional nav bar
- Extract fetchForecastForProfile() for reuse by web handler
- Create setup.html.tmpl with Tailwind-styled entity sections
- Create web_handlers.go with 15 route handlers and flash cookies
- Switch web.go from pre-rendered to per-request dashboard rendering
- Graceful dashboard fallback when no forecast data exists
2026-02-09 10:39:00 +01:00