mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
fix(recovery): publish why the recovery page is empty from the server
The page worked out its empty note on the client from the integrations status, so every client had to repeat the rule. The analytics summaries slice now carries `recoveryEmpty` (general, oura_permission or oura_no_resilience, null when any recovery type has a reading), decided once in resolveRecoveryEmpty from the gated summaries and the stored Oura grant. The page renders that value only, and its block list is typed to the server's recovery types so the two cannot drift. Each reason now reads as one sentence in every locale, and every reason offers the same way on, the integrations settings.
This commit is contained in:
1 parent
0ea8880923
commit
862361a224
20 files changed
+243
-171
No files matched your search
@@ -33,6 +33,7 @@
|
||||
* surface. Three named shapes capture the contract; one swiss-army
|
||||
* shape loses it.
|
||||
*/
|
||||
import type { RecoveryEmptyReason } from "@/lib/insights/recovery-empty";
|
||||
import type { DataSummary } from "@/lib/analytics/trends";
|
||||
import type { SleepSourceDiscrepancy } from "@/lib/analytics/sleep-night";
|
||||
import type { CorrelationResult } from "@/lib/insights/correlations";
|
||||
@@ -53,6 +54,11 @@ export interface SubPageAnalyticsData {
|
||||
string,
|
||||
{ lastSeenAt: string; daysAgo: number } | null
|
||||
>;
|
||||
/**
|
||||
* Why the recovery page has nothing to chart, resolved on the server
|
||||
* (`resolveRecoveryEmpty`); null when it has. Slim slice only.
|
||||
*/
|
||||
recoveryEmpty?: RecoveryEmptyReason | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user