Cap chronotype window in the shared assembler

Make computeSleepRhythmFromNights own the chronotype look-back so the dashboard
summary (a year of nights) and GET /api/sleep/rhythm (six weeks) return the
same band, mid-sleep, and social-jetlag values rather than averaging different
samples. Derive the free/work day-type from the local wake-day digits so the
classification holds in far-east timezones, and read the shared sleep-rhythm
DTO type into the client hook instead of a hand-mirrored copy.
This commit is contained in:
Marc-André Bombeck committed 2026-06-14 19:10:44 +02:00
1 parent d1ba01548f
commit 1ce1c786b6
4 files changed
+99 -59

No files matched your search

-1
View File
@@ -661,7 +661,6 @@ async function buildDashboardSummary(
sleepPriorityJson,
),
sleepNeedMinutes(sleepProfile.ageYears),
userTz,
);
const metrics: MetricCard[] = [];