feat(dashboard): show today's dose tally on the medication hero ring

The MED_COMPLIANCE hero ring carried the pooled 7-day adherence
percentage — a mystery number next to today-focused scores. It now
answers the question the hero poses: how many of today's doses are
done. The resolver reads takenToday/scheduledToday off the snapshot's
own medsToday block (one shared builder call, no second tally); score
stays the rounded 0..100 progress for wire compatibility and a new
additive doses field carries the taken/scheduled pair. No dose
scheduled today means no ring, and the band is progress semantics —
green once everything is taken, yellow while doses remain, never red
(a pending morning dose is not an alert state).

The web ring renders the tally (1/3) with a doses label over the ring
system's constant green arc — the same green family the compliance
surfaces in Insights paint — instead of a band gradient; the derived
rings keep their exact insights hues. ScoreRing gains documented
valueText/ariaLabel overrides for tally-shaped centres. OpenAPI
regenerated; labels land in all six locales.
This commit is contained in:
Marc-André Bombeck committed 2026-07-05 18:05:13 +02:00
1 parent 9b4f3ce56d
commit 47d638cf02
16 files changed
+236 -287

No files matched your search

@@ -158,15 +158,15 @@ const WIDGET_LABEL_KEYS: Record<DashboardWidgetId, string> = {
/**
* v1.27.7 — option labels for the hero score-ring picker. The three
* derived rings reuse their wellness-strip titles; the adherence ring
* reuses the existing "adherence (7 days)" label so the picker names
* the exact window the ring shows.
* derived rings reuse their wellness-strip titles; the dose ring names
* today's tally (the exact thing the ring shows since it moved off the
* 7-day adherence percentage).
*/
const SCORE_RING_LABEL_KEYS: Record<ScoreRingId, string> = {
READINESS: "insights.derived.composite.READINESS.title",
RECOVERY_SCORE: "insights.derived.scores.recovery",
SLEEP_SCORE: "insights.derived.composite.SLEEP_SCORE.title",
MED_COMPLIANCE: "dashboard.compliance7d",
MED_COMPLIANCE: "dashboard.hero.ringDoses",
};
export function DashboardLayoutSection({ id }: { id: string }) {