chore: remove the dashboard's pre-snapshot feed

NEXT_PUBLIC_DASHBOARD_SNAPSHOT=false built a dashboard that read its
tiles from two analytics slices, the widget layout, the mood analytics
and the thresholds instead of the one snapshot cell. It took a rebuilt
image to reach, and the snapshot has been the only path the published
image runs since it became the default. The flag, its readers, the
legacy reads in the dashboard hook and tile context, the slim and thick
merge helper, the build-time toggle notes in .env.production.example and
the self-hosting guide, and the tests that pinned the legacy wiring go.
This commit is contained in:
Marc-André Bombeck committed 2026-11-12 13:20:16 +01:00
1 parent d99456138b
commit 9dc519dd85
26 files changed
+106 -729

No files matched your search

@@ -1,7 +1,7 @@
{
"$comment": "Production functions over 200 lines, keyed \"file :: name\", and their length. Maintained by src/__tests__/source-size-ratchet.test.ts.",
"count": 336,
"total": 109385,
"total": 109383,
"entries": {
"app/achievements/page.tsx :: AchievementsPage": 206,
"app/api/admin/backups/upload/route.ts :: apiHandler(arg)": 275,
@@ -38,7 +38,7 @@
"app/api/record-settings/[family]/route.ts :: apiHandler(arg) #2": 262,
"app/api/user/ai-provider/route.ts :: apiHandler(arg) #2": 250,
"app/api/withings/callback/route.ts :: apiHandler(arg)": 247,
"app/auth/login/page.tsx :: LoginPage": 569,
"app/auth/login/page.tsx :: LoginPage": 567,
"app/auth/register/page.tsx :: RegisterPage": 285,
"app/coach/conversations/page.tsx :: CoachConversationsBody": 249,
"app/coach/plans/page.tsx :: CoachPlansBody": 216,
@@ -1,7 +1,7 @@
{
"$comment": "Comment lines that open with a release version, per file under src/. Maintained by src/__tests__/version-stamp-ratchet.test.ts.",
"count": 2876,
"total": 9161,
"count": 2872,
"total": 9153,
"entries": {
"__tests__/account-payload-consumer-guard.test.ts": 2,
"__tests__/acting-account-boundary-guard.test.ts": 7,
@@ -70,7 +70,6 @@
"__tests__/unit-preference-display-guard.test.ts": 2,
"__tests__/v1391-additive-contract.test.ts": 1,
"__tests__/write-rate-limit-guard.test.ts": 1,
"app/__tests__/dashboard-analytics-split.test.ts": 2,
"app/__tests__/dashboard-chart-reveal.test.tsx": 2,
"app/__tests__/dashboard-suspense-boundaries.test.ts": 2,
"app/__tests__/dashboard-tile-strip-skeleton.test.ts": 4,
@@ -1791,7 +1790,6 @@
"lib/analytics/__tests__/effective-range.test.ts": 1,
"lib/analytics/__tests__/glucose-panel-coherence.test.ts": 1,
"lib/analytics/__tests__/glucose-panel-window.test.ts": 2,
"lib/analytics/__tests__/merge-slim-thick.test.ts": 3,
"lib/analytics/__tests__/mood-series.test.ts": 1,
"lib/analytics/__tests__/range-delta.test.ts": 1,
"lib/analytics/__tests__/resting-pulse.test.ts": 1,
@@ -1824,7 +1822,6 @@
"lib/analytics/correlations.ts": 1,
"lib/analytics/intraday-pulse-io.ts": 2,
"lib/analytics/intraday-pulse.ts": 3,
"lib/analytics/merge-slim-thick.ts": 2,
"lib/analytics/mood-series.ts": 2,
"lib/analytics/range-delta.ts": 1,
"lib/analytics/range-shared.ts": 1,
@@ -1929,7 +1926,6 @@
"lib/dashboard/__tests__/meds-today.test.ts": 1,
"lib/dashboard/__tests__/score-narrative.test.ts": 1,
"lib/dashboard/__tests__/score-rings.test.ts": 1,
"lib/dashboard/__tests__/snapshot-flag.test.ts": 1,
"lib/dashboard/__tests__/snapshot.test.ts": 15,
"lib/dashboard/__tests__/target-bands.test.ts": 2,
"lib/dashboard/bands.ts": 1,
@@ -136,10 +136,6 @@ const NOT_OPERATOR_CONFIGURABLE: Readonly<Record<string, string>> = {
"CI-only knob for the same nightly eval workflow",
HEALTHLOG_MCP_TOKEN:
"read by the local stdio MCP bridge the operator runs on their own machine; the production image strips tsx so it cannot run there",
// --- A whitelist entry would be obeyed by half the readers. ---
NEXT_PUBLIC_DASHBOARD_SNAPSHOT:
"NEXT_PUBLIC_* is inlined into the client bundle at build time and three of its four readers are client components, so a runtime value would steer the server half only — a split-brain worse than no knob. .env.production.example already documents it as a build-time toggle and says it is deliberately absent from the whitelist; adding it would make that note false.",
};
function sourceFiles(): string[] {