Jobs: derive lateness on the device — end-of-day rule and a shared minute ticker #186
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eagraiclainne/app#186
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of the jobs flow redesign (#184). The design handoff added a late-state
pass; this issue is the behaviour half of it, separate from the wording (#179)
and the card (#174).
A date-only deadline is late only after the end of that day
Both clients ask
deadline < nowand stop there (web/src/deadline.ts:23-27,android/.../Today.kt:82-85). A date-only deadline is stored as localmidnight, so a job due today is drawn late from 00:00 — red for the whole day
it is actually due.
conformance/deadline.jsonpins that as a case, named untimed today counts asoverdue past midnight,
overdue: true. The rule reverses it to false untilthe end of that day, so
isOverdue, its Android twin and the fixture changetogether, in one commit.
The server already behaves the new way.
internal/services/item/reminder.gocompares dates, so it rings
JobDueon the due date andJobOverdueonly fromthe next day. This closes a live client/server disagreement rather than
adjusting a preference.
A timed deadline legitimately keeps a different granularity: the card goes late
at 09:45 while the reminder would not ring overdue until the next day. Two
mechanisms, two granularities, both correct. Do not "fix" one to match.
A shared minute ticker
Late is derived on the device, so a card visible at 09:44 must flip at 09:45
with no refresh. Nothing does that today:
const now = new Date()is computedper render (
Jobs.tsx:233, and the same on Today), andweb/src/clock.tsholdsonly
fmtTime.Needed on both surfaces, plus a wake handler. Small, but new. The screenshot
suites pin the browser clock, so a ticker must not reintroduce nondeterminism
there.
Two rules that ride along: comparisons are always against the timestamp, never
a rendered string, and "yesterday" is computed against the reader's local
midnight.
Blocks the late state in #174 and its wording in #179.