Skip to content

fix(calendar): suppress duplicate projections of recorded recurrence moves - #2319

Merged
callumalpass merged 2 commits into
callumalpass:mainfrom
martin-forge:martin-forge/calendar-moved-occurrences
Sep 13, 2026
Merged

fix(calendar): suppress duplicate projections of recorded recurrence moves#2319
callumalpass merged 2 commits into
callumalpass:mainfrom
martin-forge:martin-forge/calendar-moved-occurrences

Conversation

@martin-forge

@martin-forge martin-forge commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

A rescheduled recurring task can appear at its new scheduled date and again at its original rule date, even when its original-date marker is already stored on the task.

Exclude pending and historical moved original dates from rule-generated projections. Preserve those fields through Bases conversion even before its task cache is warm, and include them in mapped calendar refresh signatures. The explicit completed/skipped history pass remains intact, so requesting history still shows recorded occurrences. This change only reads existing metadata; it does not change schedules, recurrence rules, completion attribution or undo.

Validation: all 12 recurring-instance visibility and calendar-signature tests pass, including moved placement, later weekly occurrences, and preserved history. ESLint, TypeScript/build checks, and a disposable-vault plugin reload passed. Reopening the calendar with the recorded marker shows the moved occurrence only once.

Known limitation: fresh native tasks with no Google Calendar projection metadata do not currently record an original occurrence when their scheduled date changes. A fresh weekly Saturday task (DTSTART:20260912;FREQ=WEEKLY;BYDAY=SA), initially scheduled for 12 September, moved through taskService.updateProperty to 11 September, still appears on both days. The file contains the new schedule but no original-date marker. This was reproduced with calendar export disabled. The tracking predicate in googleCalendarRecurringExceptions.ts requires existing projection metadata. This PR deliberately fixes rendering when identity is known; a broader native fix needs provider-independent occurrence-move identity, with completion and undo tested against it, rather than inferring identity from the displayed date.

@martin-forge
martin-forge marked this pull request as ready for review September 11, 2026 10:38
@callumalpass
callumalpass merged commit 66a0c7d into callumalpass:main Sep 13, 2026
2 checks passed
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