refactor(vaccinations): drop the dependent-keys bundle nothing consumes yet

The dead-code gate is right: a bundle with no caller is dead code. The
capture surface brings it back with the mutation that needs it, and the
key module says what that bundle will have to evict.
This commit is contained in:
Marc-André Bombeck committed 2026-08-08 15:51:54 +02:00
1 parent b97988279e
commit 0a543abd18
2 files changed
+7 -18

No files matched your search

-14
View File
@@ -254,20 +254,6 @@ export const encounterDependentKeys = [
queryKeys.practitioners(),
];
/**
* Keys invalidated when a dose changes.
*
* The preventive-care root rides along, and it is the whole reason this is a
* bundle rather than one key: logging a dose satisfies the booster reminders
* it answers, so the checkups list is stale the moment the dose saves.
* Evicting only the immunization list would leave a booster on screen that
* the server had already moved a decade out.
*/
export const vaccinationDependentKeys = [
queryKeys.vaccinations(),
queryKeys.measurementReminders(),
];
/**
* Invalidate every key in the bundle in parallel. Use this from mutation
* `onSuccess` handlers so the call site stays a one-liner instead of repeating
+7 -4
View File
@@ -17,10 +17,13 @@
* like coverage. It belongs in the release that puts doses into one of those
* payloads, alongside the reader that makes it necessary.
*
* The one server-side cache a dose CAN move belongs to somebody else: logging
* one satisfies a booster reminder, which is a preventive-care write. That
* eviction is the reminder module's, and the client bundle below invalidates
* the reminder keys for the same reason.
* There is no dependent-keys bundle here yet either, and that omission is the
* same rule one layer up: a bundle with no caller is dead code, and the gate
* says so. When the capture surface lands it brings its own, and that bundle
* has to evict the preventive-care root alongside this one — logging a dose
* satisfies the booster reminders it answers, so the checkups list goes stale
* in the same tick. Evicting only the immunization list would leave a booster
* on screen that the server had already moved a decade out.
*/
export const vaccinationKeys = {
/**