mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
Refetch the inactive daily reads after a quick-add intake
The medication quick-add mounts from the bottom-nav capture picker on every page, not only on the dashboard, so its bare dependent-key bundle invalidation (default active refetch) left the unmounted Today digest and dashboard snapshot stale until the next poll — back on the home screen the dose still read as due for up to two minutes. Route the submit through invalidateMedicationReads, the one blessed entry point that pairs the bundle with the forced inactive refetch, and drop the surface's allowlist entry in the refetch guard: its dashboard-only rationale stopped being true when the capture picker started mounting this form globally. The other capture-picker forms (measurement, mood) already pair the refetch.
This commit is contained in:
1 parent
767a2b039b
commit
e991ef7c77
3 files changed
+70
-12
No files matched your search
@@ -72,10 +72,6 @@ function count(s: string, re: RegExp): number {
|
||||
* surface where the missing refetch is intentional, grouped by reason.
|
||||
*/
|
||||
const NO_REFETCH_ALLOWLIST = [
|
||||
// The digest is ACTIVE on the dashboard where the quick-add lives, so the
|
||||
// default active invalidation already refetches it (audit B, §1: "not the
|
||||
// bug").
|
||||
"components/dashboard/medication-intake-quick-add.tsx",
|
||||
// Injection-site metadata saved AFTER an already-recorded (and already
|
||||
// refetched) take — it does not change any dose's due/taken state.
|
||||
"components/medications/glp1-medication-card.tsx",
|
||||
|
||||
Reference in new issue
Block a user