Skip to content

feat(history): add calendar month selection - #1866

Open
bferanmi806-sketch wants to merge 4 commits into
srcfl:masterfrom
bferanmi806-sketch:feat/1318-calendar-month-history
Open

bferanmi806-sketch wants to merge 4 commits into
srcfl:masterfrom
bferanmi806-sketch:feat/1318-calendar-month-history

Conversation

@bferanmi806-sketch

@bferanmi806-sketch bferanmi806-sketch commented Oct 26, 2026 •

Copy link
Copy Markdown

Summary

Implements #1318: the four shared history tiles and pie view can show this month, last month, or a month selected with the native picker. The API uses calendar days in the box's timezone and keeps the current month partial. EV-cost endpoints are unchanged.

Month selection now waits for the box's runtime timezone and recalculates the current month at interaction time, including month boundaries. A custom selection no longer highlights This month. Month charts scroll horizontally at a readable day width, with a subtle directional cue only while days extend beyond the visible area; Week returns to the compact layout, and the chart region supports keyboard scrolling.

Validation

  • Final Linux web suite: 903 tests passed; focused history regressions: 11 passed. JavaScript syntax and diff whitespace checks passed.
  • Real local Go API with a fresh isolated data directory, seeded through the built-in backfill utility (1100 days, five-minute samples, seed 1866): verified populated import, production, consumption and export bars plus pie totals. Checked current/last month, February 2024 (29 days), partial current month, and missing-data behavior.
  • Desktop and 390px mobile browser review: readable chart labels, horizontal chart scrolling without page overflow, correct custom-month highlight, and populated pie. Before/after screenshots retained for the author's human review.
  • A pass-through proxy held September's actual API response for 2.5 seconds. Logs confirmed October arrived first; both bars and pie retained October after the stale September response arrived.
  • Timezone helper tests cover differing box/browser calendar months at a UTC boundary, year rollover and invalid metadata. Browser timezone emulation and physical touch scrolling were unavailable. ArrowRight scrolling worked. Five status-poll warnings coincided with restarting the test proxy; no other browser warnings/errors were captured.
  • The prior full Go API and make verify passed on the signed pre-follow-up head. This follow-up changes only web files, so the full Go checks were not repeated. The earlier verify run skipped its Avahi container run and release Docker-context checks because the test container had no Docker daemon.

Integration and review

Still draft pending the author's visual review. Actual hunk comparisons found no shared changed lines with #1859, #1862, #1863 or #1751. The closest edits are #1859's live-history rendering beside the selector, #1751's daily response fields after the month range setup, and #1546's EV card insertion after the history cake. Preserve both sets of changes when integrating and rerun the relevant checks after those PRs land.

Fork Actions runs have required upstream approval (action_required, zero jobs/logs). The repository policy endpoint returned 403, so the exact approval rule could not be confirmed. A maintainer needs to inspect and approve the runs if required. No reviewers have been requested.

Visual comparison

Populated energy history from the actual local API. Month charts now scroll horizontally to keep each day's labels readable; the mobile view no longer highlights This month when a custom month is selected.

View Before After
Desktop Desktop before Desktop after
Mobile viewport Mobile before Mobile after

Mobile captures use a browser viewport, not a physical phone. These images are for the author's visual review; the PR remains a draft.

Add this-month, last-month, and a month picker to the shared history tiles. Aggregate each month using local calendar boundaries and keep the current month partial.

Signed-off-by: Balogun Feranmi <bferanmi806@gmail.com>
Signed-off-by: Balogun Feranmi <bferanmi806@gmail.com>
@bferanmi806-sketch
bferanmi806-sketch force-pushed the feat/1318-calendar-month-history branch from ffcdb6e to 20f9229 Compare October 28, 2026 15:35
Signed-off-by: Balogun Feranmi <bferanmi806@gmail.com>
Signed-off-by: Balogun Feranmi <bferanmi806@gmail.com>
@bferanmi806-sketch
bferanmi806-sketch marked this pull request as ready for review October 28, 2026 21:01
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