Skip to content

fix: simplify electricity connection setup - #1478

Merged
frahlg merged 1 commit into
masterfrom
fix/simple-electrical-setup
Sep 29, 2026
Merged

frahlg merged 1 commit into
masterfrom
fix/simple-electrical-setup

Conversation

@frahlg

@frahlg frahlg commented Sep 29, 2026

Copy link
Copy Markdown
Member

Problem and result

Setup asked users for an ambiguous voltage value, making it easy to enter the 400 V between phases where FTW expects 230 V from phase to neutral. It also silently used 16 A when the main fuse field was empty.

The wizard now asks for country, three-phase or single-phase connection, and the confirmed main fuse rating. Voltage stays under Advanced. An unknown connection or missing fuse blocks saving with guidance. Settings shows saved custom connections and preserves their values until the user changes them. Fresh installs can load the full country and price-zone list from Core.

Scope and safety

No power calculations, config schema or saved values change. Standard choices explicitly set 230 V; country changes never alter electrical values. Custom phase counts, voltages and safety margins survive an unchanged Settings save. The wizard still replaces config when rerun; this does not make it an additive editor.

PR #1051 also touches setup.html/setup.js for static prices. Its reviews and diff were read. The owner reviewed this result and requested a separate merge; this PR leaves that price work out. The webapp has no electrical setup editor, so this change belongs in Core.

Verification

  • npm test: 642 passed, zero failures.
  • make verify: all checks passed, including tests, vet and build.
  • Browser checks at desktop and 390 px: required main fuse, unknown-connection help, custom values, country changes, review and save.
  • Local mock-server POSTs verified 20 A / three-phase / 230 V for standard Sweden and 20 A / three-phase / 400 V for a custom connection. An untouched Settings save retained 400 V and a zero safety margin.
  • Preview uses Core's full table: 29 countries and 46 zones. Country/zone changes checked for Sweden, Denmark, Germany and Italy.
  • Owner inspected the rendered preview and requested merge. No hardware control or release was tested or performed.

Checklist

  • The change follows VISION.md and one selected scope.
  • I checked overlapping PRs and coordinated shared files/contracts.
  • Relevant checks cover the changed behaviour and failure paths.
  • A human reviewed changed UI in a browser, or no UI changed.
  • A Changeset is included, or the change is exempt.
  • Every commit has a DCO sign-off.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg merged commit 9c26d0e into master Sep 29, 2026
14 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T17:59:23.595620Z 3f7d249 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant