Skip to content

fix(calendar): fix recurring event sync and recurrence_series_id population#3027

Merged
ComputelessComputer merged 2 commits intomainfrom
devin/1768317780-fix-recurring-events
Jan 15, 2026
Merged

fix(calendar): fix recurring event sync and recurrence_series_id population#3027
ComputelessComputer merged 2 commits intomainfrom
devin/1768317780-fix-recurring-events

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jan 13, 2026

Summary

Fixes two related bugs with recurring calendar events:

Bug 1 - Recurring events showing on wrong dates:
For recurring events, Apple Calendar returns multiple EKEvent objects with the same event_identifier but different start_date values. The sync logic was using only tracking_id_event as the Map key, causing later occurrences to overwrite earlier ones. For example, 4 weekly Tuesday meetings would all show as "Feb 10" instead of Jan 14, Jan 21, Jan 28, Feb 4.

Fix: Introduced a composite key combining tracking_id_event and started_at (e.g., "ABC123::2024-01-14T12:00:00") to uniquely identify each occurrence.

Bug 2 - Single events incorrectly getting recurrence_series_id:
The parse_recurrence_info function was returning RecurrenceInfo for single events that happened to have an occurrence_date populated, even when they didn't have recurrence rules. This caused single events to incorrectly get a recurrence_series_id, leading to potential duplicates and display issues in the sidebar.

Fix: Changed parse_recurrence_info to only return RecurrenceInfo when has_recurrence_rules is true.

Review & Testing Checklist for Human

  • Test with recurring events: Create a weekly recurring meeting and verify each occurrence appears on its correct date in the timeline
  • Test single events: Verify single events do NOT have recurrence_series_id populated in events.json
  • Test non-recurring events: Verify single events still sync and display correctly without duplicates
  • Test rescheduled events: Verify that rescheduling a single occurrence of a recurring event still works as expected
  • Check sidebar for duplicates: Verify list items in the left sidebar are not multiplying

Recommended test plan:

  1. Open the app with a calendar containing both recurring and single events
  2. Verify each recurring occurrence shows on its correct date in the timeline sidebar
  3. Check events.json - single events should NOT have recurrence_series_id populated
  4. Verify no duplicate items appear in the sidebar
  5. Create a new recurring event and verify all occurrences appear correctly

Notes

This change was not tested end-to-end locally due to Tauri build time constraints. CI checks should pass, but manual verification with real calendar data is strongly recommended given the two interrelated fixes.

Link to Devin run: https://app.devin.ai/sessions/7891ec6f4a754708aa577df696e467ec
Requested by: @ComputelessComputer

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Jan 13, 2026

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 43f2a6c
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6967cf683059af00089ba70e
😎 Deploy Preview https://deploy-preview-3027--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 13, 2026

Deploy Preview for howto-fix-macos-audio-selection ready!

Name Link
🔨 Latest commit 43f2a6c
🔍 Latest deploy log https://app.netlify.com/projects/howto-fix-macos-audio-selection/deploys/6967cf68b81ca700085eadce
😎 Deploy Preview https://deploy-preview-3027--howto-fix-macos-audio-selection.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 13, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 43f2a6c
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6967cf684dcd5f00089736a8

@devin-ai-integration devin-ai-integration bot changed the title fix(calendar): use composite key for recurring event sync fix(calendar): fix recurring event sync and recurrence_series_id population Jan 14, 2026
devin-ai-integration bot and others added 2 commits January 15, 2026 02:13
For recurring events, Apple Calendar returns multiple EKEvent objects
with the same event_identifier but different start_date values. The
previous sync logic used only tracking_id_event as the Map key, causing
later occurrences to overwrite earlier ones.

This fix uses a composite key combining tracking_id_event and started_at
to uniquely identify each occurrence of a recurring event, ensuring all
occurrences are properly synced and displayed on their correct dates.

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
…urrence rules

The parse_recurrence_info function was returning RecurrenceInfo for single
events that happened to have an occurrence_date populated, even when they
didn't have recurrence rules. This caused single events to incorrectly get
a recurrence_series_id populated, leading to issues with event deduplication
and display.

This fix ensures that RecurrenceInfo is only returned when has_recurrence_rules
is true, preventing single events from being incorrectly treated as recurring.

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@ComputelessComputer ComputelessComputer force-pushed the devin/1768317780-fix-recurring-events branch from fc3f9c0 to 43f2a6c Compare January 14, 2026 17:16
@ComputelessComputer
Copy link
Collaborator

/staging

@github-actions
Copy link

Branch Commit Status
devin/1768317780-fix-recurring-events 43f2a6c4 View

@ComputelessComputer ComputelessComputer merged commit 552a223 into main Jan 15, 2026
27 checks passed
@ComputelessComputer ComputelessComputer deleted the devin/1768317780-fix-recurring-events branch January 15, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments