refactor(insights): tighten the subpage spine and clarify the VO2 max chart

Pull the subpage spine to a denser space-y-3/4 rhythm to match the tighter
stat strip, and refresh the stale brush comment now that the windowed stats
are wired. Give the cardio-fitness page its Gauge stat-strip glyph so VO2
max leads with the same standard treatment as the other HealthKit metrics;
the dedicated subpage already renders the full chart. Clarify the VO2 row's
sparse-series note.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.8 committed 2026-06-05 13:49:46 +02:00
1 parent d0d0f49385
commit 1f00946bfe
3 files changed
+14 -9

No files matched your search

+1
View File
@@ -24,6 +24,7 @@ export default function InsightsCardioFitnessPage() {
color="#bd93f9"
unit="mL/(kg·min)"
yAxisUnit="mL/(kg·min)"
statIcon={Gauge}
emptyStateIcon={<Gauge className="size-6" />}
emptyStateCtaType={null}
coachPrefill="I haven't logged any cardio-fitness (VO₂ max) data yet — what does this metric tell me about my health, and how do I improve it?"
+6 -8
View File
@@ -168,7 +168,7 @@ export function SubPageShell({
// state + renders the sheet, so the gear and the card don't have to
// share a parent beyond this shell.
<TargetAdjustProvider>
<div data-slot="insights-subpage" className="space-y-4 md:space-y-5">
<div data-slot="insights-subpage" className="space-y-3 md:space-y-4">
{/* v1.8.7.1 — back-nav leads the page, above the heading. */}
{backLink}
<header className="space-y-1.5">
@@ -262,13 +262,11 @@ export function SubPageShell({
brand-new-metric paths. Numbers-first is the Apple-Health /
Withings / Oura detail-screen convention.
The stats describe the full range. Recomputing them for a window
the user brushes / selects in the chart below would mean lifting the
chart's domain into this shell so both the chart and the strip read
it — but the shared `<HealthChart>` (also driving the dashboard) has
no Recharts `<Brush>` or domain-change callback and keeps its range
state internal, so that wiring is left for a later release to avoid
destabilising the chart. */}
v1.12.7 — the stats are chart-reactive: when the user brushes a
window in the chart below, the page lifts the chart's per-type
windowed Min / Max / Median / Mean and threads it back into the
strip, which swaps the header to a "selected range" pill. No
selection falls back to the cheap full-range summary. */}
{statStrip}
{/* v1.12.6 — the canonical spine body: intro (header) → stat strip
(above) → chart → target card → assessment. The page renders
@@ -193,7 +193,13 @@ export function Vo2MaxChartRow({
{/* Trend chart. The chartKey isolates per-chart overlay prefs from
the dashboard VO2 tile and from the pulse chart sitting above
it on the same page. */}
it on the same page.
The chart mounts as soon as there is at least one reading. VO₂ max
arrives from Apple Health at most every few days, so the series is
inherently sparse; the line carries a visible dot per point
(`dot r=3`), so a one- or two-sample series still reads as a real
chart. A zero-reading account keeps the short onboarding note. */}
{hasData ? (
<HealthChartDynamic
chartKey="vo2Max"