Repository navigation
feat(plan): say what happens now when it is not the plan - #119
Conversation
The plan's headline said "The battery is charging" and the card said "Charge battery" over a battery that discharged. A control row said "as planned" for any battery in a planner mode. The box now says whether the batteries follow this quarter's plan and why not. The Plan screen and the Now card say what the battery does, what the plan said and the reason. control-feedback.js is re-copied from srcfl/ftw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ftw-webapp | 4ea78ce | Commit Preview URL Branch Preview URL |
Nov 08 2026, 10:29 AM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28255fa700
ℹ️ 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".
| const askPlanNow = $derived(site.documentVisible && | ||
| site.session.phase === 'streaming' && site.session.caps.has(CAP_API_PASSTHROUGH)) |
There was a problem hiding this comment.
Stop status polling when the Plan tab is hidden
After the user first opens Plan, this poller continues requesting /api/status every 10 seconds even after they switch tabs. src/App.svelte retains visited views and hides them with hidden={displayedRoute !== 'plan'}, so site.documentVisible only detects a backgrounded document, not an inactive Plan view. Returning to Now therefore runs this poller alongside Now's existing status watcher, and other tabs acquire unnecessary continuous box requests. Pass an active-view flag into Plan and include it in askPlanNow, as Now already does.
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
On 8 November 2026 the battery discharged while the plan meant to charge it, because the sun gave 1.4 kW against a forecast of 3.8 kW. The Plan screen's headline said "The battery is charging", the Now card said "Charge battery" and a control row said "as planned".
Change
Paired with srcfl/ftw#1983, which adds
plan_nowandon_plantoGET /api/status. Core decides; this only words it. Merge after #1983.control-feedback.jsis re-copied from srcfl/ftw forplanNowWords, with its digest re-recorded. The header names branch commited341192; re-stamp it once #1983 lands./api/statusevery 10 s while visible.plan_nowshows the plan as before.Evidence
npm run verifyunder heavy machine load: 1263 passed, 2 skipped; 4 failed, all inEnergy.svelte.test.tswith chart timing, and that file passes 10/10 three times alone. CI will show it on an idle runner. The entry bundle is within budget in the earlier run.vitein a browser at phone width withplan_nowforced in the simulator (not committed): the Plan headline and the Now card read as above, with no console errors.🤖 Generated with Claude Code