Repository navigation
Conversation
Since #2144 a saving counts only time with known Home use. The Overview card marked a period partial only for whole days without prices, so a day when a charger reported no power showed no mark at all. A period is now partial when less than 95 % of its time was compared, as in the apps. The note names the cause: Home use unknown, prices missing, or both. A price gap must reach 5 % to be named, because about 1 % of a day goes unpriced where an interval straddles a price slot. The bill beside the saving is compared_actual_cost_ore, the bill over the same time. 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. |
miravoss26
reviewed
Dec 3, 2026
miravoss26
left a comment
Contributor
There was a problem hiding this comment.
The Overview savings card now says why a figure is partial (unknown Home use, missing prices or both) and shows the bill over the compared time.
- Logic and tests match the description. Older boxes without
expected_msorcompared_actual_cost_orefall back as before. - Minor,
web/components/savings-periods.js(summarize): with the 95 % threshold, a month with oneno_pricesday in 30 is now marked complete, although that day is left out ofsavedMinor. The old code marked it with*. Fine if intended. - Security screen: nothing found. The new text is set through
textContent,titleandaria-label.
Safe to merge from my read.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Since #2144 (v0.175.0-beta.1) Core counts
saved_oreonly over the time it knew Home use, and sends that time's bill ascompared_actual_cost_ore.actual_cost_orestays the full bill. So a figure can be partial for two reasons: prices were missing, or Home use was unknown.The Overview savings card only knew the first. It wrote "Partial price data" for every partial figure, and marked a figure only by whole days with prices. A week where a charger reported no power for days got no mark at all (before:
+148, no*).What changes
*when less than 95 % of its time was compared (priced_coverage_pct < 0.95).compared_actual_cost_ore. An older box sends onlyactual_cost_ore, which the card still reads. Bill + saving = the no-solar figure again.The rule, the same in all three clients:
history_coverage_pct < 0.95.history − priced ≥ 0.05, or when Home use is not the cause.history_coverage_pctreads as before.About 1 % of each day on the home box is unpriced, where intervals cross a price slot. A 1 % threshold would blame prices wrongly; 5 % does not.
Paired PRs
The box comes first. The clients use the same rule and the iPhone's words:
None depends on another to build or test.
Evidence
cd web && npm test: 1089 pass, with new tests insavings-periods.test.mjsfor each cause, the 5 % rule and an older box.make verify: pass.web/and master's, both served against the home box's live API through a read-only proxy.Before, master, real data from 3 Dec. The week had Home use for 67 % of its time and shows no mark:
After, same data:
After, the Overview tile at phone width:
After, with a fixture that has both causes:
Hover titles checked in the browser: "Last 7 days: +148 SEK saved. The box knew Home use for 67% of the time."
Not merged; Fredrik decides.
🤖 Generated with Claude Code