Repository navigation
iPhone: the plan says why in the same sentence (plan pass 1) - #57
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87e9e779e8
ℹ️ 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".
| case (.discharge, _): | ||
| guard let top = under.map(\.totalMinor).max() else { return lead } | ||
| return PlanWord.whyDear.format(lead, price(top)) |
There was a problem hiding this comment.
Restrict price prose to matching reason codes
When a priced battery event carries an unknown/new reason code—or a known non-price reason such as reserve_held—these wildcard branches describe every discharge as caused by expensive power and every charge as caused by cheap/negative power. That invents a user-facing explanation instead of reporting the box's reason; match only expensive_import and cheap_import, and leave unsupported reasons bare or map them explicitly.
Useful? React with 👍 / 👎.
…nst guessed, and the planning style as a scale (#58, #59, #60, #61) One squash for four stacked PRs, changes 2–5 of the plan pass Fredrik approved on 14 Oct 2026 (change 1 was #57): - #58: the planned battery level in the scrub, a dashed level line in the lanes and the dial's story (socPermille from srcfl/ftw#1630). - #59: one honest saving under the dial, against no battery, only when the plan ends near its start level. - #60: known against guessed: the dashed sun, hatched unpriced quarters, the style named when it is not balanced. - #61: the two levers at the foot of the plan view, the planning style as a detented scale (Fredrik's note 21), one command on release with the receipt, and only moved quarters cross-faded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan pass, change 1 of 5: the plan says why in the same sentence. Fredrik said yes to all five changes in
design/ftw-ios-polish-2026-10/plan-pass.mdon 14 Oct; this is the first, on main after WP10 (#52) and WP11 (#53).What changes
Now's strip. The sentence under the strip carries the box's reason as what drives it:
The first clause is the next thing the box does, the second what follows; each says why. The line keeps its two reserved rows and may shrink to 85 % before it would lose its end.
Under the dial. Up to three sentences take the place of the four event rows, which said the same thing twice: the battery's next two moves and the car's next charge, in order, each with its reason. Each verb has the colour its ticks have (ink gives power, cyan stores, violet for the car), so the words are the dial's legend. The
CHEAPESTline and the planned line stay. The lanes view keeps its rows.The reasons, from the box's own codes, never its prose:
expensive_import(gives power)cheap_import(stores)solar_surplusexport_paidpeak_shavingA reason with no price under it leaves the clause bare rather than guessing a number.
How
PlanGlance.clausebuilds one sentence per event with its verb marked (*gives power*in the strings), so the strip strips the marks and the plan view colours what is between them.PlanGlance.Phrasecarries the parts;Moment.storyholds the dial's sentences. Swedish word order lives in the strings (*Ger* sedan *ström* %@).Evidence
swift test: FTWShared 214 and FTWKit 365 tests green. New and changed inPlanStripTests: the sentence under way, to come and old with its reasons; each reason code said as what drives it; the story under the dial with its marked verbs; nothing to tell before the box answers.NowFitsTests11 of 11,PlanStripTests3 of 3,PlanDialTests3 of 3. The first run failed to install the test runner on a fresh simulator (installcoordinationddid not answer); the rerun passed.Pictures
Now, dark and light: the sentence under the strip says what comes next and why.
The plan view, dark, light and the largest text: the dial's story, each verb in its ticks' colour, in place of the event rows.
🤖 Generated with Claude Code