mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The hero strip, daily-briefing card and trends row all read the advisor payload through `useInsightsAdvisorQuery`, which POSTed `/api/insights/generate` without `force`. That POST generates inline on a cache miss, pinning the page-load path on the full provider chain (up to the client's 8 s abort) before the briefing paints — even though a read-only lift of `User.insightsCachedText` costs nothing. Add a read-only GET to the route that serves the cached payload immediately and, when the cache is stale or missing and a provider is configured, enqueues an out-of-band warm on the existing `insight-pregenerate` queue. The read mount now uses the GET; user-initiated regeneration keeps the POST force path. Mirrors the stale-while-revalidate posture of the per-metric status and period-narrative reads — no provider call ever sits on a navigation request.