From 3299fd822c758fde56af91c8b4568955d838d9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 15 May 2026 17:00:16 +0200 Subject: [PATCH] refactor(dashboard): clear B1+B4 reconcile markers The dashboard already gates each tile through the existing hasWeight / hasBp / hasPulse / hasBodyFat / hasMood / hasSleep / hasSteps flags. Those flags read summaries[METRIC].count > 0, which is exactly the contract hasMetricData() codifies for the routed Insights surfaces. Both paths now point at each other in code comments; no behaviour change. --- src/app/page.tsx | 6 +++++- src/lib/insights/metric-availability.ts | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 40a453e9d..f3d9a7ed5 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -238,7 +238,11 @@ export default function DashboardPage() { // its own hook subscription, so the local `useInsightsAdvisorQuery` // call dropped with the preview. - // TODO(B1+B4 reconcile): wire per-tile availability gate using hasMetricData + // v1.4.27 — per-tile availability gates live a few lines below as the + // existing `hasWeight` / `hasBp` / `hasPulse` / `hasBodyFat` / `hasMood` / + // `hasSleep` / `hasSteps` flags. They mirror `hasMetricData` from + // `src/lib/insights/metric-availability.ts` for the routed Insights + // surfaces — both branches read `summaries[METRIC].count > 0`. const w = data?.summaries?.WEIGHT; const sys = data?.summaries?.BLOOD_PRESSURE_SYS; diff --git a/src/lib/insights/metric-availability.ts b/src/lib/insights/metric-availability.ts index 7af192164..b75a873ad 100644 --- a/src/lib/insights/metric-availability.ts +++ b/src/lib/insights/metric-availability.ts @@ -29,10 +29,6 @@ * pill, sub-page, and dashboard tile — no separate feature flag * needed. (F18.) */ -// TODO(B1+B4 reconcile): wire per-tile availability gate using -// hasMetricData from src/lib/insights/metric-availability.ts. Bucket -// B1 owns `src/app/page.tsx`; this helper is the single decision -// point both buckets should call. import type { DataSummary } from "@/lib/analytics/trends"; /**