fix(dashboard): hand the preloaded snapshot over as a promise, not a cache write

Prefetching the snapshot into the query cache before hydration made the
server-rendered skeleton disagree with the first client render. The
early kickoff stays, but the response now commits through the mounted
query itself, so the speedup keeps none of the mismatch. The dead
nudge-resolver leftover goes with it.
This commit is contained in:
Marc-André Bombeck committed 2026-06-11 16:15:24 +02:00
1 parent 40f7196c20
commit 6cca9b83aa
3 files changed
+161 -20

No files matched your search

-10
View File
@@ -316,16 +316,6 @@ export function resolveMoodReminderHour(raw: unknown): number {
return parseNotificationPrefs(raw).mood.reminderHour;
}
/**
* v1.15.20 — cron-side helper. Returns `true` when the proactive Coach
* nudge may fire for this user (the default). Tolerates a null /
* drifted prefs row. The nudge cron layers this on top of the
* disableCoach / kill-switch / provider gates.
*/
export function resolveCoachNudgesEnabled(raw: unknown): boolean {
return parseNotificationPrefs(raw).coach.nudgesEnabled;
}
/**
* v1.16.5 — fully-resolved Coach-nudge view for the cron: the master
* switch, the three per-group toggles, and the frequency cap mapped to