UX-43: tariff prices take 5 decimals #194

Merged
admin merged 3 commits from UX-43 into release/1.0 2026-10-16 04:30:10 +02:00
Owner

UX-43: the four tariff price fields (fixed, day, night, time-window rows) take 5 decimals (step 0.00001 EUR/kWh). Settings page.

  • uilayout.py: step 0.01 -> 0.00001 on ui.fixed_price, ui.day_price, ui.night_price, ui.periods.
  • settings.js: the time-window price input took a hard-coded step 0.01; it now takes the field's step.
  • en.json / nl.json: one-sentence hint on the four field descriptions (divide c EUR/kWh by 100).
  • DOCS: one sentence in "Static day/night and fully-fixed tariffs".
  • test_uimodel.py part 8: 0.34512 round-trips through all four fields, 3-row 5-decimal list, 2-decimal profile unchanged by load+save, step and hint present.

Nothing else changes: the validator, static_profile grammar and control are untouched.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC

UX-43: the four tariff price fields (fixed, day, night, time-window rows) take 5 decimals (step 0.00001 EUR/kWh). Settings page. - uilayout.py: step 0.01 -> 0.00001 on ui.fixed_price, ui.day_price, ui.night_price, ui.periods. - settings.js: the time-window price input took a hard-coded step 0.01; it now takes the field's step. - en.json / nl.json: one-sentence hint on the four field descriptions (divide c EUR/kWh by 100). - DOCS: one sentence in "Static day/night and fully-fixed tariffs". - test_uimodel.py part 8: 0.34512 round-trips through all four fields, 3-row 5-decimal list, 2-decimal profile unchanged by load+save, step and hint present. Nothing else changes: the validator, static_profile grammar and control are untouched. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
admin added 2 commits 2026-10-16 02:29:33 +02:00
ui.fixed_price, ui.day_price, ui.night_price and ui.periods step 0.00001
EUR/kWh (the period editor's price input took a hard-coded 0.01). A short
c-EUR/kWh hint is added to the four field descriptions, EN and NL.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
UX-43: keep each field description to one sentence (STYLE)
checks / unit (pull_request) Successful in 40m31s
infra-pin / fresh (pull_request) Successful in 1s
8c954acb36
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
admin added 1 commit 2026-10-16 03:47:30 +02:00
UX-43 review: plain wording for the DOCS line on five-decimal prices
checks / unit (pull_request) Successful in 40m23s
infra-pin / fresh (pull_request) Successful in 1s
92a3d3400a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Review of UX-43 (reviewed 8c954ac, plus my DOCS fix 92a3d34).

Findings

  1. Low, fixed in 92a3d34: goodwe_controller/DOCS.md:3123. The line was not wrapped, and "a bill in c€/kWh divides by 100" is unclear. It now says: "Prices take five decimals: divide the c€/kWh on your bill by 100, so 34.512 c€/kWh is 0.34512 €/kWh." It is wrapped at 80 characters.
  2. Info, no change: on Day and night, the same hint shows under both fields (app/ui_text/en.json:27-28, nl.json:27-28). This is acceptable because STYLE allows one sentence per description, and only one contract is shown at a time.
  3. Info, no change: test_uimodel.py part 8, the settings.js check is a plain text match. A different hard-coded step such as String(0.01) would get past it. The browser check catches that, but the browser check is not in CI.
  4. Info, no change: Python writes prices below 0.0001 as 5e-05. Everything that reads static_profile (validate.py, static_tariff _price, predeploy) parses it as JSON, so the value comes back exactly. The page JS never parses static_profile. Real tariffs are far above this, so it only looks odd.

Checks: I traced the Python and JS paths: stored() uses toFixed(7) for step 1e-5, shown() uses toFixed(6), the window row price passes through +value, and Python passes floats straight to json.dumps. Nothing rounds below 5 decimals. In a browser, end to end (Save, then config/model, then reload) with fixed, day/night and three windows, EN and NL: every value is stored and read back exactly. The dev's Playwright check: 24 of 24 pass. 8 mutations (3 from the dev, 5 of my own) were all caught. Full offline suite: see the report.

Review of UX-43 (reviewed 8c954ac, plus my DOCS fix 92a3d34). **Findings** 1. Low, fixed in 92a3d34: `goodwe_controller/DOCS.md:3123`. The line was not wrapped, and "a bill in c€/kWh divides by 100" is unclear. It now says: "Prices take five decimals: divide the c€/kWh on your bill by 100, so 34.512 c€/kWh is 0.34512 €/kWh." It is wrapped at 80 characters. 2. Info, no change: on Day and night, the same hint shows under both fields (`app/ui_text/en.json:27-28`, `nl.json:27-28`). This is acceptable because STYLE allows one sentence per description, and only one contract is shown at a time. 3. Info, no change: `test_uimodel.py` part 8, the settings.js check is a plain text match. A different hard-coded step such as `String(0.01)` would get past it. The browser check catches that, but the browser check is not in CI. 4. Info, no change: Python writes prices below 0.0001 as `5e-05`. Everything that reads `static_profile` (validate.py, static_tariff `_price`, predeploy) parses it as JSON, so the value comes back exactly. The page JS never parses `static_profile`. Real tariffs are far above this, so it only looks odd. **Checks**: I traced the Python and JS paths: `stored()` uses toFixed(7) for step 1e-5, `shown()` uses toFixed(6), the window row price passes through `+value`, and Python passes floats straight to json.dumps. Nothing rounds below 5 decimals. In a browser, end to end (Save, then config/model, then reload) with fixed, day/night and three windows, EN and NL: every value is stored and read back exactly. The dev's Playwright check: 24 of 24 pass. 8 mutations (3 from the dev, 5 of my own) were all caught. Full offline suite: see the report.
admin merged commit b703aaa6d5 into release/1.0 2026-10-16 04:30:10 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/goodwe-addon#194