fix(calendar): fix recurring event sync and recurrence_series_id population#3027
Merged
ComputelessComputer merged 2 commits intomainfrom Jan 15, 2026
Merged
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for howto-fix-macos-audio-selection ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote canceled.
|
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>
fc3f9c0 to
43f2a6c
Compare
Collaborator
|
/staging |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes two related bugs with recurring calendar events:
Bug 1 - Recurring events showing on wrong dates:
For recurring events, Apple Calendar returns multiple
EKEventobjects with the sameevent_identifierbut differentstart_datevalues. The sync logic was using onlytracking_id_eventas 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_eventandstarted_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_infofunction was returningRecurrenceInfofor single events that happened to have anoccurrence_datepopulated, even when they didn't have recurrence rules. This caused single events to incorrectly get arecurrence_series_id, leading to potential duplicates and display issues in the sidebar.Fix: Changed
parse_recurrence_infoto only returnRecurrenceInfowhenhas_recurrence_rulesis true.Review & Testing Checklist for Human
recurrence_series_idpopulated in events.jsonRecommended test plan:
recurrence_series_idpopulatedNotes
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