feat: add on-device Daily Coach briefings - #1737
tigercraft4 wants to merge 1 commit into
Conversation
dbdf05b to
19c02e5
Compare
|
The feature is sound and genuinely on-device — opt-in, no provider call, de-duplicated per night. The shared copy and the band input need work before it can land. The two platforms brief differently. Same feature, different words and different metrics:
"Recovery" also contradicts iOS's own vocabulary — Swift shows one number and advises on another. parts.append("Recovery \(Int(recovery.rounded()))") // 66.6 → "Recovery 67"
switch recovery ?? 50 { case 67...: … case 34..<67: … } // 66.6 → mid bandA 66.6 night renders "Recovery 67" beside the advice for the band whose ceiling is below 67. Android bands an already-rounded A missing recovery is guessed as 50, against both files' own contracts. The English is invisible to CI. No Test coverage is one changed assertion. Three new bands, three new metrics, a guess path and a truncation, and the only test change is One process note: the body says Thanks @tigercraft4 — the privacy shape here is right, and the de-dup key per scored night is the correct design. |
19c02e5 to
0eebd98
Compare
|
@ryanbr this is now rebased onto current |
Closes #1736
What this PR does
Adds an opt-in, fully on-device Daily Coach briefing after overnight data has synced and been scored. It reports only the Charge, Rest, HRV, resting-heart-rate, and sleep values that are actually available, then adds a conservative training recommendation only when Charge exists.
The notification is disabled by default, uses no provider or network request, and is de-duplicated persistently to one notification per scored night.
Review feedback addressed
Type of change
How it was tested
python3 Tools/i18n_audit.py --ci origin/main— passed.xcodebuild -project Strand.xcodeproj -scheme NOOPiOS -destination "platform=iOS Simulator,name=iPhone 17 Pro" CODE_SIGNING_ALLOWED=NO build— passed locally../gradlew :app:compileFullDebugKotlin— passed locally../gradlew :app:testFullDebugUnitTest --tests com.noop.notif.ScheduledReportPolicyTest— 18 tests passed locally, 0 failures/errors.0eebd98b: 5/5 checks passed, including the NOOPiOS and macOS builds, Android build/tests, i18n Coverage, and Source Hygiene.No real-strap test was run: this change consumes already-scored local values and does not alter BLE collection or protocol behavior.
Checklist