Repository navigation
Fixed bug + added delete event - #209
Conversation
Iamlel
commented
Sep 4, 2026
- added delete event functionality for calendar
- fixed bug where many connections were created and then when claude killed them the app would stop working on claude.
- instead connection is created before listener and it will try to reconnect unless claude is closed.
|
Hi @Iamlel. Thanks for both of these. The connection fix landed separately in #208 this morning, and it moved that code out of |
- added delete event functionality for calendar - fixed bug where many connections were created and then when claude killed them the app would stop working on claude. - instead connection is created before listener and it will try to reconnect unless claude is closed.
|
Hi @mattt |
There was a problem hiding this comment.
🟡 Changes recommended
Recurring-event deletion can target unintended events, and invalid span values are not rejected.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds calendar event deletion through EventKit, including recurring-event span support.
Changes:
- Adds the
events_deletetool and deletion result. - Declares destructive and idempotent metadata.
- Supports deleting one occurrence or future occurrences.
File summaries
| File | Review |
|---|---|
App/Services/Calendar.swift |
Critical: Recurring-event identifiers can resolve to the wrong occurrence, causing unintended deletion. Moderate: Invalid span values silently default to .thisEvent. Nit: The described connection/reconnect fix is absent from the changes. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // For a recurring series this returns the first occurrence, | ||
| // so `.futureEvents` on it removes the whole series. | ||
| guard let event = self.eventStore.event(withIdentifier: identifier) else { |
| let span: EKSpan = | ||
| arguments["span"]?.stringValue == "futureEvents" ? .futureEvents : .thisEvent |
| Tool( | ||
| name: "events_delete", |
Every occurrence of a recurring event shares one identifier, and event(withIdentifier:) resolves it to the first occurrence, so thisEvent could remove the wrong one and futureEvents could remove the whole series. An optional start date now refetches the exact occurrence, recurring events without one are rejected, and an unknown span throws instead of defaulting to thisEvent. Follow-up to #209.