Fix posting reminders to google calendar #1517
Open
+168
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Google Calendar Reminder Sync Fix - Summary
Changes Made
Fixed the issue where task reminders were not being synced to Google Calendar events. The sync service was only using the global
defaultReminderMinutessetting and ignoring task-specific reminders.Implementation Details
1. Added ISO 8601 Duration Parser
Added
parseISO8601Duration()method to parse reminder offset strings like-PT15M,-PT1H,-P1Dinto milliseconds.2. Created Reminder Conversion Utility
Added
convertTaskRemindersToGoogleFormat()method that:{ method: 'popup', minutes: number }objects3. Updated Event Builder
Modified
taskToCalendarEvent()method to:defaultReminderMinutesif no task reminders existHow Reminders Are Converted
Relative Reminders
{ type: 'relative', relatedTo: 'due'|'scheduled', offset: '-PT15M' }relatedTomatches the event's date source-PT15M) = reminder before eventAbsolute Reminders
{ type: 'absolute', absoluteTime: '2026-01-24T09:00:00' }Testing Guide
Test Case 1: Task with Relative Reminder (Scheduled)
scheduled: 2026-01-25T10:00:00reminders:type: relativerelatedTo: scheduledoffset: -PT15MTest Case 2: Task with Relative Reminder (Due)
due: 2026-01-25reminders:type: relativerelatedTo: dueoffset: -PT1HTest Case 3: Task with Absolute Reminder
scheduled: 2026-01-25T14:00:00reminders:type: absoluteabsoluteTime: 2026-01-25T13:30:00Test Case 4: Task with Multiple Reminders
scheduled: 2026-01-25T15:00:00reminders:{ type: relative, relatedTo: scheduled, offset: -PT5M }{ type: relative, relatedTo: scheduled, offset: -PT1H }Test Case 5: Task with Mismatched Reminder (Should Ignore)
due: 2026-01-25(event based on due date)reminders:type: relativerelatedTo: scheduled(but no scheduled date)offset: -PT15MsyncTrigger: dueTest Case 6: Task with No Reminders (Fallback to Default)
scheduled: 2026-01-25remindersfielddefaultReminderMinutessetting (if configured)Verification in Google Calendar
After syncing, open the event in Google Calendar and check:
Edge Cases Handled
Files Modified
src/services/TaskCalendarSyncService.tsparseISO8601Duration()method (lines ~336-362)convertTaskRemindersToGoogleFormat()method (lines ~364-473)taskToCalendarEvent()reminder logic (lines ~544-571)Build Status
✅ TypeScript compilation successful
✅ No linter errors
✅ Build completed successfully