From 742faffdda6e9db3c329457055130f22ef17dc3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 18 Jun 2026 22:55:22 +0200 Subject: [PATCH] refactor(dashboard): drop the duplicate band-builder export buildTargetBands was a same-file alias of buildDashboardBands, which the dead-code gate flags as a duplicate export. Keep the historic name only as a re-export alias from the snapshot module, so callers and the parity test are unchanged while bands.ts exposes a single builder. --- src/lib/dashboard/bands.ts | 9 +++------ src/lib/dashboard/snapshot.ts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib/dashboard/bands.ts b/src/lib/dashboard/bands.ts index 8f2d1aed0..d7d7ad397 100644 --- a/src/lib/dashboard/bands.ts +++ b/src/lib/dashboard/bands.ts @@ -135,9 +135,6 @@ export function buildDashboardBands(profile: { }; } -/** - * Snapshot-era alias. The snapshot builder and its parity test still - * import `buildTargetBands`; keep the name pointing at the canonical - * builder so neither has to change. - */ -export const buildTargetBands = buildDashboardBands; +// The snapshot builder re-exports `buildDashboardBands` under the historic +// `buildTargetBands` name (see dashboard/snapshot.ts) so callers and the +// parity test keep working without a duplicate export living in this file. diff --git a/src/lib/dashboard/snapshot.ts b/src/lib/dashboard/snapshot.ts index 228c42814..4a6b809aa 100644 --- a/src/lib/dashboard/snapshot.ts +++ b/src/lib/dashboard/snapshot.ts @@ -78,7 +78,7 @@ import { } from "@/lib/dashboard/meds-today"; import { computeUserHealthScoreFastPath } from "@/lib/analytics/health-score-fast-path"; import { - buildTargetBands, + buildDashboardBands as buildTargetBands, type DashboardTargetBands, } from "@/lib/dashboard/bands"; import type {