From 496666ec5af4efa32c1f7ff318597d86b01fe436 Mon Sep 17 00:00:00 2001 From: Kyle Pope Date: Mon, 16 Mar 2026 13:41:20 +0800 Subject: [PATCH] Fix 'calendar no longer available' for invited events The shared-calendar removal guard checks allCalendarIds, which only contains the user's own + shared calendars. Invited events belong to the inviter's calendar, triggering a false positive. Skip the check for invited events. Co-Authored-By: Claude Opus 4.6 --- frontend/src/components/calendar/CalendarPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/calendar/CalendarPage.tsx b/frontend/src/components/calendar/CalendarPage.tsx index 7fb18f1..8274a89 100644 --- a/frontend/src/components/calendar/CalendarPage.tsx +++ b/frontend/src/components/calendar/CalendarPage.tsx @@ -242,9 +242,10 @@ export default function CalendarPage() { const selectedEventPermission = selectedEvent ? permissionMap.get(selectedEvent.calendar_id) ?? null : null; const selectedEventIsShared = selectedEvent ? sharedCalendarIds.has(selectedEvent.calendar_id) : false; - // Close panel if shared calendar was removed while viewing + // Close panel if shared calendar was removed while viewing (skip for invited events) useEffect(() => { if (!selectedEvent || allCalendarIds.size === 0) return; + if (selectedEvent.is_invited) return; if (!allCalendarIds.has(selectedEvent.calendar_id)) { handlePanelClose(); toast.info('This calendar is no longer available');