Skip to content

Follow Core: drop priority/weighted modes; keep a boost beside Charge now - #73

Merged
frahlg merged 2 commits into
mainfrom
follow-core/modes-and-boost
Sep 27, 2026
Merged

frahlg merged 2 commits into
mainfrom
follow-core/modes-and-boost

Conversation

@frahlg

@frahlg frahlg commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Contract-pair: srcfl/ftw@refactor/remove-priority-weighted-modes

Paired with two Core changes:

  1. Priority and weighted modes removed (refactor(control): remove the priority and weighted modes ftw#1453). Nothing set a priority order, so neither mode ever regulated.
    • contract/registry.yaml drops both keys and is byte for byte the Core branch's copy (npm run check:contract against it passes).
    • The demo box and the mode test follow.
  2. A battery boost runs beside Charge now (fix(loadpoint): let a battery boost run together with Charge now ftw#1450). Charge now sets what the car draws; a boost lets the house battery cover it.
    • The demo box no longer withdraws a boost when a hold starts, and no longer refuses one under a hold.
    • The test now checks that the boost stays, and that one asked for under Charge now is taken.
    • The operator_hold label stays for older boxes.

Checks:

  • npm run check finds 0 errors.
  • npm test with LANG=C passes 1033 of 1033; one test is skipped.
  • With a Swedish locale, EvPanel.svelte.test.ts fails on main too, on "4.6 kWh" against "4,6".

🤖 Generated with Claude Code

https://claude.ai/code/session_01MuerPFZFG88kgu8sWVHeq7

frahlg and others added 2 commits September 27, 2026 08:29
Core removes ModePriority and ModeWeighted: nothing ever set a priority
order, so neither regulated. The registry loses both keys, byte for
byte the copy in srcfl/ftw, and the demo box and the mode test follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuerPFZFG88kgu8sWVHeq7
Core now keeps a battery boost when Charge now starts and accepts one
asked for while it runs (srcfl/ftw#1450): Charge now sets what the car
draws, the boost lets the house battery cover it. The demo box follows,
and the test says so. The operator_hold label stays for older boxes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuerPFZFG88kgu8sWVHeq7
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp b6a8589 Commit Preview URL

Branch Preview URL
Sep 27 2026, 06:32 AM

@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-27T06:33:48.459405Z b6a8589 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6a8589f6f

ℹ️ 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".

Comment thread src/lib/sim/box.ts
return
}
if (this.#evHold || this.#evSurplusOnly) {
if (this.#evSurplusOnly) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Expose boost while Charge now is active

When a manual charge is already running, this change makes the simulator accept a boost, but EvPanel.svelte still branches on lp.manualActive to hide the “Boost from the house battery” button and display “Available after returning to the plan”; its existing test at EvPanel.svelte.test.ts:908-917 enforces that stale behavior. Consequently, owners cannot initiate the newly supported boost-under-Charge-now flow through the product UI, despite the store and box accepting it; update that UI guard and test alongside this condition.

Useful? React with 👍 / 👎.

@frahlg
frahlg merged commit 71a6491 into main Sep 27, 2026
4 of 5 checks passed
@frahlg
frahlg deleted the follow-core/modes-and-boost branch September 27, 2026 07:09
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