feat(now): draw Overview under the house from the box snapshot - #53
Conversation
The LAN page already fed <ftw-energy-flow> from GET /api/status: per-driver planets, kWh today, self-powered. Now does the same, then the rest of that glance — compact price, the next plan step, today's totals, savings, fuse. Frozen fields stay the fallback. The new cards load after the first frame.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ftw-webapp | 84b30dc | Commit Preview URL Branch Preview URL |
Aug 20 2026, 06:03 PM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95042c34d6
ℹ️ 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".
| .fill.warn { background: var(--energy-generation); } | ||
| .fill.crit { background: var(--energy-import); } | ||
| .fill.is-out { background: var(--energy-storage); } |
There was a problem hiding this comment.
Keep fuse warning colors above export styling
When an exporting phase reaches the 70% or 90% threshold, the fill receives both warn/crit and is-out. Because .fill.is-out has equal specificity and is declared last, its storage color overrides both warning colors, so a critically loaded exporting fuse appears normal instead of red. Give the threshold styles precedence over the direction style.
Useful? React with 👍 / 👎.
| const soc = num(d.bat_soc) | ||
| planets.push({ | ||
| id: `bat-${name}`, corner: 'top-right', title: 'BATTERY', role: 'battery', name, | ||
| kw: Math.abs(batW) / 1000, toHub: batW < 0, |
There was a problem hiding this comment.
Preserve battery direction during aggregation
On sites with multiple batteries, the component defaults to its combined view and sums each planet's kw, then derives the combined battery label from that sum (src/vendor/ftw/ftw-energy-flow.js:1630-1638). Converting every bat_w to an absolute value here means two discharging batteries are summed as a positive value and labeled “charging”; mixed charging/discharging batteries are also added rather than netted. Preserve direction through the aggregation path while keeping individual display values unsigned if desired.
Useful? React with 👍 / 👎.
| class:is-export={savings.today.savedMinor >= 0} | ||
| class:is-import={savings.today.savedMinor < 0} | ||
| >{formatCompactMinor(savings.today.savedMinor)}</strong> |
There was a problem hiding this comment.
Respect unavailable savings for today
When today's savings row has resolution: 'no_prices' but any earlier day in the week is priced, loadSavings retains the periods because week.available is true, while summarize sets today's amount to zero and today.available to false. Rendering the amount unconditionally therefore tells the user they saved +0.00 today even though the box could not calculate today's savings; gate or label the daily figure using savings.today.available.
Useful? React with 👍 / 👎.
Codex review on #53: an exporting phase on the fuse overrode warn/crit colours; two discharging packs summed as a charge; a day without prices printed as +0.00 saved.
The LAN Overview already looked finished. This app used the same energy-flow component and fed it five frozen numbers, then stopped.
What changed
Hero.
GET /api/statusis the document the box page draws from. Now polls it while the glance is on screen and builds the same planet list: one bubble per live driver, kWh today on each corner, self-powered share. Frozen fields stay the fallback when the session has no passthrough. A faulted charger still has a planet, which is why LAN always looked right.Under the house. The rest of that glance, loaded after the first frame:
fed, so it never hits this origin)Tap "Full view" on the compact price chart opens Plan. Open history goes to History.
Why not the whole LAN page
Settings, driver editor and diagnose stay on the box. This app is the glance. The cards reuse the box APIs the passthrough already prices as reads.
Test
npm test— 902 passednpm run check— clean