Repository navigation
Fix(html5): who is talking tiles unified - #25359
ramonlsouza merged 3 commits into
Conversation
…d layout In the unified layout, audio-only (speaking) tiles are merged into the video stream set so they can be shown in the media-only state. The layout observer, however, counted them as cameras (SET_NUM_CAMERAS = videoStream.length), inflating numCameras whenever a user spoke with no webcam shared. numCameras > 0 both displays the top camera dock and shrinks the presentation/media area, so speaking with no webcams shared made the speaking-user avatar tiles appear at the top and shrink the presentation even while the presentation was visible. Those tiles are redundant there (the "who is talking" indicators are always visible), and the behavior was inconsistent between the initial state and the state after minimizing/restoring the presentation. Count only real camera streams (exclude AUDIO_ONLY) so numCameras reflects shared webcams only. Real webcams still show the dock and shrink the presentation, and audio-only tiles still appear in the media-only state (presentation minimized), where the dock is displayed regardless of the count. Adds a Playwright e2e test asserting that, in the unified layout with no webcams shared, speaking users' avatar tiles are not shown while the presentation is visible (before and after a minimize/restore cycle), while still appearing when the presentation is minimized. Co-authored-by: Tainan Felipe <[email protected]>
…gbluebutton#25235) Address two non-blocking review nits on the unified-layout who-is-talking test: - Document each waitForTimeout: the fixed waits are load-bearing, not incidental. On restore the camera dock re-appears in a transient window before the layout settles, so wasRemoved() would false-pass instantly against that window and miss the regression; the wait lets the transient pass before asserting the dock stays hidden. The minimize-side wait likewise lets the media-only layout settle before the positive assertion. Durations and style are unchanged (they match the sibling test). - Assert the navbar talking indicator stays visible after restore, so the test verifies the redundancy claim (tiles are unnecessary because the navbar keeps showing the speakers) instead of only stating it in a comment. Reuses the existing talkingIndicator selector. Co-authored-by: Tainan Felipe <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis change updates the layout observer to exclude audio-only video tiles when dispatching the camera count. It also adds Playwright coverage for Unified Layout without webcams, verifying camera-dock visibility when the presentation is minimized, its absence when the presentation is visible, and continued visibility of the talking indicator. Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant LayoutObserver
participant Store
participant UnifiedLayout
LayoutObserver->>LayoutObserver: Filter out AUDIO_ONLY video streams
LayoutObserver->>Store: Dispatch SET_NUM_CAMERAS(numCamerasValue)
Store->>UnifiedLayout: Update camera count state
UnifiedLayout->>UnifiedLayout: Hide avatar tiles while presentation is visible
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bigbluebutton-tests/playwright/layouts/layouts.ts (1)
324-353: 🩺 Stability & Availability | 🔵 Trivial | ⚖️ Poor tradeoffSequential fixed waits (3s + 4s) risk flakiness on slow CI.
Both assertions rely on
waitForTimeoutbefore checking dock visibility/absence rather than a retrying assertion. This mirrors the existing sibling method's style, so it's not a new pattern, but the added comments explicitly acknowledge a "settled-attribute signal would be better." Consider replacing with an explicit UI signal (e.g., a data attribute reflecting layout-settled state) or Playwright's auto-retryingexpect(locator).toBeVisible()/toBeHidden()with a generous timeout instead ofwaitForTimeout+ point-in-time check, to reduce total wait time and false negatives on slower runners.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bigbluebutton-tests/playwright/layouts/layouts.ts` around lines 324 - 353, The layout test in the media-only/minimize-and-restore flow relies on fixed `waitForTimeout` delays before checking `e.cameraDock`, which makes the assertions flaky on slow runners. Update the logic in this test to wait on a real settled-state signal from the UI if available, or switch to Playwright’s retrying visibility checks on the `cameraDock` and `presentationContainer` locators instead of point-in-time checks after a hard sleep. Keep the existing intent of the assertions in this method, but remove the load-bearing fixed waits and use an auto-waiting assertion with a timeout that matches the layout transition.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@bigbluebutton-tests/playwright/layouts/layouts.ts`:
- Around line 324-353: The layout test in the media-only/minimize-and-restore
flow relies on fixed `waitForTimeout` delays before checking `e.cameraDock`,
which makes the assertions flaky on slow runners. Update the logic in this test
to wait on a real settled-state signal from the UI if available, or switch to
Playwright’s retrying visibility checks on the `cameraDock` and
`presentationContainer` locators instead of point-in-time checks after a hard
sleep. Keep the existing intent of the assertions in this method, but remove the
load-bearing fixed waits and use an auto-waiting assertion with a timeout that
matches the layout transition.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a2b3f4bd-e113-4611-b83d-8274f03185a1
📒 Files selected for processing (3)
bigbluebutton-html5/imports/ui/components/layout/observer.tsxbigbluebutton-tests/playwright/layouts/layouts.spec.tsbigbluebutton-tests/playwright/layouts/layouts.ts
|
This pull request has conflicts ☹ |
|
✅ Automated tests have passed! |
The audio-only feature is documented as "only for unified layout", not grid-only: speaking tiles must still appear alongside a shared webcam over an open presentation (bigbluebutton#25235/bigbluebutton#25359). Revert the isGridEnabled gating back to isUnifiedLayout in useAudioOnlyUsers/useVideoStreams. The tiles lingering over a maximized presentation were grid avatars from useGridUsers' stale cache (uncapped by maxAudioOnlyUsers, and present even with showAudioOnlyOnFirstPage=false); clearing that cache when the grid is disabled stays as the actual fix.
…open (#25482) * fix(video-provider): hide audio-only tiles and grid avatars when a presentation is open * fix(video-provider): keep audio-only tiles scoped to the unified layout The audio-only feature is documented as "only for unified layout", not grid-only: speaking tiles must still appear alongside a shared webcam over an open presentation (#25235/#25359). Revert the isGridEnabled gating back to isUnifiedLayout in useAudioOnlyUsers/useVideoStreams. The tiles lingering over a maximized presentation were grid avatars from useGridUsers' stale cache (uncapped by maxAudioOnlyUsers, and present even with showAudioOnlyOnFirstPage=false); clearing that cache when the grid is disabled stays as the actual fix.



What does this PR do?
In the unified layout, when nobody is sharing a webcam and a user speaks, their avatar tile pops up at the top of the screen and shrinks the presentation — even though the navbar's "who is talking" indicator already shows who's speaking. The tiles show up a few moments after someone starts talking, and reliably after minimizing and restoring the presentation.
The unified layout merges audio-only "speaking" tiles into the video stream list, and the layout observer counted all of them as cameras. Since
numCameras > 0is the single trigger for both showing the top camera dock and shrinking the presentation, a camera-less speaker was enough to set both off.The fix excludes audio-only tiles from the camera count, so only real webcam streams trigger the dock. The speaking tiles still appear when the presentation is minimized (media-only state), since that path is gated by the presentation being closed, not by the camera count.
Closes Issue(s)
Closes #25235
How to test
meetingLayout=UNIFIED_LAYOUTand join with two users, no webcams.More
layouts/layouts.spec.ts) covering the minimize → restore flow with two camera-less speakers.numCameras; other layouts never get audio-only tiles, so they're unaffected.