Repository navigation
v0.3.2 - Fix desktop notification reliability
What's Fixed
Desktop notifications now work reliably
The notification system had several bugs causing silent failures:
-
Auto-create missing preferences — Users without a
NotificationPreferencerecord (anyone who hadn't visited settings) had ALL notifications silently skipped. The worker now auto-creates default preference records so notifications work out of the box. -
Error logging — All silent
.catch(() => {})blocks replaced withconsole.errorlogging across the notification pipeline (worker, task routes, preferences). Failures are now visible in server logs. -
End-to-end push test — New "Test Push Notification (Server)" button in notification settings sends a real push through the server pipeline to ALL registered devices. Useful for verifying cross-device delivery.
-
VAPID key validation — Server now logs a clear warning on startup when VAPID keys are missing, instead of silently disabling push.
Docker build fix
- TypeScript narrowing error — Fixed
session.userpossibly-undefined error in notification preferences PATCH handler that brokedocker build. Extractedsession.user.idinto a local variable before the async callback.
Files Changed
src/lib/notification-worker.ts— Auto-create preferences, error loggingsrc/app/api/push/test/route.ts— New test push endpointsrc/app/api/notifications/preferences/route.ts— Fix TS narrowing for Docker buildsrc/components/settings/notification-settings-card.tsx— Dual test buttonssrc/instrumentation.ts— VAPID validation logging- Task route handlers — Error logging for reminder scheduling
Testing
- 1539/1539 tests passing
- 6 new tests added (3 for missing prefs, 3 for push test endpoint)
- Docker build verified