Repository navigation
feat: setup wizard frontend - #66
Conversation
8-step wizard for first-time configuration: site basics, network device scan, driver selection from catalog, driver configuration, optional integrations (EV, HA, price), review and save via POST /api/config. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
## [0.5.0](v0.4.0...v0.5.0) (2026-04-16) ### Features * add setup wizard frontend (web/setup.html + web/setup.js) ([#66](#66)) ([bc1a285](bc1a285)) * bootstrap mode + network scanner for onboarding wizard ([#67](#67)) ([267cef4](267cef4)) * wizard dashboard trigger + driver catalog enrichment ([#68](#68)) ([78c83cf](78c83cf))
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6622f37144
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| statusEl.innerHTML = '<span class="spinner"></span> Scanning network...'; | ||
| resultsEl.style.display = 'none'; | ||
|
|
||
| fetch('/api/scan') |
There was a problem hiding this comment.
Point device scan at an implemented API endpoint
The scan step calls fetch('/api/scan'), but the server route table only registers /api/health, /api/status, /api/config, /api/drivers/catalog, etc., and does not expose /api/scan (go/internal/api/api.go, routes()). In practice this means the “Scan network” button can never return devices in the current backend and will always fall into the error path, so the primary discovery flow is non-functional unless users switch to manual IP entry.
Useful? React with 👍 / 👎.
|
|
||
| <div class="wizard-actions"> | ||
| <button class="btn-secondary" onclick="goStep(2)">Back</button> | ||
| <button class="btn-skip" onclick="goStep(7)">Skip (no devices)</button> |
There was a problem hiding this comment.
Block the skip-devices flow from reaching an invalid save
The wizard explicitly offers “Skip (no devices)” and allows proceeding to save, but buildConfig() serializes drivers directly from configuredDrivers, so that path posts an empty driver list; backend validation rejects this (config.Validate() requires at least one driver and one is_site_meter). This creates a guaranteed dead-end for a documented flow, where users complete all steps only to hit a 400 validation error at the end.
Useful? React with 👍 / 👎.
The setup guide wrote control_interval_s 5, slew_rate_w 500 and min_dispatch_interval_s 5. It copied the defaults when it was added in April (#66); the defaults moved to 2 s / 3000 W / 2 s in May (#293, #298) and the guide did not follow. Settings → Control showed the same old values as its fallbacks. The guide now sends 2 / 3000 / 2, and Settings → Control shows them. It cannot leave the fields out: with a house password the box stores the guide's settings as sent and fills no defaults, so a missing slew_rate_w would turn the ramp limit off. wizardOrDefaultSeed still knows a guide seed only by 5 / 500 / 5. An older Core saves 2 / 3000 / 2 for an untuned home, and that save must import after a rollback. Tests: a guard that the guide and the Control tab match applyDefaults, the seed check for the old and new values, and an older Core's save with default timings importing over live Settings. Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
web/setup.htmlandweb/setup.js— an 8-step setup wizard for first-time configuration/api/drivers/catalogwith protocol filtering), Driver configuration (IP/port/unit-id/site-meter/battery), Device summary (add more loop), Optional integrations (EV Easee, Home Assistant MQTT, price provider), Review + Save (POST/api/config)web/style.cssCSS variables, wizard-specific styles inline in a<style>blockTest plan
/setup.htmlin a browser and verify each step renders correctly/api/drivers/catalog/api/configwith the built config JSON🤖 Generated with Claude Code