Repository navigation
fix(video): never let the grid overflow tile consume a camera slot, + - #25362
prlanzarin merged 5 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 (8)
🚧 Files skipped from review as they are similar to previous changes (8)
WalkthroughThis PR updates webcam overflow counting and grid selection so visible camera tiles, overflow counts, and pagination-aware rendering stay aligned. It also threads optional Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Spec
participant Page
participant Helpers
participant BBBWeb
Spec->>Page: init(createModules)
Page->>Helpers: createMeeting(createModules)
Helpers->>BBBWeb: request meeting creation
BBBWeb->>Helpers: XML response
Helpers->>Page: meetingID
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 fixes a Unified Layout regression where the “+N” overflow tile could trim the streams array in a way that hid an on-page live camera and made that camera unreachable via pagination. It adjusts both the client rendering rules (overflow tile can only replace an avatar, never a camera) and the hidden-user aggregation logic, and adds Playwright regression coverage.
Changes:
- Update
VideoListrendering to never drop a camera for the overflow tile; the tile replaces only an avatar slot, otherwise it occupies an extra slot (“grid == page”). - Fix overflow counting in
useGridUsersto reflect users actually hidden on the current page, including the +1 correction only when an avatar is replaced. - Add Playwright regression tests and new
data-*hooks (data-overflow-count,data-video-type,data-user-name,data-test="webcamVideoList") to make assertions more robust.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| bigbluebutton-tests/playwright/webcam/gridTileCount.ts | Adds pagination override constant + new cross-page camera reachability regression helper using data-* attributes. |
| bigbluebutton-tests/playwright/webcam/gridTileCount.spec.ts | Wires meeting creation parameters and adds a new regression spec for camera precedence + pagination reachability. |
| bigbluebutton-tests/playwright/core/elements.ts | Adds selectors for the webcam list container and stream-only webcam items. |
| bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx | Removes duplicate data-test placement from the overflow-tile inner container (test hooks now come from the wrapper). |
| bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx | Implements “overflow tile never hides a camera” rendering + exposes data-* attributes for tests. |
| bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts | Corrects overflow counting and ensures off-page render:false streams don’t affect grid/overflow math. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
bigbluebutton-tests/playwright/webcam/gridTileCount.spec.ts (1)
4-19: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winStale precondition comment.
The header comment (lines 4-11) still states the server must be pre-configured with a small grid size, but line 19 now self-provisions this via
PAGINATION_CLIENT_SETTINGS_OVERRIDE. This is only effective if the server honorsallowOverrideClientSettingsOnCreateCall, otherwise it silently falls back to the server's base config — a caveat the new regression test documents in its own skip message but isn't reflected here.📝 Suggested comment update
-// Precondition: the server under test must set a small grid size, e.g. -// public.kurento.pagination.desktopGridSizes: { moderator: 4, viewer: 4 } -// so the overflow path can be exercised with a practical number of webcams. -// (The issue's own reproduction likewise required a custom pagination config.) +// Precondition: the meeting is created with PAGINATION_CLIENT_SETTINGS_OVERRIDE to +// self-provision a small grid size (see gridTileCount.ts). This requires the server +// to honor allowOverrideClientSettingsOnCreateCall; otherwise the base server +// configuration applies and the test exercises whatever grid size is active.🤖 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/webcam/gridTileCount.spec.ts` around lines 4 - 19, Update the stale header comment in the Grid layout participant tile count spec so it matches the current setup in GridTileCount.initModPage: the test now passes PAGINATION_CLIENT_SETTINGS_OVERRIDE via createParameter instead of relying solely on a preconfigured small server grid. Mention that this override only applies when the server allows client settings overrides on create, otherwise the test uses the server’s base pagination config, and keep the note about skipping when the configured grid size exceeds MAX_GRID_SIZE.
🧹 Nitpick comments (2)
bigbluebutton-tests/playwright/webcam/gridTileCount.ts (2)
137-150: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract shared webcam-attendee setup helper.
This loop (create page → init → shareWebcam → collect name) duplicates the equivalent loop in
checkTileCountMatchesParticipants(lines 60-73), differing only in whether names are collected. Extracting a private helper would remove the duplication for both call sites.♻️ Proposed helper
+ private async createWebcamAttendees(count: number, namePrefix = 'Attendee'): Promise<string[]> { + const names: string[] = []; + for (let i = 0; i < count; i += 1) { + const name = `${namePrefix}${i + 1}`; + // eslint-disable-next-line no-await-in-loop + const viewerPage = await this.context.newPage(); + const viewer = new Page(this.browser, viewerPage, this.modPage.testInfo); + // eslint-disable-next-line no-await-in-loop + await viewer.init(false, { fullName: name, meetingId: this.modPage.meetingId }); + // eslint-disable-next-line no-await-in-loop + await viewer.shareWebcam({ shouldConfirmSharing: true }); + names.push(name); + } + return names; + }Then in
checkCameraPrecedenceAcrossPages:- const expectedNames: string[] = []; - - for (let i = 0; i < webcamUsers; i += 1) { - const name = `Attendee${i + 1}`; - const viewerPage = await this.context.newPage(); - const viewer = new Page(this.browser, viewerPage, this.modPage.testInfo); - await viewer.init(false, { fullName: name, meetingId: this.modPage.meetingId }); - await viewer.shareWebcam({ shouldConfirmSharing: true }); - expectedNames.push(name); - } + const expectedNames = await this.createWebcamAttendees(webcamUsers);🤖 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/webcam/gridTileCount.ts` around lines 137 - 150, The webcam attendee setup in this loop is duplicated in checkTileCountMatchesParticipants, so extract the repeated create page → init → shareWebcam flow into a private helper on the same class. Reuse the existing Page initialization and shareWebcam calls from checkCameraPrecedenceAcrossPages and the other matching method, and make the helper optionally collect the generated attendee name so both call sites can share the same implementation while preserving their different post-loop behavior.
179-190: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winFix SonarCloud failures: use
.datasetand provide a sort comparator.Static analysis flags these as failures (not just warnings), which may block the required check:
- Line 180: prefer
.dataset.userNameovergetAttribute('data-user-name')on the raw DOM element insideevaluateAll.- Line 182 (and the equivalent at line 186):
.sort()with no comparator is flagged; supply one even though correctness here only needs a stable, consistent ordering.🔧 Proposed fix
const cameraNames = async () => - cameraTiles.evaluateAll((tiles) => tiles.map((tile) => tile.getAttribute('data-user-name') ?? '')); + cameraTiles.evaluateAll((tiles) => tiles.map((tile) => (tile as HTMLElement).dataset.userName ?? '')); const seenNames = new Set<string>(await cameraNames()); - const page1Signature = [...seenNames].sort().join('|'); + const page1Signature = [...seenNames].sort((a, b) => a.localeCompare(b)).join('|'); await this.modPage.waitAndClick(e.nextPageVideoPagination); await expect - .poll(async () => (await cameraNames()).sort().join('|'), { + .poll(async () => (await cameraNames()).sort((a, b) => a.localeCompare(b)).join('|'), {🤖 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/webcam/gridTileCount.ts` around lines 179 - 190, The failure is in the camera name collection and comparison logic inside cameraNames and the expect.poll signature. Update the evaluateAll callback to read the name via each tile’s dataset.userName instead of getAttribute('data-user-name'), and replace both unsorted sort() calls with a comparator-based sort so SonarCloud accepts the ordering. Keep the changes localized to the cameraNames helper and the page1Signature / poll comparison logic in gridTileCount.Source: Linters/SAST tools
🤖 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.
Inline comments:
In `@bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts`:
- Around line 447-452: The overflow count in the video-provider hook is using
visibleStreamCount, which tracks rendered camera tiles rather than distinct
users, so multi-camera users can cause hidden users to be undercounted. Update
the hidden-user calculation in the hook logic around overflowCount.current to
base the count on users rather than stream tiles, using the existing
userCount/newGridUsers handling to derive the correct overflow label.
---
Outside diff comments:
In `@bigbluebutton-tests/playwright/webcam/gridTileCount.spec.ts`:
- Around line 4-19: Update the stale header comment in the Grid layout
participant tile count spec so it matches the current setup in
GridTileCount.initModPage: the test now passes
PAGINATION_CLIENT_SETTINGS_OVERRIDE via createParameter instead of relying
solely on a preconfigured small server grid. Mention that this override only
applies when the server allows client settings overrides on create, otherwise
the test uses the server’s base pagination config, and keep the note about
skipping when the configured grid size exceeds MAX_GRID_SIZE.
---
Nitpick comments:
In `@bigbluebutton-tests/playwright/webcam/gridTileCount.ts`:
- Around line 137-150: The webcam attendee setup in this loop is duplicated in
checkTileCountMatchesParticipants, so extract the repeated create page → init →
shareWebcam flow into a private helper on the same class. Reuse the existing
Page initialization and shareWebcam calls from checkCameraPrecedenceAcrossPages
and the other matching method, and make the helper optionally collect the
generated attendee name so both call sites can share the same implementation
while preserving their different post-loop behavior.
- Around line 179-190: The failure is in the camera name collection and
comparison logic inside cameraNames and the expect.poll signature. Update the
evaluateAll callback to read the name via each tile’s dataset.userName instead
of getAttribute('data-user-name'), and replace both unsorted sort() calls with a
comparator-based sort so SonarCloud accepts the ordering. Keep the changes
localized to the cameraNames helper and the page1Signature / poll comparison
logic in gridTileCount.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d610262c-3a0b-4b16-ad03-2a272fbbbbae
📒 Files selected for processing (6)
bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.tsbigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsxbigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsxbigbluebutton-tests/playwright/core/elements.tsbigbluebutton-tests/playwright/webcam/gridTileCount.spec.tsbigbluebutton-tests/playwright/webcam/gridTileCount.ts
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.
67c07dd to
b2a4ef3
Compare
| const applicable = thresholdsConf.thresholds | ||
| .filter((t: { users: number }) => t.users <= count) | ||
| .sort((a: { users: number }, b: { users: number }) => b.users - a.users)[0]; | ||
| if (applicable?.desktopPageSizes?.moderator != null) { | ||
| size = Number(applicable.desktopPageSizes.moderator); | ||
| } |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx (1)
382-410: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAccount for the overflow tile in
numOfStreams
When the overflow tile is appended on a full-camera page, the per-item count stays at the pre-overflow stream total. That leavesisFocusedand theUserActionsUI thresholds (numOfStreams > 2/< 3) one tile behind the actual layout.🤖 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/video-list/component.tsx` around lines 382 - 410, The stream count in video-list/component.tsx does not account for the overflow tile, so the layout-based thresholds are computed against the pre-overflow total. Update the `numOfStreams` calculation in the `streamsToRender`/`videoItems` flow to include the overflow tile when `shouldShowOverflowTile` is true, and keep using that adjusted count for `isFocused` and any `UserActions` visibility checks that depend on `numOfStreams`.
🧹 Nitpick comments (2)
.github/actions/install-bbb/action.yml (1)
171-173: 🔒 Security & Privacy | 🔵 TrivialSecurity default intentionally loosened for CI-only test installs.
API docs define
allowOverrideClientSettingsOnCreateCallas controlling whetherclientSettingsOverridecan be included in the body of the create POST request, and note it defaults to false for security. Since the POST body isn't checksum-covered, enabling this removes a safeguard against unsigned settings injection. This is acceptable for a CI-only test install, but worth confirming this script/config is never reused to provision a production-facing BBB instance.🤖 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 @.github/actions/install-bbb/action.yml around lines 171 - 173, The install-bbb action is intentionally enabling allowOverrideClientSettingsOnCreateCall, which weakens the default security posture by allowing clientSettingsOverride in create requests. Keep this setting limited to CI/test installs only by adding a clear CI-only safeguard or warning in the action setup, and ensure the change is not applied in any production provisioning path. Refer to the install-bbb action steps that write bigbluebutton/bbb-web.properties and the allowOverrideClientSettingsOnCreateCall setting to confirm the restriction.bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts (1)
323-323: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider extracting sub-logic to reduce cognitive complexity.
SonarCloud flags
useGridUserscognitive complexity as 17 (threshold 15), largely from the current-user re-injection block (lines 400-443) plus the overflow math. Extracting the self-user insertion into a small helper would bring this under the threshold without behavior changes.🤖 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` at line 323, The useGridUsers hook is too complex, mainly because the current-user re-injection logic and overflow calculations are all in one place. Refactor the self-user insertion block into a small helper function and, if needed, split the overflow math into another helper so useGridUsers stays below the cognitive complexity threshold while preserving the existing behavior. Use the useGridUsers symbol and the current-user re-injection section to locate the extraction points.Source: Linters/SAST tools
🤖 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.
Outside diff comments:
In
`@bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx`:
- Around line 382-410: The stream count in video-list/component.tsx does not
account for the overflow tile, so the layout-based thresholds are computed
against the pre-overflow total. Update the `numOfStreams` calculation in the
`streamsToRender`/`videoItems` flow to include the overflow tile when
`shouldShowOverflowTile` is true, and keep using that adjusted count for
`isFocused` and any `UserActions` visibility checks that depend on
`numOfStreams`.
---
Nitpick comments:
In @.github/actions/install-bbb/action.yml:
- Around line 171-173: The install-bbb action is intentionally enabling
allowOverrideClientSettingsOnCreateCall, which weakens the default security
posture by allowing clientSettingsOverride in create requests. Keep this setting
limited to CI/test installs only by adding a clear CI-only safeguard or warning
in the action setup, and ensure the change is not applied in any production
provisioning path. Refer to the install-bbb action steps that write
bigbluebutton/bbb-web.properties and the allowOverrideClientSettingsOnCreateCall
setting to confirm the restriction.
In `@bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts`:
- Line 323: The useGridUsers hook is too complex, mainly because the
current-user re-injection logic and overflow calculations are all in one place.
Refactor the self-user insertion block into a small helper function and, if
needed, split the overflow math into another helper so useGridUsers stays below
the cognitive complexity threshold while preserving the existing behavior. Use
the useGridUsers symbol and the current-user re-injection section to locate the
extraction points.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0d6b7569-03cf-437a-85f0-9f67894aa0f1
📒 Files selected for processing (9)
.github/actions/install-bbb/action.ymlbigbluebutton-html5/imports/ui/components/video-provider/hooks/index.tsbigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsxbigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsxbigbluebutton-tests/playwright/core/elements.tsbigbluebutton-tests/playwright/core/helpers.tsbigbluebutton-tests/playwright/core/page.tsbigbluebutton-tests/playwright/webcam/gridTileCount.spec.tsbigbluebutton-tests/playwright/webcam/gridTileCount.ts
✅ Files skipped from review due to trivial changes (1)
- bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- bigbluebutton-tests/playwright/core/elements.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bigbluebutton-tests/playwright/webcam/gridTileCount.ts (1)
184-194: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider extracting the overflow-vs-camera geometry check and aligning both call sites.
The geometry assertion here (Lines 187-194) is duplicated in
checkOverflowTileGeometryOnLateJoin(Lines 261-272), and the two copies have diverged: this one asserts only height, while the late-join copy asserts both height and width. If width regressions are worth catching for the recompute path, they arguably matter here too. A shared helper keeps the checks in sync.♻️ Suggested helper (add to the class, then call from both methods)
private async expectOverflowTileMatchesCameraCell( overflowTile: Locator, cameraTile: Locator, ): Promise<void> { const tileBox = await overflowTile.boundingBox(); const cameraBox = await cameraTile.boundingBox(); expect(tileBox, 'the overflow tile must have a bounding box').not.toBeNull(); expect(cameraBox, 'camera tiles must have a bounding box').not.toBeNull(); expect( Math.abs((tileBox?.height ?? 0) - (cameraBox?.height ?? 1)), `the overflow tile (${tileBox?.height}px) must be as tall as a camera cell (${cameraBox?.height}px)`, ).toBeLessThanOrEqual(2); expect( Math.abs((tileBox?.width ?? 0) - (cameraBox?.width ?? 1)), `the overflow tile (${tileBox?.width}px) must be as wide as a camera cell (${cameraBox?.width}px)`, ).toBeLessThanOrEqual(2); }Then replace both inline blocks with
await this.expectOverflowTileMatchesCameraCell(overflowTile, cameraTiles.first());.🤖 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/webcam/gridTileCount.ts` around lines 184 - 194, The overflow-tile geometry assertion is duplicated between the current check and checkOverflowTileGeometryOnLateJoin, and the two copies have drifted apart. Add a shared helper on the class, such as expectOverflowTileMatchesCameraCell, and have both call sites use it so the overflowTile vs cameraTiles.first() checks stay aligned. Include both height and width comparisons in the helper so the recompute path and late-join path enforce the same geometry expectations.
🤖 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/webcam/gridTileCount.ts`:
- Around line 184-194: The overflow-tile geometry assertion is duplicated
between the current check and checkOverflowTileGeometryOnLateJoin, and the two
copies have drifted apart. Add a shared helper on the class, such as
expectOverflowTileMatchesCameraCell, and have both call sites use it so the
overflowTile vs cameraTiles.first() checks stay aligned. Include both height and
width comparisons in the helper so the recompute path and late-join path enforce
the same geometry expectations.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6f127df4-5cf4-4491-bc27-383df4e9f821
📒 Files selected for processing (3)
bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsxbigbluebutton-tests/playwright/webcam/gridTileCount.spec.tsbigbluebutton-tests/playwright/webcam/gridTileCount.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx
10f5d0f to
2e694f7
Compare
bbb-web reads the inline clientSettingsOverride only from the create POST body as an XML module; the GET query param variant is silently ignored. Let tests pass createModules through init/createMeeting. The checksum still covers only the query string.
The grid regression specs provision their pagination config through a clientSettingsOverride create module, which bbb-web only honors when allowOverrideClientSettingsOnCreateCall is set — it defaults to false, so without this the specs skip on every CI run. Set it once at install time; bbb-conf --restart already reloads bbb-web afterwards.
The grid template only recomputes when the stream count, layout, focus or dock size changes. The overflow tile mounts and unmounts on overflowCount transitions that change none of those (a user joins or leaves without a camera), so the extra tile lands in an implicit auto-height CSS grid row and renders as a thin strip instead of a camera-sized cell. Recompute on overflowCount changes as well.
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".
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bigbluebutton-tests/playwright/webcam/gridTileCount.spec.ts (1)
26-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated grid-size skip-guard across all three tests.
The
test.skip(!Number.isFinite(gridSize) || gridSize < 1 || gridSize > MAX_GRID_SIZE, ...)block is copy-pasted verbatim in all three tests. Consider extracting a small shared helper (e.g.skipIfGridSizeInvalid(gridSize)) to avoid drift if the guard logic changes later.♻️ Proposed refactor
+function skipIfGridSizeInvalid(gridSize: number) { + test.skip( + !Number.isFinite(gridSize) || gridSize < 1 || gridSize > MAX_GRID_SIZE, + `requires public.kurento.pagination.desktopGridSizes <= ${MAX_GRID_SIZE} ` + + `to exercise the overflow path with a practical number of webcams (configured: ${gridSize})`, + ); +}Then replace each inline block with
skipIfGridSizeInvalid(gridSize);.Also applies to: 51-56, 84-89
🤖 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/webcam/gridTileCount.spec.ts` around lines 26 - 31, The same grid-size skip guard is duplicated across the three tests in gridTileCount.spec.ts, so refactor it into a shared helper to prevent drift. Add a small helper such as skipIfGridSizeInvalid(gridSize) near the existing gridTileCount test logic, move the Number.isFinite/MAX_GRID_SIZE check and test.skip call into it, and replace each inline guard in the three test cases with a call to that helper.
🤖 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/webcam/gridTileCount.spec.ts`:
- Around line 26-31: The same grid-size skip guard is duplicated across the
three tests in gridTileCount.spec.ts, so refactor it into a shared helper to
prevent drift. Add a small helper such as skipIfGridSizeInvalid(gridSize) near
the existing gridTileCount test logic, move the Number.isFinite/MAX_GRID_SIZE
check and test.skip call into it, and replace each inline guard in the three
test cases with a call to that helper.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 87ab97c2-558c-4574-a616-2c5fc1727011
📒 Files selected for processing (6)
.github/actions/install-bbb/action.ymlbigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsxbigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsxbigbluebutton-tests/playwright/core/elements.tsbigbluebutton-tests/playwright/webcam/gridTileCount.spec.tsbigbluebutton-tests/playwright/webcam/gridTileCount.ts
✅ Files skipped from review due to trivial changes (1)
- bigbluebutton-html5/imports/ui/components/video-provider/video-list/overflow-tile/component.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
- .github/actions/install-bbb/action.yml
- bigbluebutton-tests/playwright/core/elements.ts
- bigbluebutton-html5/imports/ui/components/video-provider/video-list/component.tsx
- bigbluebutton-tests/playwright/webcam/gridTileCount.ts
2e694f7 to
ca8b02d
Compare
|
✅ Automated tests have passed! |
|
the pull request does what it says it does, but... is it the expected behavior for the grid? with the changes made in this pull request and the setup described in the "How to test" section, we end up with 5 tiles being displayed with
from the grid updates issue (#24186): Grid mode will display the first 25 items (each tile contains a webcam or avatar of the user). However, if there are 26 or more, the last item will turn into a special tile which indicates that there are users who are not displayed. Clicking on this tile opens the userslist (if hidden). |
Forwarding the internal reply for the sake of transparency: IMO, what the PR is fixing should be the expected behavior [...]. Active camera pages should always be honored, regardless of grid sizes. If they aren't, we're breaking contracts:
The alternative approach would be to make grid size supersede (supplant) page sizes. This is also not a thing that is implemented right now (see the reproduction steps above - pagination isn't activated in that scenario and we lose a camera). Additionally, implementing it would still break proctoring use cases. |
Four of the 88 tests the previous commit moved to the nightly go back to @ci, in the form they had before: - breakout-listen membership and mic attach survive a client reload - listening to a second room switches without two concurrent memberships - a self-transfer to the parent meeting keeps the moderator in audio - overflow tile never hides a camera and pagination reaches every camera They are regression tests that came with the LiveKit listen-in work of bigbluebutton#25638 and the grid overflow fix of bigbluebutton#25362. The first two are the only tests that reload or switch rooms during a listen-in. The room switch also guards e4c3dea, where the microphone could stay published in the main room during a listen-in, so everyone there heard the moderator. 84 tests now leave the gate: about 34 of its 161 minutes of test time instead of 36. The tests going back have no @media tag, so the legacy media job does not change. The nightly's @nightly jobs grow to about 43 of their 150 minutes instead of 45.





What does this PR do?
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 (fix: Unified Layout: tile count plus aggregated users does not match total participant count #25103, fix: Unified Layout: tile count plus aggregated users does not match total participant count (3.0) #25254).
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.
or dock size changes. The overflow tile mounts and unmounts on
overflowCount transitions that change none of those (a user joins or
leaves without a camera), so the extra tile lands in an implicit
auto-height CSS grid row and renders as a thin strip instead of a
camera-sized cell. Recompute on overflowCount changes as well.
Auxiliary changes
POST body as an XML module; the GET query param variant is silently
ignored. Let tests pass createModules through init/createMeeting. The
checksum still covers only the query string.
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 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 fix: Unified Layout: tile count plus aggregated users does not match total participant count (3.0) #25254
hallucinate about "two video lists being rendered".
clientSettingsOverride create module, which bbb-web only honors when
allowOverrideClientSettingsOnCreateCall is set - it defaults to false,
so without this the specs skip on every CI run. Set it once at install
time; bbb-conf --restart already reloads bbb-web afterwards.
Closes Issue(s)
None
How to test
With the presentation minimized (grid active), use a fixed session that it not sharing webcams to verify:
Presentation maximized (no grid): pagination works as expected with 5 cameras.