Skip to content

fix(loadpoint): let a battery boost run together with Charge now - #1450

Merged
frahlg merged 1 commit into
masterfrom
fix/boost-with-charge-now
Sep 27, 2026
Merged

frahlg merged 1 commit into
masterfrom
fix/boost-with-charge-now

Conversation

@frahlg

@frahlg frahlg commented Sep 27, 2026

Copy link
Copy Markdown
Member

Problem

The owner started Charge now to top up before a trip, then wanted Boost from home battery so the house battery would cover the charge. The boost could not be used:

  • the EV modal disabled it with "Stop the manual charge first — it already takes what it needs";
  • EnableBatteryBoost refused a loadpoint with a manual hold;
  • a running boost was ended with operator_hold as soon as Charge now started.

The two do not conflict:

  • A manual hold sets how much the car draws.
  • A boost only lets the home battery cover the loadpoint's live draw above a reserve. ActiveBatteryBoostTotals already counts the charger's measured CurrentPowerW, whoever set it, and dispatch caps the cover at that draw.

The exclusion had no safety role; controller.go itself documents the two as separate.

Change

  • Removed the manual-hold refusal from the boost preflight and the manual-hold stop from the tick.
  • Removed the operator_hold stop reason and its labels in app.js and loadpoints.js.
  • Removed the modal's block. The other refusals stay: not plugged in, and PV only.
  • Fuse, battery reserve, battery-health and charger limits apply unchanged.

Evidence

  • TestBatteryBoostRunsWithChargeNow runs hold-then-boost and boost-then-hold. In both orders the boost stays active after a tick and covers the held 11 kW above the 30 % reserve. With master's battery_boost.go it fails: "boost refused beside Charge now: loadpoint operator hold is active".
  • go test ./internal/loadpoint ./internal/api ./cmd/ftw passes, and npm test (LANG=C) passes 639/639. The web test now asserts the block is gone.
  • UI: the only visual change is that the Boost button stays enabled while Charge now runs. Check it on the box after the next beta.

#1177 edits web/app.js and web/loadpoints.js in its polling code, not in the boost view.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MuerPFZFG88kgu8sWVHeq7

A manual hold sets how much the car draws; a boost only lets the home
battery cover the loadpoint's live draw above a reserve. The two answer
different questions, and dispatch already counts the boost from the
charger's measured power, whoever set it. Yet the boost preflight
refused a loadpoint with a manual hold, the tick ended a running boost
as soon as one started, and the EV modal disabled Boost while Charge
now ran. An owner topping up before a trip could not have the battery
cover it.

Remove the manual-hold refusal and stop, the operator_hold stop reason
and its labels, and the modal's "Stop the manual charge first" block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuerPFZFG88kgu8sWVHeq7
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 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-27T05:45:59.990576Z 3ee1921 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.

@miravoss26 miravoss26 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets a battery boost run alongside a Charge now hold instead of getting refused/stopped by it — the two answer different questions (how much the car draws vs. what covers that draw), and the changeset states fuse/battery/charger limits still apply, which the diff bears out: the site-safety, surplus-only and fuse-guard checks are untouched, only the operator_hold gate is removed.

Correctness: the new TestBatteryBoostRunsWithChargeNow covers both orderings (hold-first, boost-first) and asserts the boost stays active and totals the held draw correctly. The removed operator_hold stop reason is cleaned up consistently across battery_boost.go, its tests, web/app.js and web/loadpoints.js — no dangling references I could find. CI is green across the board.

Security: no new deps, no network/authz surface changes.

Safe to merge from my read.

@frahlg
frahlg merged commit 3688337 into master Sep 27, 2026
14 checks passed
@frahlg
frahlg deleted the fix/boost-with-charge-now branch September 27, 2026 07:08
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.

2 participants