gitoria

calendar

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitbf571badbf571badcalendar mission 008 (A8): Turn off on this device (unsubscribes the browser, server drops the device, choice kept), subscribe/refresh when the app is shown again; push gate part 3mrebf571bad/reports/008-webpush.md

3.5 KB

  1. # Report 008 (A7): calendar#9 part 2 — Web Push
  2. Branch w8-webpush (worktree A7/wt), not pushed, not deployed, no .env read. Hybriel master 0e3c9830: bin/hybriel sha256 9d957fed77d0bd7f0bfeb3b90beb358b524d24d555f63578d3340ecd63706b65, plugins/ whole from master.
  3. ## Step 1 — re-vendor (commit cf175c8). Gates, pristine re-vendored tree, own cold cache
  4. | gate | before (f9833544) | after (0e3c9830) |
  5. |---|---|---|
  6. | tests/browser.mjs | 81/0 | 81/0 |
  7. | tests/notify-paths.mjs (port 8732) | 7/0 + 3 gaps | 7/0 + 3 gaps (a run at 8788 failed only because 8795 is foreign) |
  8. | theme/check-theme.mjs | 0 problems | 0 problems |
  9. ## Step 2 — what was built (all Hybriel)
  10. - `lib/push.hl`: table push.db, `savePush` / `dropPush`, the clock (`every`), `sendPush` per due reminder, drop on 404/410, retry up to 15 min when the service answers 5xx.
  11. - `lib/push-plan.hl`: server copy of the reminder plan on hl:time `fromLocal`. WHY A COPY: **Hybriel gap**, a static that calls hl:time `fromLocal` is refused in a component's browser build ("'viaStatic' is a static … whose initializer reaches 'instantOf', a name the realm 'client' … cannot bind"). Repro: `.scratch/hltime-client/` (page.hl, calc.hl, run.mjs). Delete the copy when fixed.
  12. - Faces `calPushSave(sub, zone)` / `calPushOff(endpoint)` (calendar.hl); `month-view.hl`: tapping "Turn on notifications" (or the first pointer on a device that already allowed them) subscribes and saves; text "Reminders also reach this device when the calendar is closed." (else "…while the calendar is open on this device.").
  13. - project.hl: `CALENDAR_PUSH_PUBLIC / _PRIVATE / _SUBJECT` → pushKey / pushPrivateKey / pushSubject (all or none). `tools/vapid-keys.hl` makes the pair (hl:crypto). README "Web Push" says how deploy sets it. No key committed.
  14. ## Step 3 — proof
  15. - `tests/push.mjs` (PUSH_GATE_PORT=8788): real headless Chrome as a 390 px phone, real touch tap on the button, subscribe stubbed (headless has no push service), then the browser is CLOSED; local fake push service decrypts like a user agent. **New 9/9, old (re-vendored tree without the feature) 0/9.** Checks: page text after the tap; subscribe got the VAPID key; the encrypted push arrives once at the reminder time (0 s late) with title "Zahnarzt Push", body "Starts in 1 minute"; VAPID JWT verifies with the public key; no duplicate; on 410 the subscription is dropped (second reminder not sent to it).
  16. - Real FCM (tests/push-real.mjs, lisbeth's Chrome 155, one tab reused, under the lock): the tab subscribed through **fcm.googleapis.com** (real tap path = pointer + permission already given), the app on loreana (reverse tunnel, app only SENDS) sent at the reminder time with the page on about:blank: server log `push sent (201)`. **Not proven:** that the notification was displayed — the service worker target was gone and `getNotifications()` afterwards was empty (could be already dismissed; the page screenshot hung on lisbeth's non-visible tab). So real end-to-end display is unverified; delivery to FCM (201) is.
  17. - Evidence: /media/STORAGE/claude-scratch/atlas-evidence/A7/ (ok-2-subscribed.png: phone shot after the tap showing the new text; logs).
  18. ## Gaps
  19. 1. hl:time `fromLocal` in a browser static (above).
  20. 2. Real notification display on a device not observed (above); no "turn off on this device" button yet (face `calPushOff` exists).
  21. 3. Pre-first-touch behaviour of part 1 unchanged (GAP 2): subscription of a device that already allowed notifications happens at its first pointer, not at load (the `shown` hook is not used).
  22. 4. W50: nothing relied on server members; subscriptions are in the table.

Branches

Latest commits

  • bf571badcalendar mission 008 (A8): Turn off on this device (unsubscribes the browser, server drops the device, choice kept), subscribe/refresh when the app is shown again; push gate part 3mre
  • 50985708calendar mission 008 (A7): Web Push report, README, mission, LOGmre
  • ee318774calendar mission 008 (A7): push-real.mjs, push sent log linemre
  • ebda0fd1calendar mission 008 (A7): server-side reminder plan on hl:time (push-plan.hl; hl:time fromLocal in a browser static is refused: repro .scratch/hltime-client), push gate 9/9mre
  • d063dad3calendar mission 008 (A7): Web Push (WIP): lib/push.hl subscriptions + sender clock, faces calPushSave/calPushOff, button subscribes, VAPID tool, tests/push.mjs; instantOf on hl:timemre
  • cf175c80calendar mission 008 (A7): re-vendor Hybriel master 0e3c9830 (bin 9d957fed, plugins whole: hl:crypto Web Push primitives, hl:web sendPush)mre
  • 9bf3c38bcalendar mission 008: re-vendor Hybriel f9833544 (gates old = new); Web Push stopped: hl:crypto half missing on mastermre
  • 186f969bcalendar mission 007: signed-in gate for the first-pointer race (fails on 3c5604f), README theme section, reportmre
  • ba9b4955calendar mission 006: first pointer event no longer re-runs the month (stale overwrite race), gate check, e2e settings cleanup, reportmre
  • bd730759calendar mission 006: theme move (WIP): brief, report, LOG, STATUSmre
  • b117b153calendar mission 006 WIP: reminder row fields keep 44 px; e2e script flagsmre
  • 53e3b0debrowser gate: Log out through the user menu, theme colour rgb(15, 20, 25)mre
  • 90bf9e2ecalendar mission 006 WIP: theme dbe3de7, theme shell (AppHeader/MainMenu/UserMenu/Sidebar/ContentFirst), styles cut to the app's own rules, check-theme gate, e2e toolsmre
  • 3c5604f9identkit: refuse a taken ident port, cold-start deadline, abort on dead ident, clear no-code error (as notes)mre
  • 4996bbe7paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
  • f5bf0803calendar mission 004: re-vendor Hybriel to the shared static build 0f396652; compose cache volume + tmpfs; notify-paths gate in deploy.sh; gate start waits 150 s; reportmre
  • eb86526fmission brief 004mre
  • 2f953b16deploy.sh: wait up to DEPLOY_URL_WAIT (120 s) for 200 after the restart, as the other apps (cold compile, hybriel#148)mre
  • 9078e1b7calendar mission 003 (2/2): report, LOG, STATUS (cause: timers only in an open, front, touched page; gate old 5/2 new 7/0; Hybriel gaps Web Push + page-shown hook, STOP)mre
  • 31ffe910calendar mission 003 (1/2): calendar#9 — missed reminders shown when the app is back, timers set again when it is shownmre