Repository navigation
fix(video-provider): clear stale grid avatars when a presentation is open - #25482
Conversation
…esentation is open
Walkthrough
Estimated code review effort: 1 (Trivial) | ~5 minutes 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.
Pull request overview
This PR updates the video-provider hooks to prevent grid-only UI elements (audio-only tiles and grid avatars) from persisting in the camera dock when a presentation is open, by keying visibility off the isGridEnabled storage flag.
Changes:
- Clear cached grid user/overflow state when
isGridEnabledis false so avatars/overflow don’t linger. - Gate audio-only tile inclusion on
isGridEnabled(instead of layout type) to hide them when the presentation disables the grid. - Update audio-only pagination limits (
showAudioOnlyOnFirstPage,maxAudioOnlyUsers) to be grid-enabled only.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| const layoutType = layoutSelect((i: Layout) => i.layoutType); | ||
| const isUnifiedLayout = layoutType === LAYOUT_TYPE.UNIFIED_LAYOUT; | ||
| const isGridEnabled = useStorageKey('isGridEnabled') as boolean; |
| const { data, loading, errors } = useAudioOnlySubscription(); | ||
| const layoutType = layoutSelect((i: Layout) => i.layoutType); | ||
| const isGridEnabled = useStorageKey('isGridEnabled'); | ||
| const { | ||
| showAudioOnlyOnFirstPage, | ||
| } = window.meetingClientSettings.public.kurento.cameraSortingModes; |
|
I believe this PR changes the current expected behavior for audio-only tiles. They are not intended to be exclusively "grid-only". When a real webcam already creates a camera dock above an open presentation, audio-only speakers are expected to appear alongside it. By gating audio-only tiles on isGridEnabled, this PR hides them whenever the presentation is open, including the established real-webcam scenario. That reverses the behavior documented by earlier issues and PRs. There was an issue about not showing audio only tiles when no webcam is being shared, it was recently handled by #25359. |
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.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (1)
380-390: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy liftAdd regression coverage for presentation transitions.
Test that disabling the grid clears cached grid and overflow users, and that audio-only users remain visible in unified layout while a presentation is open.
🤖 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-html5/imports/ui/components/video-provider/hooks/index.ts` around lines 380 - 390, Extend regression coverage for the hook containing the isGridEnabled branch. Add tests that disabling the grid clears gridItems, overflowCount, and overflowUsers, and that audio-only users remain visible in the unified layout while a presentation is open. Reuse the existing hook test setup and assert the returned grid and overflow state after each presentation 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-html5/imports/ui/components/video-provider/hooks/index.ts`:
- Around line 380-390: Extend regression coverage for the hook containing the
isGridEnabled branch. Add tests that disabling the grid clears gridItems,
overflowCount, and overflowUsers, and that audio-only users remain visible in
the unified layout while a presentation is open. Reuse the existing hook test
setup and assert the returned grid and overflow state after each presentation
transition.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6fb71a53-52d8-444f-8317-9cc6e22bce53
📒 Files selected for processing (1)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts
|
Thanks @ramonlsouza, you're right. I've reverted the audio-only gating, so those tiles stay scoped to the unified layout and the #25235/#25359 behavior (speaking tiles alongside a shared webcam over an open presentation) is preserved.
In our testing this still didn't hold on top of #25359, so this PR handles a separate problem. So #25359 covers the who-is-talking/audio-only tiles; this PR only clears that stale grid-avatar cache when the grid is disabled. With both in place: false → no camera-less tiles over an open presentation, and true → only audio-only tiles, capped at maxAudioOnlyUsers. |
✅ Automated tests have passed! |
…open Backport of #25482 (fixes #25861 on v3.0.x-develop) to v3.0.x-develop. Add a Playwright regression scenario covering restore, leave/join, a second minimize/restore cycle, and the audio-only tile alongside a webcam. Co-authored-by: Atila <[email protected]>
What does this PR do?
Clears the stale grid-avatar cache so camera-less "avatar" tiles stop lingering in the camera dock over a maximized presentation. Audio-only tiles are intentionally left scoped to the unified layout (not grid-only), so speaking tiles still appear alongside a shared webcam over an open presentation — per #25235/#25359.
Closes Issue(s)
Closes None
How to test
showAudioOnlyOnFirstPage=false, more thanmaxAudioOnlyUsersappear).showAudioOnlyOnFirstPage=true: speaking tiles still appear alongside the webcam over the open presentation (unchanged, per Inconsistent display of who is talking tile at the top (unified layout) #25235/Fix(html5): who is talking tiles unified #25359).