mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 22:26:13 +00:00
chore: correct comments that describe the removed clear push and API cache
The dose tag comment still explained the clear push sent for a logged dose, the session-end wipe comment still named the worker's API cache as a live layer, and the worker's header and foreign-origin note did not match what the worker stores and when it resumes.
This commit is contained in:
1 parent
d15fb27bce
commit
e498a44d70
4 files changed
+14
-23
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$comment": "Comment lines that open with a release version, per file under src/. Maintained by src/__tests__/version-stamp-ratchet.test.ts.",
|
||||
"count": 2876,
|
||||
"total": 9163,
|
||||
"count": 2875,
|
||||
"total": 9162,
|
||||
"entries": {
|
||||
"__tests__/account-payload-consumer-guard.test.ts": 2,
|
||||
"__tests__/acting-account-boundary-guard.test.ts": 7,
|
||||
@@ -2581,7 +2581,6 @@
|
||||
"lib/notifications/delegated-intake.ts": 2,
|
||||
"lib/notifications/dispatch-localised.ts": 3,
|
||||
"lib/notifications/dispatcher.ts": 3,
|
||||
"lib/notifications/dose-tag.ts": 1,
|
||||
"lib/notifications/medication-intake-sync.ts": 1,
|
||||
"lib/notifications/senders/__tests__/apns.test.ts": 7,
|
||||
"lib/notifications/senders/__tests__/push-attempt-record.test.ts": 1,
|
||||
|
||||
@@ -626,10 +626,10 @@ export function useAccountOnceMounted(): AuthUser | null {
|
||||
* former explicit `setQueryData(null)` + `invalidateQueries(["auth"])`.
|
||||
*
|
||||
* Then `clearOfflineCachesForSessionEnd()` wipes the persisted layers — the
|
||||
* IndexedDB query snapshot, the SW offline read-data cache (`healthlog-data-*`),
|
||||
* and the SW page cache (`healthlog-pages-*`, cached navigation HTML). The static
|
||||
* cache (hashed chunks, icons) carries no PII and stays intact to avoid a
|
||||
* needless re-download. Best-effort; never blocks the redirect.
|
||||
* IndexedDB query snapshot, the SW page cache (`healthlog-pages-*`, cached
|
||||
* navigation HTML) and any API cache an older worker left (`healthlog-data-*`).
|
||||
* The static cache (catalogs, icons, fonts, images) carries no PII and stays
|
||||
* intact to avoid a needless re-download. Best-effort; never blocks the redirect.
|
||||
*/
|
||||
export function clearCachesForSessionEnd(queryClient: QueryClient): void {
|
||||
queryClient.clear();
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
/**
|
||||
* v1.18.4 — stable Web Push notification tag for a medication dose slot.
|
||||
* Stable notification tag for a medication dose slot, `(medicationId,
|
||||
* scheduledFor instant)`. A repeated reminder for the same dose replaces the
|
||||
* one already shown instead of stacking a second.
|
||||
*
|
||||
* A PWA self-hoster with no Apple Developer account has no Live Activity to
|
||||
* end when a dose is logged. Instead the server pushes a `type: "clear"`
|
||||
* web-push that the service worker turns into `getNotifications({ tag })` +
|
||||
* `notification.close()`. For that to work the REMINDER push and the CLEAR
|
||||
* push must agree on a single, stable tag per dose slot.
|
||||
*
|
||||
* The slot is uniquely identified by `(medicationId, scheduledFor-instant)`:
|
||||
* - the dose-due reminder fires with `scheduledAt` = the slot's ISO instant,
|
||||
* - the clear-on-taken fires with `scheduledFor` = the same ISO instant.
|
||||
*
|
||||
* `scheduledFor` is normalised through `Date` so a reminder ISO carrying
|
||||
* milliseconds and a clear ISO without them still collapse to one tag.
|
||||
* The instant is normalised through `Date`, so an ISO string with and one
|
||||
* without milliseconds give the same tag.
|
||||
*/
|
||||
export function medicationDoseTag(
|
||||
medicationId: string,
|
||||
|
||||
Reference in new issue
Block a user