fix(insights): gate the tab strip on one presence read

The tab strip on every Insights page read the whole overview (22 KB),
a workouts page, the ECG list and the analytics summaries to learn which
pills to show. GET /api/insights/presence answers just that, for the
record on screen: the reading count per type after the record's module
switches, and whether it has mood entries in the last 90 days, a tracked
scheduled medication, workouts and ECG recordings. A flag whose page a
switched-off module hides is false and its rows are not read. The strip
now reads this and the saved layout; each page keeps loading its own data.
This commit is contained in:
Marc-André Bombeck committed 2026-11-12 12:56:16 +01:00
1 parent 05b5eb6942
commit 367fcd5332
12 files changed
+497 -129

No files matched your search

@@ -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": 9172,
"total": 9164,
"entries": {
"__tests__/account-payload-consumer-guard.test.ts": 2,
"__tests__/acting-account-boundary-guard.test.ts": 7,
@@ -982,7 +982,7 @@
"components/insights/hero-strip.tsx": 3,
"components/insights/insight-status-card.tsx": 12,
"components/insights/insights-edit-mode.tsx": 5,
"components/insights/insights-layout-shell.tsx": 11,
"components/insights/insights-layout-shell.tsx": 3,
"components/insights/insights-tab-strip.tsx": 35,
"components/insights/intraday-pulse-chart.tsx": 1,
"components/insights/labs-changes-card.tsx": 1,