Fixed multiple issues with recurring event editing via modal that were causing
events to be created instead of updated, and API parameter mismatches.
Key fixes:
1. **Restore Update Flow**:
- Added original_uid tracking to EventCreationData to distinguish create vs update
- Modal now routes to update endpoints when editing existing events instead of always creating new ones
- Implemented dual-path logic in on_event_create callback to handle both operations
2. **Fix "This and Future" Updates**:
- Added occurrence_date field to EventCreationData for recurring event context
- Backend now receives required occurrence_date parameter for this_and_future scope
- Populated occurrence_date from event start date in modal conversion
3. **Fix Update Scope Parameters**:
- Corrected scope parameter mapping to match backend API expectations:
* EditAll: "entire_series" → "all_in_series"
* EditFuture: "this_and_future" (correct)
* EditThis: "this_event_only" → "this_only"
4. **Enhanced Backend Integration**:
- Proper routing between update_event() and update_series() based on event type
- Correct parameter handling for both single and recurring event updates
- Added missing parameters (exception_dates, update_action, until_date)
Result: All recurring event edit operations now work correctly:
- ✅ "Edit all events in series" updates existing series instead of creating new
- ✅ "Edit this and future events" properly handles occurrence dates
- ✅ "Edit this event only" works for single instance modifications
- ✅ No more duplicate events created during editing
- ✅ Proper CalDAV server synchronization maintained
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>