Keep the live view on screen, with box-page colours and plan - #54
Conversation
A tap on a bubble parked a position:fixed sheet inside the scrolling view, so the house walked off the bottom of the phone. The line also wore a different colour from its bubble, and the plan card claimed a live charge the readings did not show. Park the sheet on the app shell, colour it from the same planet map, open Now at the house, and tell the next step the way Overview does. Co-authored-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ftw-webapp | 38a13b7 | Commit Preview URL Branch Preview URL |
Aug 21 2026, 12:19 PM |
Co-authored-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38a13b7216
ℹ️ 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 color = $derived(planetColor(role as FlowColorRole, raw)) | ||
| const socPct = $derived.by(() => { | ||
| if (role !== 'battery') return null | ||
| const permille = (fields ?? site.session.fields).get(FID.BATTERY_SOC) | ||
| return permille === undefined ? null : Math.round(permille / 10) |
There was a problem hiding this comment.
Preserve the selected battery when showing its readings
When a multi-battery site is switched to split bubbles, flowReadingsFromStatus gives each bubble its own direction and SoC, and the click event includes that bubble's name/id; however, Now retains only the role, so these new color and SoC values are calculated from the aggregate stream fields. Tapping a discharging 40% pack can therefore open a sheet colored for the aggregate direction and displaying the aggregate SoC rather than the selected pack's 40%. Preserve the clicked device identity and use its status values for these fields.
Useful? React with 👍 / 👎.
When you tap a planet on Now, the live sheet used to appear at the bottom of the page. On a phone that meant the house scrolled off-screen and the line wore a different colour from the bubble you just tapped. The “What FTW does next” card also claimed a live charge that the readings above it did not show.
This matches those three surfaces to the box’s own Overview:
position: fixedstays on the screen. Now itself always opens at the house instead of restoring a scroll that had walked down to the fuse.Charge battery at 2.9 kW/Now, until 16:15/ reason / safety), with a Plan active badge, instead of a present-tense sentence that fights the live reading.Tests cover the portal, the colour mapping, the brief copy, Now opening at the top, and that opening a live line does not move the scroller.