Repository navigation
fix(calendar): confirm before a calendar move clears recurring instances - #2633
Open
martin-forge wants to merge 6 commits into
Open
martin-forge wants to merge 6 commits into
martin-forge wants to merge 6 commits into
Conversation
Moving a recurring task's next occurrence in the Calendar view, or dropping the task onto the calendar from a note, deleted its completed and skipped instances on or after the new date without asking. Both paths reschedule without the confirmClearInstances hook that the scheduled-date picker and property updates already pass. Pass the hook on both paths, so the dialog lists the dates it will clear. Cancel reverts the calendar drag; for an external drop nothing is written, refreshed or offered for Undo. Make confirmClearRescheduledInstances public so the calendar can reuse it. Batch moves refuse recurring tasks, so they are unchanged.
This was referenced Nov 20, 2026
…-drop-confirm-clear # Conflicts: # docs/releases/unreleased.md
…-drop-confirm-clear # Conflicts: # docs/releases/unreleased.md
…-drop-confirm-clear # Conflicts: # docs/releases/unreleased.md
…-drop-confirm-clear # Conflicts: # docs/features/recurring-tasks.md # docs/releases/unreleased.md
Since callumalpass#2724 a scheduled-anchored move clears nothing when it records recurrence_original_date, so the drop tests no longer reached the confirmation. Use a completion-anchored task, which still clears every instance on or after the new date under both the current and the narrowed model rule, and add a Google-synced drop onto its skipped day, which clears only that day.
This branch has not been deployed
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.
Moving a recurring task can clear its completed and skipped instances. The date picker asks first through
confirmClearRescheduledInstances(#2147), but two calendar paths don't, so they clear them without warning:applyTaskCalendarGestureinsrc/bases/calendarMutations.ts)handleExternalTaskDropinsrc/bases/CalendarView.ts)Since #2724, this affects completion-anchored tasks, which lose every instance on or after the new date, and moves without
recurrence_original_date, such as Google-synced tasks, which lose a recorded landing day.Fix: both paths pass the existing
confirmClearInstanceshook, so they show the same dialog listing the dates. Cancel reverts the drag or drop and writes nothing.confirmClearRescheduledInstancesis now public so the calendar can reuse it. The Recurring Tasks docs and release notes are updated.Testing:
tests/unit/bases/calendarRecurringRescheduleConfirm.test.tsdrives both handlers with a realTaskService, for a completion-anchored and a Google-synced task. Its five tests fail onmainand pass here. I checked both paths by hand in Obsidian before #2724; the code is unchanged.Screenshot