Skip to content

feat(ev): show the ready time on the household clock - #78

Merged
frahlg merged 1 commit into
mainfrom
feat/ev-ready-time-household-wire
Oct 12, 2026
Merged

frahlg merged 1 commit into
mainfrom
feat/ev-ready-time-household-wire

Conversation

@frahlg

@frahlg frahlg commented Oct 12, 2026

Copy link
Copy Markdown
Member

Problem

The app shows the car's ready time by turning the box's time_of_day_min_utc into a clock time with today's offset in the phone's zone. A phone abroad shows and saves the wrong time at home. srcfl/ftw#1586 adds time_of_day_min, the ready time on the household clock.

Change

  • toLoadpoint reads time_of_day_min into schedule.timeOfDayMin when it is present and in range; null from an older box.
  • readyClock and readyInput show the household minute as it is. Without it they fall back to localClock and utcMinutesToLocalInput, as before.
  • The EvPanel save sends time_of_day_min and time_of_day_min_utc. A box with feat(api): send the EV ready time on the household clock ftw#1586 uses the first; an older box reads the second, as today.
  • The sim keeps the household clock as the box does: it serves both fields, the household minute wins on PUT, and a value out of range gets 400.
  • The comment on localInputToUtcMinutes said a DST change moves the deadline. That stopped being true with fix(loadpoint): keep the EV ready time on the household clock ftw#1582; the comment now says what the UTC minute is for.

Paired with srcfl/ftw#1586. Either side can merge first: this app against an older box sends the UTC minute it always sent, and an older app against the new box is an old client the box still serves.

contract/registry.yaml does not change. Fields of HTTP bodies are not registry names; time_of_day_min_utc is not there either.

Evidence

  • npm run verify passes: 1062 tests, svelte-check and build.
  • src/lib/format/ev.test.ts, src/views/EvPanel.svelte.test.ts and tests/api-passthrough.test.ts pass with TZ set to Europe/Stockholm, America/New_York and Asia/Kolkata.
  • Browser review in the dev sim at phone size: the goal reads "84 % Ready by 07:00 AM · every day"; setting 06:30 in Change goal saved it and the sentence read "06:30 AM" after the reread. The sim runs in the browser's zone, so this review shows the save path, not a second zone; the zone cases are in the tests above and in the box review in feat(api): send the EV ready time on the household clock ftw#1586.

🤖 Generated with Claude Code

Read time_of_day_min when the box sends it, so a phone in another time
zone shows and saves the time at home. Send it with the UTC minute, so
an older box still works. The sim keeps the household clock the way the
box does. The old note that a DST change moves the deadline was wrong
since srcfl/ftw#1582.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T15:23:49.031303Z d506a84 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 d506a84 Commit Preview URL

Branch Preview URL
Oct 12 2026, 03:22 PM

@frahlg
frahlg merged commit b75df8b into main Oct 12, 2026
3 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