feat(insights): add a Recovery sub-page for the device-native strain scores

WHOOP and Polar record day strain, workout strain, ANS charge, cardio load, and
the day's whole-cycle average / max heart rate and kilojoule energy expenditure
— all stored end-to-end with no render host. The composite recovery score had
only its anatomy detail at /insights/scores/recovery; the raw signals around it
appeared nowhere.

Add /insights/recovery as the home for them, grouped into recharge, strain &
load, and the day's heart & energy. Each block is data-gated, so an account
without a strap or ring lands on a calm empty note rather than a broken surface.
When a recovery score is present the page cross-links to its anatomy view rather
than duplicating the ring. Server-authoritative throughout.

Give the page a single nav home alongside Workouts in the unified destination
model so it is discoverable on both the sidebar and the mobile More hub.
This commit is contained in:
Marc-André Bombeck committed 2026-06-15 00:39:18 +02:00
1 parent e063f79353
commit 866f3dc0e2
3 files changed
+272

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
"use client";
import { useTranslations } from "@/lib/i18n/context";
import { SubPageShell } from "@/components/insights/sub-page-shell";
import { RecoverySection } from "@/components/insights/recovery/recovery-section";
/**
* v1.17.1 — `/insights/recovery`.
*
* The render host for the WHOOP / Polar device-native recovery + strain scores
* that were stored end-to-end but had no page: day strain, workout strain, ANS
* charge, cardio load, and the day's whole-cycle average / max heart rate and
* kilojoule energy expenditure. The composite RECOVERY_SCORE keeps its anatomy
* detail at `/insights/scores/recovery`; this page cross-links to it and
* surrounds it with the raw signals it never surfaced.
*
* Every block is data-gated inside `<RecoverySection>`, so an account without a
* strap / ring sees only the calm empty note. Server-authoritative: the tiles
* render stored values, never a recompute.
*/
export default function InsightsRecoveryPage() {
const { t } = useTranslations();
return (
<SubPageShell
title={t("insights.recovery.title")}
description={t("insights.recovery.description")}
explainerMetric="recoveryPage"
coachLaunch
>
<RecoverySection />
</SubPageShell>
);
}