Serve the device's day strain on the strain page when no proxy exists

The recovery page charts the band's own DAY_STRAIN while the strain
score page read only the computed proxy, so one account showed weeks of
strain on one page and 'not enough data' on the other. Without a proxy
row in the window the derived strain read now falls back to DAY_STRAIN:
the score is the reading as a share of the device scale, an additive
'device' block carries the native value, and the course below the card
charts that same series.
This commit is contained in:
Marc-André Bombeck committed 2026-10-08 18:17:20 +02:00
1 parent 605d9b1fb4
commit ac482c508d
13 files changed
+241 -13

No files matched your search

+18
View File
@@ -83586,6 +83586,24 @@ components:
- weight
additionalProperties: false
- type: "null"
device:
description: STRAIN only — present when no computed strain score exists in the window and the score is served from the
device's own DAY_STRAIN instead. `score` is then `value` as a 0–100 share of `scaleMax`. Absent when the
computed proxy is the source.
anyOf:
- type: object
properties:
value:
type: number
description: The device's latest day strain on its own scale.
scaleMax:
type: number
description: Top of the device scale (21 for WHOOP day strain).
required:
- value
- scaleMax
additionalProperties: false
- type: "null"
required:
- score
- band