Commit Graph
195 Commits
Author SHA1 Message Date
Lucas Berger 3fdb242f7e fix(260610-hbu-01): catch-up window + per-uid dedup in reminderScheduler
- Replace [now+14min, now+16min] window with (now, now+16min] catch-up
- Replace minuteBucket-keyed Set with uid-keyed Map for exactly-once dedup
- Lead-accurate body: 'Starts in N min' (Math.max(1, round(lead/60000)))
- CR-01 pruning: drop entries whose dtstart <= now (event started)
- WR-01 preserved: mark uid sent after all dispatches complete
- Drop gte import; add gt import from drizzle-orm
2026-06-10 12:32:43 -04:00
Lucas Berger 69e5ae8726 fix(06): set hasRrule on EventDetailPopover test fixtures
Plan 06-05 added hasRrule as a required field on the PWA CalendarOccurrence
type (mirroring 06-03's server-side field), but pre-existing fixtures in
EventDetailPopover.test.tsx did not set it — breaking tsc --noEmit / vite build
(vitest passed because esbuild strips types). Both fixtures are non-recurring
single events, so hasRrule: false is correct. Post-merge integration fix.
2026-06-10 11:44:37 -04:00
Lucas Berger 883b00b92b feat(06-06): distinct all-day event pill styling
- Add .sx__all-day-event override to Schedule-X section of index.css
- Full-width rounded pill: border-radius 4px, white (#FFFFFF) label, font-weight 600,
  font-size var(--text-label-size) — UI-SPEC Surface 3 contract
- Color source: calendarId color config (buildCalendarConfig) — no per-event override
- Timed event chip styling unchanged; existing .sx__* layout rules intact
2026-06-10 11:41:01 -04:00
Lucas Berger 96ef0b45b9 feat(06-06): add whole-series edit confirmation prompt
- Create SeriesEditPrompt.tsx: bottom-sheet (phone) / dialog (desktop) matching
  DeleteConfirmationDialog pattern; focus trap, Escape=cancel, role=dialog/aria-modal
- UI-SPEC Surface 6 copy: 'Edit recurring series' heading, 'This will update all
  occurrences of this event.' body, 'Update series' accent-filled CTA, 'Cancel' ghost
- Import SeriesEditPrompt + add seriesEditPromptOpen state to EventForm
- handleSubmit gates on occurrence.hasRrule: opens prompt for recurring edits;
  executeSubmit() fires the existing whole-series PATCH on confirmation
- Save CTA label becomes 'Update series' for recurring edits (UI-SPEC primary CTAs)
- Non-recurring and create-mode Save behavior unchanged (no prompt)
2026-06-10 11:40:33 -04:00
Lucas Berger cbf5f98eb9 feat(06-06): wire end-tracking and recurrence-bound control into EventForm
- Import computeNewTimedEnd/computeNewAllDayEnd from eventDateTime.ts (D-04)
- Start date onChange: calls computeNewAllDayEnd (all-day) or computeNewTimedEnd (timed)
- Start time onChange: calls computeNewTimedEnd preserving duration (timed only)
- Add recurrenceBound/recurrenceUntil/recurrenceCount state (D-06)
- Reset useEffect extended to reset bound state on form open
- Add 'Ends' control (Never/On date/After N times) shown when recurrence != none
- Inline validation: count < 1 and until < start
- Payload conditionally includes recurrenceUntil/recurrenceCount (create mode only)
- Error state type extended for recurrenceBound validation
2026-06-10 11:38:24 -04:00
Lucas Berger 9aa15c484b test(06-06): add failing tests for end-tracking wiring and recurrence-bound control
- Add hasRrule to EDIT_OCCURRENCE, RECURRING_OCCURRENCE, LATE_OCCURRENCE fixtures
- Add ALL_DAY_OCCURRENCE fixture for D-05 round-trip test
- Add test cases: D-04 timed/all-day end-tracking on start change
- Add test cases: D-05 all-day edit pre-fills inclusive end (no drift)
- Add test cases: D-06 Ends control visibility, On date/After N times reveals
- Add test cases: D-06 validation (count < 1), payload emission (count, never)
2026-06-10 11:36:49 -04:00
Lucas Berger 139ef00ed4 feat(06-05): global session-expiry interstitial via QueryCache/MutationCache onError
- Add sessionExpired boolean + setSessionExpired action to Zustand calendarStore
- main.tsx: construct QueryClient with QueryCache+MutationCache onError (v5 pattern, not defaultOptions.onError)
- onGlobalError: checks instanceof SessionExpiredError, calls setSessionExpired(true) via store.getState()
- CalendarShell: read sessionExpired from store; render AuthSplash(state=redirecting, 'Session expired', 'Signing you back in…')
- CalendarShell: useEffect fires clearLoginRedirect + maybeRedirectToLogin after 1.5s when sessionExpired (one-shot guard re-armed)
- Context7 /tanstack/query confirmed v5 QueryCache/MutationCache constructor + onError signature
2026-06-10 11:32:45 -04:00
Lucas Berger e7b34a5ce2 feat(06-05): gate app render behind AuthSplash (no pre-auth flash)
- Create AuthSplash component: full-screen centered column, loading/redirecting/dead-end states
- loading state: Loader2 spinner + 'Signing you in' heading + 'Taking you to the sign-in page…' body
- redirecting state: spinner + customisable heading/body (defaults to cold-load copy)
- dead-end state: tap-to-retry button (clearLoginRedirect + maybeRedirectToLogin)
- role=status, aria-label, inline styles matching SkeletonCalendar layout approach
- CalendarShell: early-return AuthSplash on meQuery.isLoading (no skeleton before auth)
- CalendarShell: replace 'Sign-in required' role=alert block with AuthSplash state=redirecting
- CalendarShell: isInitialLoading no longer includes meQuery.isLoading (handled by early return)
2026-06-10 11:31:17 -04:00
Lucas Berger d7d4023cf9 feat(06-05): centralize session-expiry detection and extend client types
- Add SessionExpiredError class with Object.setPrototypeOf for correct instanceof
- Add handleAuthResponse helper: throws SessionExpiredError on 401/opaqueredirect, generic Error on other non-ok
- Add redirect:'manual' + handleAuthResponse to all six fetch wrappers (fetchEvents, createEvent, updateEvent, deleteEvent, fetchSyncStatus, fetchWritableCalendars)
- Unify fetchMe: now throws SessionExpiredError instead of generic Error
- Add recurrenceUntil? and recurrenceCount? to CreateEventPayload (D-06)
- Add hasRrule: boolean to CalendarOccurrence client mirror (D-08, Pitfall 4)
2026-06-10 11:29:37 -04:00
Lucas Berger e5072ff663 test(06-05): add failing SessionExpiredError detection tests 2026-06-10 11:26:59 -04:00
Lucas Berger 81f2678987 fix(06-04): add global pulse keyframe and drop redundant spin redefinition
- Add @keyframes pulse (0%,100% opacity:1; 50% opacity:0.4) to tokens.css after @keyframes spin
- Remove redundant local <style> block redefining @keyframes spin from PushPermissionPrompt.tsx
- LiveSyncIndicator reconnecting dot now resolves its pulse animation from the global stylesheet
- PushPermissionPrompt spinner continues to work via the existing global spin keyframe
2026-06-10 11:23:01 -04:00
Lucas Berger 44d336c01b feat(06-03): expose hasRrule on expanded occurrences
- Add hasRrule: boolean to CalendarOccurrence interface
- Capture isRecurring = event.isRecurring() once before the branch
- Set hasRrule: isRecurring in non-recurring push (always false)
- Set hasRrule: isRecurring in recurring push (always true)
- All 10 expand.test.ts tests pass (RED→GREEN)
2026-06-10 11:17:13 -04:00
Lucas Berger 593302ee41 test(06-03): add failing tests for hasRrule + bounded expansion
- Add hasRrule===true assertion for recurring events (weekly-dst.ics)
- Add hasRrule===false assertion for non-recurring events (single-duration.ics)
- Add weekly-count3.ics fixture (FREQ=WEEKLY;COUNT=3, 1-hour events)
- Add bounded RRULE test: expects exactly 3 occurrences in wide window
- Add per-occurrence duration test: each occurrence is 1 hour (not recurrence span)
- Tests are RED: hasRrule field absent from CalendarOccurrence interface
2026-06-10 11:11:08 -04:00
Lucas Berger d2abb91bd2 feat(06-02): serialize RRULE UNTIL/COUNT and lock FREQ persistence
- Add assembleRruleString() helper (exported) to outboxWorker.ts (D-06)
- Wire UNTIL/COUNT bound assembly into create + update dispatch branches
- Add recurrenceUntil (max 10) + recurrenceCount (int min 1) to outboxPayloadSchema
- Add recurrenceUntil + recurrenceCount to eventFieldsSchema in events.ts
- Series-edit bound change strips existing UNTIL/COUNT via regex before re-apply (Pitfall 3)
- All 39 broker tests pass (RED->GREEN); existing CR-01 none-wins test preserved
2026-06-10 11:00:24 -04:00
Lucas Berger a59455a727 test(06-02): add failing tests for RRULE UNTIL/COUNT + FREQ persistence
- vevent.test.ts: add COUNT, UNTIL-DATE, UNTIL-DATETIME serialization assertions
- outboxWorker.test.ts: add assembleRruleString (D-06) describe block (not yet exported)
- outboxWorker.test.ts: add FREQ persistence (D-07 regression) describe block
- RED: assembleRruleString not yet exported; FREQ-persistence cases fail on missing helper
2026-06-10 10:56:22 -04:00
Lucas Berger 605f543f81 feat(06-01): implement duration-preserving end-tracking helpers
- computeNewTimedEnd: preserves timed duration; 1h floor for stale state
- computeNewAllDayEnd: preserves all-day day-span; same-day floor for stale state
- Private helpers: dateDiffDays, addDaysISO, localDateISO, localTimeHHMM (local accessors only — WR-05)
- All 6 RED tests now GREEN; pre-existing suite unaffected (166/166 pass)
2026-06-10 10:49:10 -04:00
Lucas Berger 16cdbf3d7c test(06-01): add failing tests for end-tracking duration math
- computeNewTimedEnd: 1h delta, 26h multi-day delta, floor-to-1h rule
- computeNewAllDayEnd: 0-day span, 3-day span, floor-to-same-day rule
- RED: all 6 new cases fail with missing-export TypeError
2026-06-10 10:48:09 -04:00
Lucas Berger f452400517 chore(quick-260610-cr8-01): remove db:push script from apps/api/package.json
- Delete the 'db:push': 'drizzle-kit push' entry from scripts
- Retain db:generate and db:migrate as the canonical workflow
- JSON remains valid; no other changes
2026-06-10 09:15:30 -04:00
Lucas Berger 17756fc523 fix(05-review): NEW-WR-01 emit delete changes when server returns zero events (whole-cache clear)
Pre-capture all currently-cached rows into pendingDeleteRows before the whole-cache
db.delete() when seenUids.length === 0. The existing >0 branch behavior is unchanged.
Adds a regression test verifying onChanges receives one delete change per cached row
on a full-calendar clear.
2026-06-09 22:39:11 -04:00
Lucas Berger c7ef5811d1 fix(05-review): NEW-CR-01 pre-resolve SW registration to eliminate await before pushManager.subscribe
Pre-fetch ServiceWorkerRegistration into component state via useEffect in both
PushPermissionPrompt and SettingsSheet. Gate the subscribe tap target as disabled
until both vapidKey AND swRegistration are ready. The tap handler now has zero
awaits between the user gesture and registration.pushManager.subscribe(), fully
satisfying the iOS user-gesture requirement.
2026-06-09 22:39:05 -04:00
Lucas Berger 44fbb2bb3a fix(05-review): commit 0004 migration meta (journal + snapshot) 2026-06-09 22:33:09 -04:00
Lucas Berger 1044de57ae test(05-review): add CR-01/WR-01 reminder pruning tests and IN-01 actor-name tests 2026-06-09 22:30:03 -04:00
Lucas Berger 50da9b3bca fix(05-review): IN-01 resolve actor display name in eventChangeDispatcher for D-02/D-03 2026-06-09 22:25:32 -04:00
Lucas Berger 8cecbab7ab fix(05-review): CR-02 change endpoint/p256dh to varchar to prevent InnoDB prefix-index truncation 2026-06-09 22:24:23 -04:00
Lucas Berger 82eccc9017 fix(05-review): CR-04 pre-fetch VAPID key into state; no await before pushManager.subscribe 2026-06-09 22:24:00 -04:00
Lucas Berger e5f7b1ab7c fix(05-review): CR-03 notificationclick uses matchAll+focus+navigate for deep-link URLs 2026-06-09 22:22:27 -04:00
Lucas Berger 7702f7e19a fix(05-review): CR-01+WR-01 prune sentReminders after each scan and mark-sent after dispatch 2026-06-09 22:22:04 -04:00
Lucas Berger f058aefb88 fix(05-review): WR-04 collect delete changes after db.delete to avoid race in sync fan-out 2026-06-09 22:21:37 -04:00
Lucas Berger 814d29dbdd fix(05-review): WR-05 re-confirm push subscription server-side on health-check mount 2026-06-09 22:21:16 -04:00
Lucas Berger 76e0fb9588 fix(05-review): IN-03 use useId() instead of Math.random() for headingId in PushPermissionPrompt 2026-06-09 22:21:05 -04:00
Lucas Berger c69bd30aaa fix(05-review): WR-03 log error.message not raw error in push route catch blocks 2026-06-09 22:20:43 -04:00
Lucas Berger b666b1d114 fix(05-review): WR-02 remove unused 'and' import from listChangeDispatcher 2026-06-09 22:20:30 -04:00
Lucas Berger 30e9de13f9 feat(05-07): implement eventChangeDispatcher + syncCalendar diff/title/onChanges
- Create eventChangeDispatcher.ts: dispatchEventChange + isMeaningfulChange
- D-04: description-only edits are silent; meaningful fields = title/dtstartUtc/dtstartDate/allDay/location
- D-03: actor excluded via ne() + application-level filter; all subs filtered by userId != actorUserId
- D-13: reads only push_subscriptions from MariaDB — no tsdav/Fastmail I/O
- syncCalendar: add optional onChanges callback; populate title from VEVENT SUMMARY on every upsert
- syncCalendar: pre-upsert SELECT to detect add vs update; track changedFields; prune emits deletes
- poller: pass onChanges with actor=cred.userId (external changes from other member)
- outboxWorker.triggerTargetedResync: pass onChanges with actor=userId (this-member writes)
- All 4 eventChangeDispatcher tests + 14 sync tests GREEN
2026-06-09 22:03:52 -04:00
Lucas Berger 010a69c047 feat(05-08): PermissionDeniedBanner + App mount + CalendarShell onOpenSettings wiring
- Create PermissionDeniedBanner.tsx: role=alert banner shown only when
  permission=denied AND notificationsEnabled=1 (OS-revoked case, D-10)
  with AlertCircle icon, 'Notifications blocked' heading, inline 'How to enable'
  button that opens OS-specific instruction sheet (iOS 4-step / Android 4-step)
- Mount PermissionDeniedBanner and SettingsSheet in App.tsx; wire onOpenSettings
  state from avatar tap through CalendarShell → AppNav → PhoneNav/DesktopNav
- CalendarShell accepts optional onOpenSettings prop, threads to both AppNav usages
- playwright-cli verified: banner renders with exact UI-SPEC copy when
  permission=denied+was-enabled; banner absent when permission=granted;
  'How to enable' opens instruction sheet with correct Android steps;
  SettingsSheet opens from avatar click with toggle + permission-denied hint
2026-06-09 21:50:48 -04:00
Lucas Berger 1de4aa5a3e feat(05-08): SettingsSheet (master toggle D-09) + AppNav avatar promoted to button
- Create SettingsSheet.tsx: bottom sheet (role=dialog, z:301, Escape+backdrop-close)
  with FamilySync Notifications toggle (role=switch, aria-checked, 44px target)
  wired to usePushSubscription setEnabled + permission state
  and inline permission-denied hint (AlertCircle + 'How to enable') when denied
- Promote PhoneNav avatar div to button with onOpenSettings onClick + aria-label
- Add onOpenSettings prop to DesktopNav; add avatar button at sidebar bottom
- Thread onOpenSettings through AppNavProps
- Add @keyframes spin to tokens.css (fixes missing keyframe used by SettingsSheet + SyncStateToast)
2026-06-09 21:45:59 -04:00
Lucas Berger 458d6e4fef feat(05-08): extend usePushSubscription with isSubscribed, setEnabled, permission state (D-10)
- Add isSubscribed state (true when pushManager has active subscription)
- Add setEnabled(on) master toggle: off=unsubscribe, on+granted=silent subscribe, on+default/denied=no-op
- Health-check now respects readNotificationsDisabled() — skip re-subscribe if user explicitly disabled
- Export readNotificationsEnabled for PermissionDeniedBanner/SettingsSheet initial state
- Remove dead readNotificationsEnabled local-only usage (was unused in returned interface)
- persistNotificationsEnabled(false) now writes '0' instead of removing key for explicit off state
2026-06-09 21:43:31 -04:00
Lucas Berger b95f671485 feat(05-06): implement reminderScheduler — shared timed 15-min reminder scan
- Create apps/api/src/broker/reminderScheduler.ts:
  - runReminderCheck(now): queries isShared=true + allDay=false events
    with dtstartUtc in [now+14min, now+16min] via calendarEvents→calendars→
    pushSubscriptions cross-join (2 innerJoins; fans out to all subscribers)
  - In-memory sentReminders Set keyed uid:minuteBucket prevents double-fire
    at window boundary (D-06, T-05-18)
  - Per-event and per-subscription try/catch for error isolation (T-05-19)
  - Null title fallback (event.title ?? uid) — handles rows before Plan 05-07
  - Empty shared-calendar set produces zero sends and no crash (D-16)
  - startReminderScheduler(): node-cron 1-min schedule wrapping runReminderCheck
- Wire startReminderScheduler() into index.ts isMainModule() guard after
  startOutboxWorker() and VAPID setVapidDetails (NOTIF-01)
- Tests: 3/3 GREEN (all-day excluded, non-shared excluded, dedup)
2026-06-09 21:38:32 -04:00
Lucas Berger d2ce4e08c7 feat(05-05): hook notifyListChange into list/item mutations (reorder excluded)
- POST /:id/items (item added) → notifyListChange
- PATCH /list-items/:itemId checked/text → notifyListChange; position-only → silent (D-01)
- DELETE /list-items/:itemId → notifyListChange
- PATCH /:id (list rename/share toggle) → notifyListChange
- DELETE /:id (list delete) → notifyListChange
- POST / (list create) → no notification (empty list, D-01 spirit)
- lists.test.ts: 2 new tests prove reorder-silent (position) and check-notifies (NOTIF-02)
- All 59 lists.test.ts assertions GREEN
2026-06-09 21:26:29 -04:00
Lucas Berger 69231043e4 feat(05-05): implement listChangeDispatcher — access-scoped, self-suppressed, coalesced push (NOTIF-02)
- notifyListChange(listId, actorId, windowMs?) wraps coalesceListPush with a
  dispatch closure that resolves actor name + list name from DB, builds
  audience as owner ∪ list_shares MINUS actorId (D-03), and calls
  dispatchPush per accessible subscriber subscription
- D-02 generic copy: '{Actor} made {N} changes to {ListName}' — no item text
- D-03 self-suppression: actorId filtered from audience before subscription load
- T-05-14: audience strictly scoped to list access (owner + list_shares only)
- T-05-15: no item text in notification body
- Empty audience and missing subscriptions are silent no-ops
- Tests: 5/5 GREEN (burst→1 push, self-suppress, access scope, empty audience)
2026-06-09 21:24:48 -04:00
Lucas Berger 97f7026095 test(05-05): add failing tests for listChangeDispatcher — RED gate
- burst coalescing: N calls → 1 dispatchPush to non-actor with count=N
- D-03 self-suppression: actor's own subscription never dispatched
- T-05-14 access scoping: unrelated user (no owner/share) excluded
- empty audience (no other members): no dispatch, no crash
- empty audience (other member has no subscription): no dispatch, no crash
2026-06-09 21:20:34 -04:00
Lucas Berger d816f79271 fix(05-04): wrap setVapidDetails in try/catch to prevent startup crash on bad VAPID key
- Bad/truncated VAPID_PRIVATE_KEY logs a warning instead of crashing the server
- API still starts and serves all other routes; push dispatch fails with a log message
2026-06-09 21:13:58 -04:00
Lucas Berger bf8f63b47c feat(05-04): usePushSubscription hook + PushPermissionPrompt + App mount
- Create apps/pwa/src/hooks/usePushSubscription.ts: subscribe (in tap handler, VAPID key cached), unsubscribe, permission; health-check on mount (D-10); urlBase64ToUint8Array helper; prefetchVapidKey export
- Create apps/pwa/src/components/PushPermissionPrompt.tsx: WalkthroughSheet-style bottom sheet, Bell icon, 'Stay in the loop' heading, 48px Enable CTA (var(--color-member-0)), 44px Not-now ghost, no backdrop-dismiss, pushPermissionDismissed key, Loader2 spinner while awaiting
- Mount PushPermissionPrompt in App.tsx (for installed-PWA path) and InstallPrompt.tsx (for post-Android-install justInstalled path)
- Build green; tsc clean
2026-06-09 21:09:41 -04:00
Lucas Berger e5953ebb31 feat(05-04): SW migration to injectManifest with push + notificationclick + denylist
- Migrate vite.config.ts from generateSW to injectManifest (strategies, srcDir, filename)
- Add rolldownOptions.output.format=iife to produce sw.js (not sw.mjs) matching registerSW.js
- Create apps/pwa/src/sw.ts: skipWaiting+clientsClaim (autoUpdate), precacheAndRoute, NavigationRoute denylist (/callback,/api/,/health)
- Push handler: dual-format payload parsing (iOS 18.4+ declarative + legacy), ALWAYS event.waitUntil(showNotification) — never silent (D-11)
- notificationclick: close notification, focus existing window or openWindow to deep-link URL (D-14)
- Build verified: dist/sw.js contains showNotification, waitUntil, callback denylist, notificationclick
2026-06-09 21:06:32 -04:00
Lucas Berger f6f1374904 feat(05-04): push subscription API + VAPID startup wiring
- Create apps/api/src/routes/push.ts: GET /vapid-public-key, POST /subscription (upsert), DELETE /subscription (user-scoped)
- Wire pushRouter at /api/push in index.ts
- Call webpush.setVapidDetails() in isMainModule() guard before serve()
- Fix broken vi.getMockImplementation scaffold bug in push.test.ts (Rule 1)
- push.test.ts: all 4 tests GREEN
2026-06-09 21:04:16 -04:00
Lucas Berger c1758de05e feat(05-03): implement pushCoalescer — per-(list,actor) sliding debounce (D-01/D-03)
- module-level Map<string, {count, timer}> keyed by ${listId}:${actorId}
- sliding window: each call within window resets timer and increments count
- fires dispatch(listId, actorId, count) once on timer expiry; map entry self-deletes
- actorId passed as second arg so caller can apply excludeUserId=actorId (D-03)
- default windowMs=45000; injected dispatch keeps module pure and testable
2026-06-09 20:58:42 -04:00
Lucas Berger 7af827a9b9 test(05-03): add actorId assertion in burst test — fix unused var lint warning 2026-06-09 20:58:01 -04:00
Lucas Berger e4170b3823 feat(05-02): implement pushDispatcher — VAPID send + 410/404 prune
- buildPushBody: dual-format payload (iOS 18.4+ declarative + legacy)
- dispatchPush: calls webpush.sendNotification with TTL=300, urgency=normal
- Prunes push_subscriptions row on 410/404 from push service (D-11)
- Logs transient errors with [pushDispatcher] prefix; never throws to caller
- Default import for web-push (CommonJS — Pitfall 7)
2026-06-09 20:54:47 -04:00
Lucas Berger ef558b65be test(05-01): add Wave-0 RED scaffolds + VAPID fixture + setup truncation
- tests/fixtures/vapid.ts: static TEST_VAPID keypair for offline unit tests
- tests/lib/pushDispatcher.test.ts: RED — 410/404 prune + 201/5xx no-delete
- tests/lib/pushCoalescer.test.ts: RED — burst coalesce fires once with count=N; excludeUserId
- tests/broker/reminderScheduler.test.ts: RED — shared+timed filter; dedup by (uid,minuteBucket)
- tests/lib/eventChangeDispatcher.test.ts: RED — create/meaningful-update fires; description-only silent; actor excluded
- tests/routes/push.test.ts: RED — POST 201/401; DELETE removes rows; GET vapid-public-key
- test/setup.ts: import pushSubscriptions + add db.delete(pushSubscriptions) in afterEach
- all 5 RED files fail on missing-module (correct; implementations in Plans 05-02..05-06)
2026-06-09 20:50:35 -04:00
Lucas Berger 73fcdaf075 feat(05-01): add push_subscriptions table + calendar_events.title column; VAPID env wiring
- schema.ts: new pushSubscriptions mysqlTable (user_id FK cascade, endpoint unique, p256dh, auth)
- schema.ts: add nullable title varchar(500) to calendarEvents after rawVevent (D-02/NOTIF-01)
- 0003_same_xavin.sql: CREATE TABLE push_subscriptions + ALTER calendar_events ADD title
- migration applied to dev DB via db:generate + db:migrate (NOT db:push per anti-pattern)
- docker-compose.yml: inject VAPID_PUBLIC_KEY/PRIVATE_KEY/SUBJECT into api environment block
- .env.example: document all three VAPID vars with placeholders + generation instructions
2026-06-09 20:47:44 -04:00
Lucas Berger 80bbdc1735 chore(05-01): install web-push and workbox push dependencies
- apps/api: add web-push@^3.6.7 (prod) + @types/web-push@^3.6.4 (dev)
- apps/pwa: add workbox-core, workbox-precaching, workbox-routing@^7.4.1 (dev)
- pnpm-lock.yaml updated for all three workspace packages
2026-06-09 20:47:35 -04:00