1cbab3f3ec8dbcf797057cf2f422fead67b65f92
Root cause: mergeIntoCache() unconditionally evicted every event in the fetched date range, even for calendars whose sync failed. Those calendars' events were removed and never restored, so the calendar appeared to vanish. Fix: - SyncError now decodes calendarId from the server's "calendar_id" field (added server-side in e0ea16f but not yet read by iOS). - mergeIntoCache() gains a keepKeysInRange parameter: events from failed calendars are retained (not evicted) even within the fetch window. - loadEvents() and prefetchBackground() compute the failed keys from the syncErrors list and pass them to mergeIntoCache. Result: when CalDAV / Google / HA sync fails for a specific calendar, the user sees stale-but-correct events alongside the existing error banner, instead of a completely empty calendar with no explanation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
No description provided
Languages
Swift
100%