mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The target editor invalidated a bare ["insights"] array on save and reset. That literal sat outside the centralised factory, so the broad insights fan-out it intended never matched the reads, which key through insightsTargets/insightsRoot. Route the editor's reads and invalidations through userThresholds(), insightsRoot(), insightsTargets() and analytics() so a saved target actually refreshes every insights surface. Migrate the other call sites the lint rule does not reach onto the factory: the Coach conversation rail + thread reads, the per-metric personal-records badge, the per-day measurement drill-down, the dashboard intake compliance-chart fan-out, the per-medication side-effects list, the onboarding auth invalidations, the notification-preferences read, and the PWA persister's auth-me lookup. Add the matching factory keys: coachConversations, coachConversation, personalRecordsByMetric, measurementDrilldown, complianceChartInline and medicationSideEffects. Each new key reuses the prefix its reads already use so no invalidation shape drifts.