refactor(apple-calendar): improve naming and structure for EventKit data models#2487
Closed
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Closed
refactor(apple-calendar): improve naming and structure for EventKit data models#2487devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
…ata models - Rename EventFilter.calendar_tracking_id -> calendar_identifier - Rename AppleCalendar.id -> calendar_identifier - Rename CalendarRef -> CalendarSummary with id -> calendar_identifier - Make event_identifier Option<String> (can be nil for unsaved events) - Rename external_identifier -> calendar_item_external_identifier (Option<String>) - Remove redundant occurrence_date and is_detached from AppleEvent (kept in RecurrenceInfo.occurrence) - Rename Alarm.relative_offset -> relative_offset_seconds for clarity - Update all transform files and frontend code to use new field names Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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:
|
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.
refactor(apple-calendar): improve naming and structure for EventKit data models
Summary
Refactors the Apple Calendar plugin's data models to better align with Apple's EventKit API naming conventions and improve type correctness. Since
list_calendarsandlist_eventsresults will be synced to separate storage, this ensures the naming is correct before data persistence.Naming improvements:
EventFilter.calendar_tracking_id→calendar_identifier(matches Apple's API)AppleCalendar.id→calendar_identifierCalendarRef→CalendarSummarywithid→calendar_identifierexternal_identifier→calendar_item_external_identifier(matches Apple's API)Alarm.relative_offset→relative_offset_seconds(clarifies unit)Type correctness:
event_identifierchanged fromStringtoOption<String>(can be nil for unsaved events per Apple docs)calendar_item_external_identifierchanged toOption<String>Removed redundant fields:
occurrence_dateandis_detachedfromAppleEventtop level (already present inRecurrenceInfo.occurrence)Review & Testing Checklist for Human
occurrence_dateandis_detachedfields fromAppleEventOption<String>changes for identifiers don't cause issues when events are unsaved or external identifiers are unavailableRecommended test plan: Run the desktop app on macOS, enable Apple Calendar integration, and verify calendars and events are listed correctly with the new field names.
Notes