fix(insights): place a glucose day in progress against the same hours

The usual-range strip on a metric page placed the latest single reading
against a band built from whole-day means. For glucose the day mean climbs
with every meal, so at nine in the morning a fasting reading sat under a
band of whole days and the strip said "below your range" on an ordinary
morning; the MCP baseline read reported the same.

Glucose is now placed by its day mean. A day still in progress, in the
reader's own zone, is held against the earlier days cut at the local time
of today's latest reading, the comparison the health status already makes;
with fewer than seven earlier days that have readings in those hours there
is no verdict. The baseline carries `basis: "sameHours"` on the coach-read
route and the MCP read, and the strip names the range as the one for this
time of day, in all seven locales. Other metrics keep their placement.
This commit is contained in:
Marc-André Bombeck committed 2026-10-06 20:29:57 +02:00
1 parent 362818418e
commit 3e968f03a9
21 files changed
+518 -40

No files matched your search

+7
View File
@@ -59427,6 +59427,13 @@ components:
minimum: -9007199254740991
maximum: 9007199254740991
description: Distinct days behind the band, for transparency.
basis:
description: Present when today is still in progress for a metric whose day mean moves with the hour (blood glucose).
`latest` is then today's mean so far and `low` / `high` the usual range for the same hours of the
earlier days, not the whole-day band; a client naming the range says it is the one for this time of
day. Absent for the whole-day comparison.
type: string
const: sameHours
required:
- low
- high