Accurate waiting room participation counts tests#305
Draft
mikewillems wants to merge 22 commits intostagingfrom
Draft
Accurate waiting room participation counts tests#305mikewillems wants to merge 22 commits intostagingfrom
mikewillems wants to merge 22 commits intostagingfrom
Conversation
…ean online indicator. Fix log messages and null checks for breakout room transition variable. Replaced the generic warning in _presenceRoomId with a descriptive message explaining the uncommon null state. Change isNullOrEmpty check to a strict null check.
…TransitionToBreakoutRoomId on successful Agora connection. Separate caching logic into _cachedJoinInfoRoomId. Add a timer that logs a warning every 5 seconds if a breakout room transition has not completed, indicating a possible connection issue.
…oes not confirm a breakout room connection within 10 seconds, cancel the transition, return the user to the main meeting, and display an error message.
…localized and semantic
…nected participants
… participant selection.
#282). Can't run more than minutely.
firebase-tools now requires Java 21+, but the workflow relied on the runner's default JDK (Java 17). Add actions/setup-java@v4 with Temurin 21 before the emulator steps to fix the version mismatch.
… tests (emulator port mismatch).
|
Visit the preview URL for this PR (updated for commit f17bf1b): https://gen-hls-bkc-7627--pr305-mw-debt-waiting-room-q8o20ry8.web.app (expires Fri, 06 Mar 2026 02:11:19 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: eed668cca81618d491d024574a8f8a6003deaa8d |
…s, streams now estimate in time-bounded range
…host cleanup interval
…mParticipantCount pre-check window fix
…unts-testing # Conflicts: # client/lib/features/events/features/live_meeting/data/providers/live_meeting_provider.dart # firebase/functions/lib/events/live_meetings/update_live_stream_participant_count.dart # firebase/functions/test/events/live_meetings/update_live_stream_participant_count_test.dart # firebase/functions/test/events/live_meetings/vote_to_kick_test.dart
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.
What is in this PR?
This PR adds comprehensive test coverage and validation for the participant presence-tracking refactoring completed in PRs #281 and #282. It ensures the heartbeat mechanism, breakout room state transitions, and stale participant cleanup work correctly in the context of the actual UI state changes introduced by those PRs.
Changes in the codebase
1. Unit Tests: Presence Room ID Mapping (10 tests)
meeting_ui_state.dart+live_meeting_provider_presence_test.dartpresenceRoomIdForState()function that maps UI state → room ID for heartbeat updates'waiting-room'null2. Firestore Contract Tests (8 tests)
presence_firestore_contract_test.dartupdateMeetingPresencewrites and verifies document shapeisPresent: true, mostRecentPresentTimecurrentBreakoutRoomIdset correctlycurrentBreakoutRoomId: 'waiting-room'isPresent: falseisPresent: falsewithlastUpdatedTime3. Cloud Function Tests: UpdatePresenceStatus (8 tests)
update_presence_status_test.dartcurrentBreakoutRoomIdwhen marking offline (null, not empty string)lastUpdatedTimefor staleness check4. Cloud Function Tests: VoteToKick (6 tests, 4 new)
vote_to_kick_test.dart5. Cloud Function Tests: CleanupStaleParticipants (8 tests, from #282)
cleanup_stale_participants_test.dartcurrentBreakoutRoomIdduring cleanupChanges outside the codebase
None
Testing this PR
Run locally:
Additional information
Architecture alignment
_presenceRoomIdgetter now delegates topresenceRoomIdForState()to prevent logic drift_presenceRoomIdvaluegetBreakoutRoomFuture()sets_inTransitionToBreakoutRoomId, heartbeat picks it upleaveBreakoutRoom()clears transition state and notifies presencedispose()andonBeforeUnloadmark participant offlineTest coverage