-
Notifications
You must be signed in to change notification settings - Fork 50
fix(backend): handle instance -> standalone conversion #1436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…vents - Implemented `instanceToStandalone` method in `GcalEventParser` to convert recurrence instances into standalone events, enhancing event management capabilities. - Updated `GcalSyncProcessor` to handle the new conversion case in the event processing logic. - Added unit tests to validate the functionality of detaching instances into standalone events, ensuring correct behavior and data integrity during synchronization. This change improves the flexibility of the Google Calendar synchronization process, allowing users to manage their events more effectively.
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 3. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a sync logic error when converting a recurrence instance to a standalone event in Google Calendar synchronization. Previously, when a user edited a single instance in Google Calendar to detach it from a recurring series, the sync processor would throw an unhandled transition error.
Changes:
- Added a new case handler
RECURRENCE_INSTANCE->>STANDALONE_CONFIRMEDin the GcalSyncProcessor switch statement - Implemented
instanceToStandalonemethod in GcalEventParser that removes recurrence properties and updates the event as standalone - Added comprehensive unit test validating the detachment functionality and data integrity
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/backend/src/sync/services/sync/gcal.sync.processor.ts | Added switch case to handle RECURRENCE_INSTANCE->>STANDALONE_CONFIRMED transition by calling the new instanceToStandalone method |
| packages/backend/src/event/classes/gcal.event.parser.ts | Implemented instanceToStandalone method to convert instance events to standalone by removing recurrence and gRecurringEventId properties |
| packages/backend/src/sync/services/sync/tests/gcal.sync.processor.upsert.instance.test.ts | Added test case verifying correct handling of instance detachment, including proper removal of recurrence properties and correct transition/operation reporting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Closes #1434
instanceToStandalonemethod inGcalEventParserto convert recurrence instances into standalone events, enhancing event management capabilities.GcalSyncProcessorto handle the new conversion case in the event processing logic.This change improves the flexibility of the Google Calendar synchronization process, allowing users to manage their events more effectively.