Skip to content

fix(prices): sync current interval display with Core - #64

Merged
frahlg merged 1 commit into
mainfrom
fix/price-current-interval
Sep 7, 2026
Merged

fix(prices): sync current interval display with Core#64
frahlg merged 1 commit into
mainfrom
fix/price-current-interval

Conversation

@frahlg

@frahlg frahlg commented Sep 7, 2026

Copy link
Copy Markdown
Member

The price chart used a one-hour window for NOW, so quarter-hour prices could show a past price. Tomorrow also labeled a future price as NOW.

Copy the corrected chart from Core commit fbd29b50781fbd7c11dd297cd3e9a3845c5b746f, with its provenance and recorded digest. The body is byte-identical to Core. NOW uses the interval that contains the current time; a future window or gap shows —. The wire still owns totals, and the fed chart makes no HTTP requests.

Paired Core change: srcfl/ftw#1102 (merged).

Validation: added wire-to-DOM regressions for the quarter boundary and Tomorrow; both reproduce the old output. npm run verify passed with 1,019 tests and one existing skipped test, zero type errors/warnings, and a production build. Contract and token checks pass against the paired Core checkout. The first full run hit the existing asynchronous Energy chart test; the targeted run and full rerun passed. Browser checks on the production build passed at desktop and 390 px mobile width with simulated data. Real encrypted pairing was not part of this test.


Note

Low Risk
Display-only vendored chart sync with regression tests; no auth, protocol, or pricing calculation changes in the app layer.

Overview
Re-vendors ftw-price-chart.js from Core so the stats row’s now line matches the active price slots instead of assuming one-hour windows or picking the nearest slot.

The chart now derives now via buildPriceSummary, which only shows a value when wall-clock time falls inside a slot (including 15-minute intervals). Viewing Tomorrow or a window with no covering slot shows instead of a misleading future or past price. The vendor digest and a patch changeset document the behavior; fed wire tests lock in the quarter-hour boundary and Tomorrow cases without HTTP fetches.

Reviewed by Cursor Bugbot for commit f808dd8. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_9baba175-9f01-41e3-a87b-468ceb6879c8)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 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-09-07T16:49:35.640373Z f808dd8 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.

@cloudflare-workers-and-pages

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 f808dd8 Commit Preview URL

Branch Preview URL
Sep 07 2026, 04:47 PM

@frahlg
frahlg merged commit 013cc33 into main Sep 7, 2026
4 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