mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
Seven mechanical cleanups, no behaviour changes: - Drop the duplicate ChartOverlayPrefs type + DEFAULT in chart-overlay-controls; re-export the canonical pair from dashboard-layout so a future fourth toggle can't drift between the UI and persistence layers. - useChartOverlayPrefs accepts null/undefined chartKey and short- circuits the dashboard-layout fetch when none is supplied. Drops the chartKey ?? "bp" fallback and the three discard-the-result ternaries in health-chart; mini-mode renders no longer subscribe to the BP chart's persisted prefs. - /api/analytics no longer pair-and-counts BP twice — the windowed helper already produces last30Days, so the headline reads it back instead of running computeBpInTargetPct on the same input. - Drop the redundant moodEntries.map shape in the achievements route; the prisma select already returns the matching shape. - Merge the five hidden-metric cases into the no-precondition block of isEarnable; the defensive comment admitted they couldn't fire. - Remove the deprecated getAchievementCategory wrapper (zero callers). - Strip six "v1.4.18 gradient removed" what-comments scattered across the chart wrappers; the polish tests pin the absence. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>