Keep Now live when device details stop updating - #65
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ftw-webapp | bf27cc0 | Commit Preview URL Branch Preview URL |
Sep 07 2026, 06:25 PM |
frahlg
marked this pull request as ready for review
September 7, 2026 18:28
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_959269e3-c360-4585-9e9c-0201aa96e539) |
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. |
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.
When
/api/statusfails while telemetry keeps arriving, Now leaves old device watts under a live display. This change switches the diagram to fresh telemetry totals after a failed read or 15 seconds without a usable reply. It clears old device and daily-share labels, dates retained energy and fuse readings, and restores the details when status recovers.Status polling stops when Now is hidden or the session ends. An expired EV overlay also stops overriding telemetry.
Validation:
bf27cc06c32ee8494e69ec73ab6d081aaf5df58f, using a local SimBox fixture that fails only/api/status: healthy → HTTP 503 with telemetry continuing → recovery without a reload. The diagram kept moving, the daily share disappeared, energy and Fuse showed Last known with a timestamp, and fresh labels and values returned on recovery.Browser evidence uses simulated data. Physical box behavior has not been tested for this change.
Note
Medium Risk
Changes live-display honesty and fallback logic on the primary Now screen when status and telemetry disagree; mistakes could mislabel power flow or fuse safety readings.
Overview
When
/api/statusfails or goes quiet while the 1 Hz stream still runs, Now no longer keeps drawing stale per-device details as if they were live.Status polling now emits a
StatusSnapshotwith a 15s freshness window (elapsed time via timers, not wall clock). Failed reads, overdue replies, or stop/hide mark the retained snapshot stale instead of silently reusing it.On stale status, the energy-flow hero switches to telemetry totals, explicitly clears self-powered today, and shows a short “Device details are out of date” note while particles can still move. Today and Fuse in Outlook switch to Last known / Last totals copy with last-updated timestamps until status recovers.
The EV charger overlay reports 0 W when loadpoints data is stale so it cannot override fresh telemetry. Status watching is limited to when Now is active, visible, and streaming with API passthrough.
Reviewed by Cursor Bugbot for commit bf27cc0. Bugbot is set up for automated code reviews on this repo. Configure here.