Skip to content

Fix(html5): who is talking tiles unified - #25359

Merged
ramonlsouza merged 3 commits into
bigbluebutton:v4.0.x-developfrom
Tainan404:fix/25235-who-is-talking-tiles-unified
Jul 21, 2026
Merged

ramonlsouza merged 3 commits into
bigbluebutton:v4.0.x-developfrom
Tainan404:fix/25235-who-is-talking-tiles-unified

Conversation

@Tainan404

Copy link
Copy Markdown
Member

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 > 0 is 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

  1. Create a meeting with meetingLayout=UNIFIED_LAYOUT and join with two users, no webcams.
  2. Both users join audio, unmute, and talk.
  3. With the presentation visible, no avatar tiles should appear at the top — the presentation keeps its full height and the speakers show only in the navbar indicator.
  4. Minimize the presentation: the speaking users' tiles appear (this behavior is preserved).
  5. Restore the presentation: the tiles disappear again.
  6. Share a webcam: the camera dock appears and the presentation shrinks as usual.

More

  • Adds a Playwright test (layouts/layouts.spec.ts) covering the minimize → restore flow with two camera-less speakers.
  • The change is limited to the single place that writes numCameras; other layouts never get audio-only tiles, so they're unaffected.

imdt-claudiop and others added 2 commits July 1, 2026 19:25
…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]>
@Tainan404 Tainan404 changed the title Fix/25235 who is talking tiles unified Fix(html5): who is talking tiles unified Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 236dcb04-4fd0-403e-870e-463f26cbba65

📥 Commits

Reviewing files that changed from the base of the PR and between edd560c and 0cf7008.

📒 Files selected for processing (1)
  • bigbluebutton-tests/playwright/layouts/layouts.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • bigbluebutton-tests/playwright/layouts/layouts.spec.ts

Walkthrough

This 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
Loading

Suggested reviewers: prlanzarin, antobinary, arthurk12, ramonlsouza

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main unified-layout who-is-talking tile fix.
Description check ✅ Passed The description clearly explains the unified-layout camera-count fix and the added Playwright coverage.
Linked Issues check ✅ Passed The changes address #25235 by hiding audio-only tiles when the presentation is visible and preserving minimized-state behavior.
Out of Scope Changes check ✅ Passed The added test and observer change are scoped to the linked unified-layout behavior and do not introduce unrelated work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
bigbluebutton-tests/playwright/layouts/layouts.ts (1)

324-353: 🩺 Stability & Availability | 🔵 Trivial | ⚖️ Poor tradeoff

Sequential fixed waits (3s + 4s) risk flakiness on slow CI.

Both assertions rely on waitForTimeout before 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-retrying expect(locator).toBeVisible()/toBeHidden() with a generous timeout instead of waitForTimeout + 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

📥 Commits

Reviewing files that changed from the base of the PR and between f3a30f0 and edd560c.

📒 Files selected for processing (3)
  • bigbluebutton-html5/imports/ui/components/layout/observer.tsx
  • bigbluebutton-tests/playwright/layouts/layouts.spec.ts
  • bigbluebutton-tests/playwright/layouts/layouts.ts

@ramonlsouza ramonlsouza added this to the Release 4.0 milestone Jul 3, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@prlanzarin
prlanzarin requested review from AtilaU19 and removed request for prlanzarin July 20, 2026 17:39
@ramonlsouza
ramonlsouza merged commit 0c8e46b into bigbluebutton:v4.0.x-develop Jul 21, 2026
37 checks passed
AtilaU19 added a commit to AtilaU19/bigbluebutton that referenced this pull request Jul 21, 2026
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.
antobinary pushed a commit that referenced this pull request Jul 21, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants