Skip to content

WIP: Add recurring reminders and editable end dates - #110

Draft
morozovpersonal wants to merge 3 commits into
keith:mainfrom
morozovpersonal:feature/recurrence-end-support
Draft

WIP: Add recurring reminders and editable end dates#110
morozovpersonal wants to merge 3 commits into
keith:mainfrom
morozovpersonal:feature/recurrence-end-support

Conversation

@morozovpersonal

Copy link
Copy Markdown

Context and attribution

This PR starts from Ramesh Baskaran's recurrence implementation in #109 (commit 8891097d32f1487a7b051a89ffa6b4459d4b9cc7). That commit and its original authorship are preserved as the first commit here. #109 currently conflicts with main after #108, so this branch reapplies that work to the current base and extends it with safe end-date editing.

Closes #84.
Closes #104.

What it adds

  • --repeat daily|weekly|monthly|yearly, --repeat-interval, and --repeat-until on add
  • repeat changes on edit, including end-only --repeat-until, --clear-repeat-end, and --clear-repeat
  • recurrence details in JSON and plain output, including existing count-based end conditions
  • date-only end values that include the complete requested local day
  • validation that recurring reminders have a due date and do not end before their first due date

Edit safety

  • unrelated title and notes edits leave recurrence untouched
  • end-only edits copy the complete EventKit rule before changing recurrenceEnd, preserving provider-specific calendar metadata and complex selectors
  • interval-only edits preserve all public selectors
  • changing frequency preserves the old end condition but resets interval to 1 unless an explicit interval is supplied
  • multiple existing rules are preserved during end-only and interval-only edits

Verification

  • swift build -Xswiftc -warnings-as-errors
  • 27/27 RecurrenceTests pass
  • read-only EventKit smoke test: 18/18 existing recurring reminders exposed recurrenceEnd; no reminder data was changed

On the local macOS 26 SDK, the full 37-test suite has three pre-existing NaturalLanguageTests expectation failures because Foundation now includes dayOfYear in parsed DateComponents. All recurrence tests pass, and the recurrence changes do not touch that parser behavior.

rameshbaskaran and others added 3 commits August 24, 2026 18:36
Implements EKRecurrenceRule-backed recurrence, requested in keith#104:

- `reminders add <list> <reminder> --repeat daily|weekly|monthly|yearly`
- `--repeat-interval N` to repeat every N units instead of every 1
  (default 1), e.g. `--repeat-interval 2 --repeat weekly` for
  fortnightly.
- `--repeat-until <date>` to set a recurrence end date; omitting it
  repeats forever, matching Reminders.app's own default.
- `reminders edit <list> <index> --repeat ...` replaces an existing
  repeat rule; `--clear-repeat` removes it entirely.
- JSON output (`--format json`) now includes `recurrence`,
  `recurrenceInterval`, and `recurrenceEnd` fields when a reminder has
  a recurrence rule, so scripts consuming `reminders show --format
  json` can see it.

`hourly` is intentionally rejected with a clear validation error
rather than silently degrading to a daily rule: EventKit's
`EKRecurrenceFrequency` has no hourly case (Reminders.app's own UI
doesn't expose hourly repeat either), so there's no faithful way to
represent it via `EKRecurrenceRule`.

Tested live against real Reminders.app data (add with daily/weekly/
monthly + custom interval + end date, edit to replace and to clear,
hourly correctly rejected, --repeat-interval/--repeat-until correctly
rejected without --repeat, conflicting --repeat + --clear-repeat
correctly rejected). Added Tests/RemindersTests/RecurrenceTests.swift
covering the frequency mapping, interval, end-date, and
representability logic at the unit level.

Note on test execution: this dev environment currently has only
Command Line Tools installed (no full Xcode), so `swift test` can't
link XCTest here (`xcrun --find xctest` fails) -- this affects the
pre-existing NaturalLanguageTests.swift identically, so it's an
environment gap, not something this change introduces. `swift build`
succeeds cleanly and all behavior was verified against the live
binary instead; the new test file is plain XCTest and should run
normally under CI or on a machine with full Xcode.
@morozovpersonal morozovpersonal changed the title Add recurring reminders and editable end dates WIP: Add recurring reminders and editable end dates Aug 24, 2026
@morozovpersonal
morozovpersonal marked this pull request as draft August 24, 2026 17:25
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.

Feature request: support recurrence rules (--repeat hourly/daily/weekly/monthly) Reminder repeat data

2 participants