fix(deadline): a date-only job is late only after its day #208
No reviewers
Labels
No labels
adr
android
area/calendar
area/design-system
area/i18n
area/jobs
area/offline
area/server
area/testing
bug
ci
duplicate
enhancement
help wanted
invalid
notifications
question
reliability
security
severity/low
severity/medium
tracking
web
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eagraiclainne/app!208
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/date-only-lateness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #186.
Both clients asked
deadline < nowand stopped there. A date-only deadlineis stored as local midnight, so a job due today was drawn late from 00:00 —
flagged for the whole day it was actually due.
The server never agreed:
reminder.gocompares dates, ringing JobDue onthe due date and JobOverdue only from the day after. This closes a live
client/server disagreement rather than adjusting a preference. A timed
deadline keeps its exact semantics — late at 09:45 means late at 09:45.
conformance/deadline.jsonpinned the old behaviour in a case whose nameasserted it, so the case is renamed and flipped, and four more pin the
boundary in both directions and the unchanged timed cases.
Late is derived on the device, so it needs something to make a card flip at
09:45 without a refresh —
nowwas computed per render and nothing ticked.Both surfaces now share one heartbeat: on web a module-level singleton
behind
useSyncExternalStore, aimed at the next minute boundary ratherthan a drifting interval, waking on
visibilitychangeandfocus; onAndroid a lifecycle-aware
rememberNowthat does not tick in thebackground and re-reads the clock on resume.
Determinism lives in the value, not the timer: the snapshot is the
truncated minute, so a frozen clock returns an identical instant however
often the timer fires. Every golden suite was run — web screens, live
pages, and Roborazzi — and no golden moved, because every seeded
deadline is timed and no fixture sits in the window the rule changes.
🤖 Generated with Claude Code
Test report
Coverage: 26.9%
Updated by the check workflow · commit
133570be03Android test report
Coverage: 2.9% of lines
Updated by the android workflow · commit
133570be03bf1925c317133570be03