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:
Marc-André Bombeck committed 2026-11-12 14:09:18 +01:00
1 parent d15fb27bce
commit e498a44d70
4 files changed
+14 -23

No files matched your search

+5 -13
View File
@@ -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,