Skip to content

feat(control): show limits and measured response in Now and charging - #75

Draft
frahlg wants to merge 10 commits into
mainfrom
feat/control-feedback
Draft

frahlg wants to merge 10 commits into
mainfrom
feat/control-feedback

Conversation

@frahlg

@frahlg frahlg commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Now shows a small evidence mark on each controlled device's energy-flow bubble, without tier text. A dot means device measurement, a ring adds independent site confirmation, and a warning symbol marks faults. Normal response waits stay neutral, and inactive commands have no mark. A tap opens the existing charger controls or device view directly. A collapsed “Are we in control?” section below that content holds the reason, request, sent command, device setpoint, measured power and site comparison. It keeps its open state through updates. The first screen no longer contains the full detail cards. The unused intermediate evidence panel is removed. The battery view keeps its existing live readings; this change does not add remote manual battery control.

Tier 1 means fresh device power has been measured; Tier 2 means a separate physical site meter supports its actual change. Neither tier alone means the target was met. Confirmed partial delivery shows the measured and sent watts, shortfall and unknown cause. Shortfalls and known limits use amber; faults, wrong direction, no power and excess power retain red warnings. Core owns these verdicts. Each device keeps its own level: an unavailable charger can stay in the residual while the battery has Tier 2. Normal solar measurements receive no control tier; curtailment does.

Combined bubbles show mixed tiers and retain alarms. A failed controlled device remains visible next to healthy siblings, without old watts styled as current. Loss of measured proof shows a red alarm; an ordinary response wait stays distinct. Stale status removes current confirmation. Details name unmeasured background flows, show time gaps in milliseconds, and include measured curves with the correction and unexplained change.

A full battery shows a quiet charging pause with its reported charge level and the 99% resume threshold. The command and measured watts stay visible, and stale values remain marked as not current. Core keeps control faults and measurement confidence separate from this known limit.

Paired with srcfl/ftw#1474 and srcfl/device-drivers#149. Existing status/loadpoint JSON gains optional fields; older Core responses still work. Presentation helpers match Core, and the flow component is copied from Core commit 79518637c89d5a9fa459001c3c43109f14153175. Registry, padding and design tokens stay unchanged. PR #72's simulation/auth work stays separate.

Validation: npm run check, the full test suite (1,052 passed, one skipped) and npm run build passed. The current full verification passed outside the sandbox, where local test sockets are available. A live-panel test now resolves the parent view’s lazy imports before attributing API calls to a tap; its no-extra-call assertion remains. Contract/token checks passed. Tests exercise a Tier 2 shortfall, measured recovery and stale evidence, direct battery/EV entry in the actual Now view, selected-driver scope, collapsed evidence, open state through updates and proof loss, hidden aggregate-layer keyboard access, and an offline sibling alarm without stale watts. Browser checks cover Core/Svelte views on desktop and at 390 px, including the compact overview, mixed tiers, alarm details and measured curves. Fixtures are clearly labelled synthetic.

This remains draft. Human UI review and live remote-client validation remain.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp 64bdfe7 Commit Preview URL

Branch Preview URL
Sep 30 2026, 01:45 PM

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant