Avoid duplicate before-event reminders after offset changes - #111
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Motivation
reminderOffsetMinutespreference after a before-event notification has already been created.Description
before:<entryId>in the Convex mutationsyncDueNotificationsand in local planner output so de-duplication ignores the reminder offset value.key: "before:<entryId>"and adjust the local notification scheduler expectations to include the same stable key in scheduled notificationdata.dayovaNotificationKey.changing reminder offset does not duplicate an already-created before-event notificationtoconvex/notifications.test.tsthat asserts updatingreminderOffsetMinutesdoes not create a second inbox notification.Testing
pnpm test src/lib/notification-planner.test.ts src/lib/local-notification-scheduler.test.ts convex/notifications.test.tsand all tests passed (3 files, 9 tests).pnpm check(lint +tsc --noEmit) and the checks completed successfully.Codex Task
Summary by CodeRabbit
Bug Fixes
Tests