fix(dashboard): paint the blood-glucose tile for untagged readings

Tile eligibility filtered the four named contexts against the per-context
summaries and asked whether any of them held readings. An account whose
source records no meal time matched none of them, so the tile was omitted
with the module on, the layout toggle on, and a reading from today. Nothing
warned; the strip was simply short one card.

Move the gate out of the page into `resolveGlucoseTiles`, which walks the
shared bucket list — untagged included — and hand the caller the label key
with the summary. Both summary producers group through the shared resolver,
so `UNSPECIFIED` reaches the wire with its own count, latest value and
trend, and a tagged account still gets its per-context breakdown.

Refs #943
This commit is contained in:
Marc-André Bombeck committed 2026-09-09 23:03:21 +02:00
1 parent 9a2b1f0955
commit 5ab7a2ca81
8 files changed
+162 -51

No files matched your search

+3 -3
View File
@@ -49994,9 +49994,9 @@ components:
additionalProperties:
$ref: "#/components/schemas/MetricDataSummary"
- type: "null"
description: Per-context glucose summaries (FASTING / POSTPRANDIAL / RANDOM / BEDTIME) over the trailing 30 days,
canonical mg/dL. Contexts with no readings are omitted; the whole block is null when the glucose module is
off.
description: Per-context glucose summaries (FASTING / POSTPRANDIAL / RANDOM / BEDTIME, plus UNSPECIFIED for readings
whose source recorded no meal-time context) over the trailing 30 days, canonical mg/dL. Buckets with no
readings are omitted; the whole block is null when the glucose module is off.
glucoseClinical:
anyOf:
- $ref: "#/components/schemas/GlucoseClinicalMetrics"