Repository navigation
fix: Unified Layout: tile count plus aggregated users does not match total participant count (3.0) - #25254
Conversation
…otal participant count Backport of bigbluebutton#25103 (fixed bigbluebutton#25073 on v4.0.x-develop) to v3.0.x-develop. In the grid (video focus) layout, when participant webcams exceed the configured grid size, the surplus is aggregated into a "+N users" tile. The visible tiles plus the aggregated count did not match the total number of participants, and the grid could render more tiles than its configured size; toggling a webcam added/removed a tile instead of transitioning it. Fix (identical to bigbluebutton#25103, the useGridSize hook already exists on 3.0): - clamp numItems to gridSize when the grid is enabled; - compute streamsToRender by trimming exactly the streams beyond the grid size; - thread gridSize from useGridSize through the container. Adds a Playwright regression test (webcam/gridTileCount.spec.ts) that asserts visible tiles + aggregated overflow equals the participant count and that visible tiles never exceed the grid size. Co-authored-by: Tainan Felipe <[email protected]>
…E override The test joins gridSize + 1 webcam users sequentially, so the per-test timeout must scale with the grid size. MAX_GRID_SIZE can now be raised via GRID_TILE_COUNT_MAX_GRID_SIZE to run the exact pagination config from the issue (gridSize 24) on a host with enough capacity. 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 (5)
WalkthroughThis PR fixes a grid tile count mismatch in the video layout. It threads a Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
✅ Automated tests have passed! |
The overflow tile is created by trimming the tail of the combined streams array. Avatars are appended after cameras, so on a page fully occupied by cameras the trim removes a live camera: a 4-slot grid with 4 cameras shows only 3, the aggregated count gains a bogus +1, and since pagination chunks by page size upstream of the trim, the removed camera is unreachable on every page. Regression from the tile-count fix (bigbluebutton#25103/bigbluebutton#25254). The tile now only takes an avatar's slot; on a full-camera page it occupies a new slot instead ("grid == page"). Hidden users are counted from what the page actually shows, with the +1 correction applied only when an avatar is really replaced. Adds a camera-precedence regression test: full camera page stays visible, truthful aggregated count, pagination reaches every camera. Both grid specs self-provision their pagination config via clientSettingsOverride, so they run under default CI settings, and assert through data-* attributes instead of structural selectors. The spec's grid activation switches to minimize-presentation: the v3.0 layout modal the ported flow drove does not exist in this client. The overflow tile also no longer duplicates data-test="overflowTile" on wrapper and content: the nested duplicate forced .first() workarounds in tests and suppressed strict-mode violations.
The overflow tile is created by trimming the tail of the combined streams array. Avatars are appended after cameras, so on a page fully occupied by cameras the trim removes a live camera: a 4-slot grid with 4 cameras shows only 3, the aggregated count gains a bogus +1, and since pagination chunks by page size upstream of the trim, the removed camera is unreachable on every page. Regression from the tile-count fix (bigbluebutton#25103, bigbluebutton#25254). The tile now only takes an avatar's slot; on a full-camera page it occupies a new slot instead ("grid == page"). Hidden users are counted from what the page actually shows, with the +1 correction applied only when an avatar is really replaced. Add a regression test that covers: full camera page stays visible, accurate grid+cam aggregated count, pagination reaches every camera. The grid specs now self-provision their pagination config via clientSettingsOverride, so they run under default CI settings, and assert through data-* attributes instead of structural selectors. Additionally, switch the grid test spec to use minimize-presentation: the v3.0 layout modal does not exist in v4.0, so adaptation was needed. The overflow tile also no longer duplicates data-test="overflowTile", which was incorrect and made the AI that introduced the test in bigbluebutton#25254 hallucinate about "two video lists being rendered".
The overflow tile is created by trimming the tail of the combined streams array. Avatars are appended after cameras, so on a page fully occupied by cameras the trim removes a live camera: a 4-slot grid with 4 cameras shows only 3, the aggregated count gains a bogus +1, and since pagination chunks by page size upstream of the trim, the removed camera is unreachable on every page. Regression from the tile-count fix (bigbluebutton#25103, bigbluebutton#25254). The tile now only takes an avatar's slot; on a full-camera page it occupies a new slot instead ("grid == page"). Hidden users are counted from what the page actually shows, with the +1 correction applied only when an avatar is really replaced.
Add a regression test that covers: full camera page stays visible, accurate grid+cam aggregated count, pagination reaches every camera. The grid specs now self-provision their pagination config through a clientSettingsOverride create module, so they run under default CI settings instead of skipping forever, and assert through data-* attributes added to the video tiles instead of structural selectors. Additionally, switch the grid test spec to use minimize-presentation: the v3.0 layout modal does not exist in v4.0, so adaptation was needed. The overflow tile also no longer duplicates data-test="overflowTile", which was incorrect and made the AI that introduced the test in bigbluebutton#25254 hallucinate about "two video lists being rendered".
Add regression tests that cover: full camera page stays visible, accurate grid+cam aggregated count, pagination reaches every camera, and the overflow tile keeps camera-cell geometry when it mounts on a static grid (a stale grid template drops it into an implicit auto-height row). The geometry spec provisions the smallest grid that exercises the mechanism to keep CI cost down. The grid specs self-provision their pagination config through a clientSettingsOverride create module, so they run under default CI settings instead of skipping forever, and assert through data-* attributes added to the video tiles instead of structural selectors. Additionally, switch the grid test spec to use minimize-presentation: the v3.0 layout modal does not exist in v4.0, so adaptation was needed. The overflow tile also no longer duplicates data-test="overflowTile", which was incorrect and made the AI that introduced the test in bigbluebutton#25254 hallucinate about "two video lists being rendered".
Add regression tests that cover: full camera page stays visible, accurate grid+cam aggregated count, pagination reaches every camera, and the overflow tile keeps camera-cell geometry when it mounts on a static grid (a stale grid template drops it into an implicit auto-height row). The geometry spec provisions the smallest grid that exercises the mechanism to keep CI cost down. The grid specs self-provision their pagination config through a clientSettingsOverride create module, so they run under default CI settings instead of skipping forever, and assert through data-* attributes added to the video tiles instead of structural selectors. Additionally, switch the grid test spec to use minimize-presentation: the v3.0 layout modal does not exist in v4.0, so adaptation was needed. The overflow tile also no longer duplicates data-test="overflowTile", which was incorrect and made the AI that introduced the test in bigbluebutton#25254 hallucinate about "two video lists being rendered".
The overflow tile is created by trimming the tail of the combined streams array. Avatars are appended after cameras, so on a page fully occupied by cameras the trim removes a live camera: a 4-slot grid with 4 cameras shows only 3, the aggregated count gains a bogus +1, and since pagination chunks by page size upstream of the trim, the removed camera is unreachable on every page. Regression from the tile-count fix (#25103, #25254). The tile now only takes an avatar's slot; on a full-camera page it occupies a new slot instead ("grid == page"). Hidden users are counted from what the page actually shows, with the +1 correction applied only when an avatar is really replaced.
Add regression tests that cover: full camera page stays visible, accurate grid+cam aggregated count, pagination reaches every camera, and the overflow tile keeps camera-cell geometry when it mounts on a static grid (a stale grid template drops it into an implicit auto-height row). The geometry spec provisions the smallest grid that exercises the mechanism to keep CI cost down. The grid specs self-provision their pagination config through a clientSettingsOverride create module, so they run under default CI settings instead of skipping forever, and assert through data-* attributes added to the video tiles instead of structural selectors. Additionally, switch the grid test spec to use minimize-presentation: the v3.0 layout modal does not exist in v4.0, so adaptation was needed. The overflow tile also no longer duplicates data-test="overflowTile", which was incorrect and made the AI that introduced the test in #25254 hallucinate about "two video lists being rendered".



backport of #25103