Skip to content

fix: show recorded day energy after measurement gaps - #1613

Merged
frahlg merged 1 commit into
masterfrom
fix/energy-today-known-measurements
Oct 13, 2026
Merged

frahlg merged 1 commit into
masterfrom
fix/energy-today-known-measurements

Conversation

@frahlg

@frahlg frahlg commented Oct 13, 2026

Copy link
Copy Markdown
Member

Problem and result

A recorded PV gap makes today's solar and consumption totals null, even after live readings recover. The flow view then shows 0.00 kWh for that missing solar total.

Expose recorded subtotals beside the existing nullable totals. Energy today, Overview and the flow view show ≥ for partial energy and explain the gaps. A flow with no measured subtotal stays Unknown; a measured zero stays zero. Keep the daily self-powered share unknown when import or consumption is incomplete.

Scope and safety

Missing periods stay unfilled. The full-range fields retain their quality mask, so older clients still receive null for incomplete totals. The box reads the same stored intervals, with no extra history query or database migration.

#1546 touches route registration in the same API file. This change only replaces the Energy today mapping in the status handler; it preserves that PR's EV-cost work. The Energy today note uses the existing card, leaving the HTML files shared with #1546 and #1547 alone.

The tester reported this after updating from v0.141.5-beta.1 to v0.141.7-beta.1. The support bundle shows fresh PV and meter readings but contains no daily energy snapshot or history database. The exact gap at that site remains unconfirmed; the failure and recovery path are reproduced with synthetic history.

Verification

  • make verify — passed outside the sandbox, which blocks local test listeners.
  • npm test — 723 tests passed.
  • Regression tests cover PV recovery, measured zero, never-measured PV, independent grid totals, partial labels and the daily-share guard.
  • Browser comparison with synthetic data: before shows Unknown on the cards and 0.00 kWh in the flow; after shows the recorded subtotals in both. Desktop 1440 px and mobile 390 px render without horizontal overflow.
  • Human review of the rendered UI and a follow-up on the reporting site remain pending.

Checklist

  • The change follows VISION.md and one selected scope.
  • I checked overlapping PRs and coordinated shared files/contracts.
  • Relevant checks cover the changed behaviour and failure paths.
  • A human reviewed changed UI in a browser, or no UI changed.
  • A Changeset is included, or the change is exempt.
  • Every commit has a DCO sign-off.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T12:29:04.904480Z e003ff4 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@frahlg
frahlg merged commit 49439b2 into master Oct 13, 2026
17 checks passed
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