From 5827ef58cb45fcd97a9d3310d8a1c3dd81bee321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Tue, 2 Jun 2026 13:32:30 +0200 Subject: [PATCH] refactor(insights): drop the unused metric-to-insight key helper The identity-cast helper had no caller and tripped the dead-code gate. Remove it and its now-orphaned type import. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/lib/insights/metric-status-registry.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/lib/insights/metric-status-registry.ts b/src/lib/insights/metric-status-registry.ts index 122648448..9484de5cb 100644 --- a/src/lib/insights/metric-status-registry.ts +++ b/src/lib/insights/metric-status-registry.ts @@ -36,7 +36,6 @@ * collect. */ import type { MeasurementType } from "@/generated/prisma/client"; -import type { InsightMetric } from "@/lib/insights/metric-availability"; /** The five shared archetypes plus the dedicated sleep template. */ export type MetricArchetype = @@ -435,17 +434,3 @@ export function metricStatusScope( ): `metric:${MetricStatusMetricId}` { return `metric:${metric}`; } - -/** - * Map a generic metric id to its `InsightMetric` key so the shared - * `hasMetricData` gate can answer the data-availability question with no - * new branch. The two vocabularies line up one-to-one for every - * registered metric except `STEPS` / `ACTIVE_ENERGY`, whose - * `InsightMetric` keys match the id directly (the divergence is only at - * the `MeasurementType` layer, which `hasMetricData` does not consult). - */ -export function metricStatusInsightKey( - metric: MetricStatusMetricId, -): InsightMetric { - return metric as InsightMetric; -}