tliu93
|
96e88861d4
|
M6-T10: frontend contract management + price/cost views + Tibber test
- EnergyPage: Mantine Tabs (Devices kept intact + Contracts/Prices/Costs).
- ContractManager/ContractForm: list/activate/add-version + version history;
form fields rendered dynamically from /api/energy/profiles structure.
- TibberPrices + CostView: Recharts price curve, cost trend/detail/summary,
recompute; window-bounded, currency/units from API, empty/error/loading states.
- ConfigPage: tri-state Tibber test button (token never shown).
- hooks.ts: typed energy hooks; schema.d.ts regenerated via codegen.
|
2026-06-23 23:32:39 +02:00 |
|
tliu93
|
45d87f36f7
|
M5-T12: add expose toggle API and Home Assistant Expose settings panel
|
2026-06-22 15:50:49 +02:00 |
|
tliu93
|
2dc469274a
|
M5-T06: add Energy device management UI and sidebar entry
|
2026-06-22 13:52:33 +02:00 |
|
tliu93
|
ee1264b66b
|
M4-T08: add two-step login and TOTP settings panel (qrcode.react)
|
2026-06-21 22:42:41 +02:00 |
|
tliu93
|
a9830c42d8
|
M2-T11: serve React SPA from FastAPI and remove Jinja pages
- app/main.py serves the SPA build (SPA_DIST_DIR, default frontend/dist):
mounts /assets and a GET catch-all returning index.html for client routes;
catch-all 404s on /api/*, never swallows /docs, /openapi.json, /static, assets,
ingestion/ticktick/status; skips SPA serving when dist absent (backend-only CI)
- delete app/api/routes/pages.py, app/api/routes/auth.py, app/templates/
(all replaced by /api/* + SPA; auth service layer kept)
- remove/replace Jinja page tests (JSON coverage already in test_api_*);
add tests/test_spa_hosting.py for the fallback contract
- regenerate openapi/ (Jinja paths gone) and frontend schema.d.ts
|
2026-06-13 15:20:50 +02:00 |
|
tliu93
|
6cfeb2b865
|
M2-T06: scaffold React SPA frontend with typed OpenAPI client
- Vite + React 18 + TypeScript + Mantine + TanStack Query + react-router-dom
- typed client: openapi-typescript -> src/api/schema.d.ts (committed), openapi-fetch
- fetch wrapper middleware: cookies, X-CSRF-Token on writes, 401 -> /login,
non-401 errors carry parsed JSON body
- SessionProvider/useSession (GET /api/session), ProtectedRoute skeleton
- app shell (Mantine + router) with placeholder login/home/config pages + gear nav
- dev proxy to FastAPI; vitest smoke test; frontend README
- npm scripts: dev/build/preview/lint/typecheck/test/codegen
|
2026-06-13 15:20:50 +02:00 |
|