Conversation
tito
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes two related issues that caused users to fail to rejoin ICS-scheduled meetings after a network drop:
end_datewas copied straight from the calendar event'sDTEND, so a 30-minute scheduled block turned into a 30-minute hard cap on rejoining even when participants were still in the call.detail("Meeting has ended", "Meeting is not active", etc.) via a newformatJoinErrorhelper inerrorUtils.ts, wired intoDailyRoom,LiveKitRoom, andMeetingSelection. The generic global toast inuseRoomJoinMeetingwas dropped in favor of colocated, specific messages.The calendar event's original
DTENDis still preserved incalendar_events.end_timefor reference — only the derivedmeetings.end_datechanged.Motivation and Context
A client was in a Daily.co meeting scheduled via ICS for 19:00–19:30 UTC on
room=<z>. Participants ran over the scheduled window. At 19:39 the client's internet dropped; when they came back at 19:40 they got400 "Meeting has ended"onPOST /v1/rooms/<z>/meetings/xxxxxx-.../join(frontend flattened this to the generic "Failed to join meeting. Please try again."). The other two participants, whose Daily WebRTC sockets never disconnected, stayed in the call — so from the client's perspective the room page said "no active meetings" while their colleagues were visibly still talking.Root cause traced to
server/reflector/worker/ics_sync.py:105:vs. manual meetings at
rooms.py:346which usecurrent_time + timedelta(hours=8). The join endpoint atrooms.py:582-583enforcesend_dateas a hard boundary for new joins, but Daily doesn't enforce it for existing connections — creating the asymmetric failure.Server DB snapshot for the incident confirms:
How Has This Been Tested?
Automated
Added regression test
test_create_upcoming_meeting_uses_8h_end_dateinserver/tests/test_ics_background_tasks.py— builds an ICS-linked calendar event with a 30-minuteDTEND, mocks the platform client, callscreate_upcoming_meetings_for_event, and assertsmeeting.end_date == event.start_time + 8h.Frontend:
(
pnpm lintis pre-existing broken —next lintdeprecated in Next 15; not touched in this PR.)Manual
8h ICS window, end-to-end: created an ICS event with
LOCATION: https://<UI_BASE_URL>/<test_room>, 15-min DTSTART/DTEND starting in ~5 min. Letsync_room_ics+create_upcoming_meetingsbeat tasks run. Confirmed in DB:Joined the meeting, stayed past the 15-min ICS window, disconnected one client, rejoined via the meeting link — got
200 OKwith a fresh Daily token (previously this returned400 "Meeting has ended").Error messaging per branch, forcing each backend condition:
→ navigating to
/<room>/<id>rendered "This meeting has ended. The organizer can start a new one."→ rendered "This meeting is no longer active. Ask the organizer to start it again."