fix(sync): add event ownership, undo-safe deletion, and ineligible task cleanup#289
Merged
connectwithprakash merged 3 commits intomainfrom Mar 15, 2026
Merged
fix(sync): add event ownership, undo-safe deletion, and ineligible task cleanup#289connectwithprakash merged 3 commits intomainfrom
connectwithprakash merged 3 commits intomainfrom
Conversation
…sk cleanup - Add isEventOwner flag to Task model (default true). Tasks created from calendar events set it to false so completing or deleting them never modifies the source event. - Defer calendar event deletion to commitPendingChanges() so undo within the 5-second window preserves both task and event. - Clean up orphaned calendar events when a task becomes ineligible for sync (date, time, or duration removed). - Extract unlinkTask helper for consistent link-clearing across all sync paths. Closes #283
✅ Deploy Preview for lazyflow canceled.
|
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
isEventOwnerflag — tasks created from calendar events never modify or delete the source event on complete/deleteDetails
Event Ownership (
isEventOwner)true, lightweight migration)createTaskFromEvent/createTaskFromCalendarEventset it tofalsehandleCompletedTask,pushUpdatesToEvent,handleIneligibleTaskall guard on ownershipdeleteTaskresolvesdeleteLinkedEventtotask.isEventOwnerwhen not explicitly passedUndo-Safe Deletion
commitPendingChanges()(after undo window closes)discardPendingChanges()(undo) works fully — event was never deletedIneligible Task Cleanup
handleIneligibleTaskmethod inperformForwardSyncTest plan
Closes #283