fix(charts,medications): hold the overdue dose on the card and floor non-negative axes

A dose past its slot time but still inside its catch-up window now stays
on the medication card as overdue and takeable instead of yielding to
the next occurrence — the next-due field can therefore carry a past open
slot, flagged with nextDueOverdue. Y-axis padding no longer dips below
zero for series that cannot be negative, so a steps chart stops
suggesting minus nine hundred steps.
This commit is contained in:
Marc-André Bombeck committed 2026-06-10 22:41:28 +02:00
1 parent e9084410e2
commit bcbb05c770
18 files changed
+532 -44

No files matched your search

+34 -10
View File
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: HealthLog API
version: 1.16.1
version: 1.16.3
description: >-
Self-hosted personal-health-tracking PWA — public API surface for the iOS native client and external ingest.
@@ -8027,10 +8027,17 @@ components:
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
- type: "null"
description: v1.7.0 server-computed next due instant across all the medication's schedules (earliest
description: "v1.7.0 server-computed next due instant across all the medication's schedules (earliest
`nextOccurrenceAfter`). Read-only — computed, not stored. NULL when no schedule has an upcoming slot
(paused, one-shot in the past, `endsOn` crossed, every schedule PRN). The list GET is cached 60 s, so a 60 s
staleness is accepted.
(paused, one-shot in the past, `endsOn` crossed, every schedule PRN). v1.16.4 — when an unresolved slot's
anchor has passed but the catch-up band is still open (`anchor < now <= overdueEnd`, current schedule era),
this carries THAT slot (a past instant) with `nextDueOverdue: true` instead of jumping to the next future
slot. The list GET is cached 60 s, so a 60 s staleness is accepted."
nextDueOverdue:
type: boolean
description: "v1.16.4 — true when `nextDueAt` is an OPEN overdue slot: its anchor has passed, `now` is still inside the
slot's catch-up band, and no taken / skipped / auto-missed row resolves it. False for a regular future
next-due (and when `nextDueAt` is null). Read-only — computed, not stored."
startsOn:
anyOf:
- type: string
@@ -8092,6 +8099,7 @@ components:
- pausedAt
- snoozedUntil
- nextDueAt
- nextDueOverdue
- startsOn
- endsOn
- oneShot
@@ -8202,10 +8210,17 @@ components:
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
- type: "null"
description: v1.7.0 server-computed next due instant across all the medication's schedules (earliest
description: "v1.7.0 server-computed next due instant across all the medication's schedules (earliest
`nextOccurrenceAfter`). Read-only — computed, not stored. NULL when no schedule has an upcoming slot
(paused, one-shot in the past, `endsOn` crossed, every schedule PRN). The list GET is cached 60 s, so a 60 s
staleness is accepted.
(paused, one-shot in the past, `endsOn` crossed, every schedule PRN). v1.16.4 — when an unresolved slot's
anchor has passed but the catch-up band is still open (`anchor < now <= overdueEnd`, current schedule era),
this carries THAT slot (a past instant) with `nextDueOverdue: true` instead of jumping to the next future
slot. The list GET is cached 60 s, so a 60 s staleness is accepted."
nextDueOverdue:
type: boolean
description: "v1.16.4 — true when `nextDueAt` is an OPEN overdue slot: its anchor has passed, `now` is still inside the
slot's catch-up band, and no taken / skipped / auto-missed row resolves it. False for a regular future
next-due (and when `nextDueAt` is null). Read-only — computed, not stored."
startsOn:
anyOf:
- type: string
@@ -8254,6 +8269,7 @@ components:
- pausedAt
- snoozedUntil
- nextDueAt
- nextDueOverdue
- startsOn
- endsOn
- oneShot
@@ -12364,10 +12380,17 @@ components:
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
- type: "null"
description: v1.7.0 server-computed next due instant across all the medication's schedules (earliest
description: "v1.7.0 server-computed next due instant across all the medication's schedules (earliest
`nextOccurrenceAfter`). Read-only — computed, not stored. NULL when no schedule has an upcoming slot
(paused, one-shot in the past, `endsOn` crossed, every schedule PRN). The list GET is cached 60 s, so a 60 s
staleness is accepted.
(paused, one-shot in the past, `endsOn` crossed, every schedule PRN). v1.16.4 — when an unresolved slot's
anchor has passed but the catch-up band is still open (`anchor < now <= overdueEnd`, current schedule era),
this carries THAT slot (a past instant) with `nextDueOverdue: true` instead of jumping to the next future
slot. The list GET is cached 60 s, so a 60 s staleness is accepted."
nextDueOverdue:
type: boolean
description: "v1.16.4 — true when `nextDueAt` is an OPEN overdue slot: its anchor has passed, `now` is still inside the
slot's catch-up band, and no taken / skipped / auto-missed row resolves it. False for a regular future
next-due (and when `nextDueAt` is null). Read-only — computed, not stored."
startsOn:
anyOf:
- type: string
@@ -12414,6 +12437,7 @@ components:
- pausedAt
- snoozedUntil
- nextDueAt
- nextDueOverdue
- startsOn
- endsOn
- oneShot