Skip to content

Fix recurring exception sync for rescheduled recurring tasks#1802

Closed
martin-forge wants to merge 2 commits intocallumalpass:mainfrom
martin-forge:martin-forge/issue-1696-recurring-calendar-exceptions
Closed

Fix recurring exception sync for rescheduled recurring tasks#1802
martin-forge wants to merge 2 commits intocallumalpass:mainfrom
martin-forge:martin-forge/issue-1696-recurring-calendar-exceptions

Conversation

@martin-forge
Copy link
Copy Markdown
Contributor

@martin-forge martin-forge commented Apr 16, 2026

Maintainer note

Ready to merge. This is distinct from #1843: it fixes recurring task exception state and detached exception events. The only overlap is calendar cleanup. If #1843 lands first, this PR should be rebased so detached exception cleanup uses #1843's retry-safe deletion queue. If this lands first, #1843 should be rebased so its persisted event index/recovery also tracks detached exception event IDs.

Summary

  • Preserve the original RRULE occurrence date when a scheduled-anchor recurring task is moved off-pattern.
  • Sync moved occurrences to Google Calendar as a recurring master with an EXDATE plus one detached exception event.
  • Clean up detached exception metadata/events when the moved occurrence is completed, skipped, archived, deleted, or unlinked.
  • Keep local calendar recurring rendering aligned by hiding original pattern dates represented by moved-occurrence metadata.

Closes #1696.

Validation

  • TZ=UTC npm test -- --runInBand
  • npm run docs:check
  • npm run i18n:sync
  • npm run lint
  • npm run typecheck
  • npm run build:test
  • obsidian plugin:reload id=tasknotes vault=test

@martin-forge martin-forge changed the title [codex] Fix recurring exception sync for rescheduled recurring tasks Fix recurring exception sync for rescheduled recurring tasks Apr 16, 2026
@martin-forge martin-forge force-pushed the martin-forge/issue-1696-recurring-calendar-exceptions branch from c512b6e to e6d8b38 Compare April 26, 2026 10:48
@martin-forge martin-forge marked this pull request as ready for review April 26, 2026 10:48
@martin-forge
Copy link
Copy Markdown
Contributor Author

Cross-PR compatibility note from auditing against #1843:

This PR remains a distinct fix: #1843 does not add the recurring-exception metadata, moved-original-date tracking, local calendar rendering changes, or detached Google exception event flow introduced here.

The only substantive overlap is cleanup. If #1843 lands before this PR, please route this PR's primary + detached exception event cleanup through #1843's retry-safe deletion queue and keep 404/410 deletes as success. If this PR lands first, #1843 should be rebased so its persisted event index and startup recovery track both googleCalendarEventId and googleCalendarExceptionEventId; otherwise a task file deleted while Obsidian is closed could still leave a detached recurring exception event orphaned.

@martin-forge
Copy link
Copy Markdown
Contributor Author

Superseded by #1851, which consolidates the Google Calendar fixes into one ready-to-review PR.

@martin-forge martin-forge deleted the martin-forge/issue-1696-recurring-calendar-exceptions branch April 30, 2026 13:02
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.

[Bug]: Google Calendar export ignores independently rescheduled next occurrence for recurring tasks

1 participant