mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 23:12:04 +00:00
fix(sleep-score): publish the rhythm floor and name it in the few-nights note
The note hard-coded "of 3" in every locale. SleepScoreValue now carries rhythmMinNights, and the sheet reads the floor from it.
This commit is contained in:
1 parent
9fe6f98fdb
commit
248b5dfd6b
11 files changed
+83
-8
No files matched your search
@@ -325,7 +325,7 @@ export const sleepScoreValue = z
|
||||
.enum(["few_nights", "no_main_sleep"])
|
||||
.optional()
|
||||
.describe(
|
||||
"Only on a null `consistency` / `timing`: why it is withheld. `few_nights` — fewer than three nights in the window have a main sleep on the clock (count in `rhythmNights`); `no_main_sleep` — the latest day had only a daytime nap. Absent otherwise.",
|
||||
"Only on a null `consistency` / `timing`: why it is withheld. `few_nights` — fewer than `rhythmMinNights` nights in the window have a main sleep on the clock (count in `rhythmNights`); `no_main_sleep` — the latest day had only a daytime nap. Absent otherwise.",
|
||||
),
|
||||
}),
|
||||
)
|
||||
@@ -337,6 +337,12 @@ export const sleepScoreValue = z
|
||||
.describe(
|
||||
"Nights in the window with a main sleep placed on the clock — what consistency and timing are computed from. A daytime nap is not one; a short night is.",
|
||||
),
|
||||
rhythmMinNights: z
|
||||
.number()
|
||||
.int()
|
||||
.describe(
|
||||
'How many `rhythmNights` consistency and timing need before they are scored; below it they carry `gap: "few_nights"`.',
|
||||
),
|
||||
series: z
|
||||
.array(z.number())
|
||||
.describe(
|
||||
|
||||
Reference in new issue
Block a user