Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

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_calendars and list_events results will be synced to separate storage, this ensures the naming is correct before data persistence.

Naming improvements:

  • EventFilter.calendar_tracking_idcalendar_identifier (matches Apple's API)
  • AppleCalendar.idcalendar_identifier
  • CalendarRefCalendarSummary with idcalendar_identifier
  • external_identifiercalendar_item_external_identifier (matches Apple's API)
  • Alarm.relative_offsetrelative_offset_seconds (clarifies unit)

Type correctness:

  • event_identifier changed from String to Option<String> (can be nil for unsaved events per Apple docs)
  • calendar_item_external_identifier changed to Option<String>

Removed redundant fields:

  • Removed occurrence_date and is_detached from AppleEvent top level (already present in RecurrenceInfo.occurrence)

Review & Testing Checklist for Human

  • Verify TypeScript bindings regenerate correctly after CI build (specta generates types from Rust structs)
  • Confirm no other code paths depend on the removed occurrence_date and is_detached fields from AppleEvent
  • Test on macOS with actual Apple Calendar data to verify the transformations work correctly with real EventKit objects
  • Verify the Option<String> changes for identifiers don't cause issues when events are unsaved or external identifiers are unavailable

Recommended 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

…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 <[email protected]>
@netlify
Copy link

netlify bot commented Dec 23, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit bbf4ed9
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/694a383e7abf930008b5da9b
😎 Deploy Preview https://deploy-preview-2487--hyprnote.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 Dec 23, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit bbf4ed9
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/694a383e0ef68100082c1762
😎 Deploy Preview https://deploy-preview-2487--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.

@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

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.

2 participants