mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
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) <noreply@anthropic.com>
This commit is contained in:
1 parent
78b76d2ac5
commit
5827ef58cb
1 file changed
-15
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user