Skip to content

Introduce showAudioOnlyOnFirstPage and maxAudioOnlyUsers settings - #24574

Merged
antobinary merged 3 commits into
bigbluebutton:v3.0.x-releasefrom
ramonlsouza:i-24552
Feb 9, 2026
Merged

antobinary merged 3 commits into
bigbluebutton:v3.0.x-releasefrom
ramonlsouza:i-24552

Conversation

@ramonlsouza

Copy link
Copy Markdown
Member

What does this PR do?

Add support for displaying audio-only tiles on the first page of the webcam list for users who are speaking but don't have their cameras enabled. Audio-only tiles show the user avatar with a visual indicator that they're speaking.

Two new configurable settings control this feature behavior:

  • showAudioOnlyOnFirstPage (default: true) - enable audio-only tiles for speaking users without cameras on first page
  • maxAudioOnlyUsers (default: 2) - maximum number of audio-only tiles to display
audio-tile.mp4

Closes Issue(s)

Closes #24552

How to test

  1. join a meeting with multiple users, some with cameras and some without
  2. have audio-only users speak - verify their tiles appear on page 1
  3. verify pagination navigation works correctly with the adjusted page count

@coderabbitai

coderabbitai Bot commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds audio-only user support to the video provider: two new CameraSortingModes settings (showAudioOnlyOnFirstPage, maxAudioOnlyUsers), a GraphQL AUDIO_ONLY_USERS_SUBSCRIPTION and AudioOnlyUsersResponse, a useAudioOnlyUsers hook (with internal subscription), a new AudioOnlyStream type and inclusion in StreamItem, changes to pagination to reserve/append audio-only streams, UI adjustments to render audio-only items without video elements, and default values added to initial settings and YAML config.

Sequence Diagram

sequenceDiagram
    participant VideoStreams as useVideoStreams Hook
    participant AudioOnlyHook as useAudioOnlyUsers Hook
    participant Subscription as useAudioOnlySubscription
    participant GraphQL as GraphQL Subscription
    participant Pagination as Pagination Logic
    participant Renderer as Video Item Renderer

    VideoStreams->>AudioOnlyHook: request audio-only users (meetingId, voiceState)
    AudioOnlyHook->>Subscription: start subscription
    Subscription->>GraphQL: subscribe to AUDIO_ONLY_USERS_SUBSCRIPTION
    GraphQL-->>Subscription: emit AudioOnlyUsersResponse
    Subscription-->>AudioOnlyHook: deliver audio-only user data
    AudioOnlyHook->>AudioOnlyHook: map to AudioOnlyStream[]
    AudioOnlyHook-->>VideoStreams: return AudioOnlyStream[]
    VideoStreams->>Pagination: merge audio-only into stream list (respect showAudioOnlyOnFirstPage, maxAudioOnlyUsers)
    Pagination->>VideoStreams: return merged StreamItem[]
    VideoStreams-->>Renderer: provide StreamItem[]
    Renderer->>Renderer: render AUDIO_ONLY without video element, others with video element
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: introducing two new settings (showAudioOnlyOnFirstPage and maxAudioOnlyUsers) that enable audio-only tiles in the webcam list.
Description check ✅ Passed The description is directly related to the changeset, explaining what the PR does, the two new settings, testing steps, and linking to issue #24552.
Linked Issues check ✅ Passed The PR implements the requirements from issue #24552 by adding audio-only tiles to ensure speaking users without cameras are visible in the webcam list on the first page.
Out of Scope Changes check ✅ Passed All changes are in-scope: type definitions, GraphQL subscriptions, hooks, UI components, and configuration for audio-only tile support directly address the linked issue objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@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.

Actionable comments posted: 2

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/hooks/index.ts (1)

473-484: Revise page-size math for audio-only slot reservation to maintain consistent pagination semantics.

The availableSlots calculation at lines 72 and 93 subtracts pinned and local stream counts from myPageSize, but this is incorrect because pin and mine are partitioned out and added after pagination (lines 105-107), not within the paginated others slice (line 84). The others slice uses myPageSize directly, so subtracting pinnedAndLocalCount creates inconsistent page-size semantics—page 1 ends up with fewer remote streams than pages 2+, causing page boundaries and tile counts to shift unexpectedly.

Keep availableSlots aligned with myPageSize and only displace remote streams to make room for audio-only users:

🛠️ Suggested adjustment
-          const pinnedAndLocalCount = pin.length + mine.length;
-          const availableSlots = myPageSize - pinnedAndLocalCount;
+          const availableSlots = myPageSize;
           const maxAudioOnlySlots = Math.min(availableSlots, maxAudioOnlyUsers);
           audioOnlySlotsUsedOnPage1 = Math.min(uniqueAudioOnly.length, maxAudioOnlySlots);
-        const pinnedAndLocalCount = pin.length + mine.length;
-        const availableSlots = myPageSize - pinnedAndLocalCount;
+        const availableSlots = myPageSize;
         const audioOnlyToAdd = uniqueAudioOnly.slice(0, audioOnlySlotsUsedOnPage1);
🤖 Fix all issues with AI agents
In `@bigbluebutton-html5/imports/ui/components/video-provider/queries.ts`:
- Around line 123-176: AUDIO_ONLY_USERS_SUBSCRIPTION currently selects any user
with voice.lastFloorTime > "0", causing stale audio-only tiles; update the
subscription filter inside user.where to include only current speakers by adding
voice: { floor: { _eq: true } } (or replace/augment with a recency condition on
voice.lastFloorTime, e.g. lastFloorTime > "<recent-timestamp-or-epoch-window>")
so that only actively speaking users (via voice.floor) or those within the
chosen time window are returned; adjust the query's voice selection remains the
same so UI code reading voice.floor and voice.lastFloorTime continues to work.

In `@bigbluebutton-html5/imports/ui/core/initial-values/meetingClientSettings.ts`:
- Around line 356-360: The default in the meetingClientSettings.ts
cameraSortingModes object currently sets showAudioOnlyOnFirstPage to false
causing a mismatch with private/config/settings.yml; update the default in the
cameraSortingModes block (the showAudioOnlyOnFirstPage property) to true so
initial-values align with settings.yml (or add a short comment in the
cameraSortingModes object explaining an intentional override if you choose to
keep false).

Comment on lines +123 to +176
export const AUDIO_ONLY_USERS_SUBSCRIPTION = gql`
subscription AudioOnlyUsers {
user(
where: {
cameras_aggregate: {
count: {
predicate: { _eq: 0 },
},
},
voice: {
lastFloorTime: {
_gt: "0",
},
},
},
order_by: {
voice: {
lastFloorTime: desc,
},
},
) {
meetingId
name
userId
nameSortable
pinned
away
disconnected
role
avatar
color
presenter
clientType
raiseHand
isModerator
reactionEmoji
voice {
floor
lastFloorTime
joined
listenOnly
userId
deafened
}
}
}
`;

export default {
OWN_VIDEO_STREAMS_QUERY,
VIDEO_STREAMS_SUBSCRIPTION,
VIEWERS_IN_WEBCAM_COUNT_SUBSCRIPTION,
GRID_USERS_SUBSCRIPTION,
AUDIO_ONLY_USERS_SUBSCRIPTION,

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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, find and examine the query file
find . -type f -name "queries.ts" | grep -i video-provider

Repository: bigbluebutton/bigbluebutton

Length of output: 140


🏁 Script executed:

# Also search for the file more broadly
fd "queries.ts" | head -20

Repository: bigbluebutton/bigbluebutton

Length of output: 1786


🏁 Script executed:

# Get context about this query and related code
rg "AUDIO_ONLY_USERS_SUBSCRIPTION" --type ts -B 5 -A 20

Repository: bigbluebutton/bigbluebutton

Length of output: 11171


🏁 Script executed:

# Look for how this query is used in the codebase
rg "AUDIO_ONLY_USERS_SUBSCRIPTION" --type ts -A 5

Repository: bigbluebutton/bigbluebutton

Length of output: 2731


🏁 Script executed:

# Search for any documentation or specs about the speaking criteria
rg "speaking|floor|lastFloorTime" --type ts --type md --type txt | head -50

Repository: bigbluebutton/bigbluebutton

Length of output: 6285


🏁 Script executed:

# Look for hooks that might use this subscription
rg "useSubscription|AUDIO_ONLY" --type ts | head -30

Repository: bigbluebutton/bigbluebutton

Length of output: 2182


🏁 Script executed:

# Read the complete useAudioOnlyUsers hook to see all filtering
sed -n '/export const useAudioOnlyUsers/,/^export const use/p' bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts | head -100

Repository: bigbluebutton/bigbluebutton

Length of output: 1523


🏁 Script executed:

# Look for GraphQL schema definition
cat bbb-graphql-server/bbb-graphql-schema.md | grep -A 10 -B 5 "floor\|lastFloorTime" | head -60

Repository: bigbluebutton/bigbluebutton

Length of output: 312


🏁 Script executed:

# Check for any comments or issues about audio-only behavior
rg "audio.?only|floor.*speaker|speaking" --type ts --type md -i -B 2 -A 2 | head -100

Repository: bigbluebutton/bigbluebutton

Length of output: 9936


🏁 Script executed:

# Look for any recent discussion or TODOs about this query
rg "AUDIO_ONLY|lastFloorTime|voice.*floor" -B 3 -A 3 --type ts | head -150

Repository: bigbluebutton/bigbluebutton

Length of output: 14534


🏁 Script executed:

# Check component.tsx to see how privileged streams are determined
cat bigbluebutton-html5/imports/ui/components/video-provider/component.tsx | grep -A 10 -B 5 "floor\|privileged\|AUDIO_ONLY"

Repository: bigbluebutton/bigbluebutton

Length of output: 1532


🏁 Script executed:

# Look for any recent issues or comments about this query
rg "audio.?only.*floor|lastFloorTime.*pruning|speaking.*audio" -i --type ts --type md | head -30

Repository: bigbluebutton/bigbluebutton

Length of output: 571


🏁 Script executed:

# Check if there are any TODOs or FIXMEs related to the audio-only query
rg "TODO|FIXME|XXX" bigbluebutton-html5/imports/ui/components/video-provider/queries.ts

Repository: bigbluebutton/bigbluebutton

Length of output: 53


🏁 Script executed:

# Search for any discussion about how audio-only users should be filtered
rg "cameras_aggregate.*count.*0|audio.*only.*display|speaker.*active" -i --type ts --type md | head -20

Repository: bigbluebutton/bigbluebutton

Length of output: 53


🏁 Script executed:

# Look for any issues or discussions about audio-only tile behavior
rg "audio.*only.*page|audio.*only.*first|speaker.*current|floor.*true" -i --type ts --type md --type json | grep -i "audio\|floor" | head -20

Repository: bigbluebutton/bigbluebutton

Length of output: 2027


🏁 Script executed:

# Check if there's a separate filter or pruning happening elsewhere for audio-only
rg "useAudioOnlyUsers|AudioOnlyStream" -A 20 --type ts | grep -E "filter|prune|remove|speaking|floor" | head -30

Repository: bigbluebutton/bigbluebutton

Length of output: 843


Add a filter for current speakers to prevent stale audio-only tiles from occupying page 1 slots.

The query currently includes users who have ever spoken (lastFloorTime > "0"), not just those actively speaking. Since audio-only tiles are limited to page 1 and the floor field is already fetched but unused, consider filtering on floor: { _eq: true } to show only active speakers, or add a recency window on lastFloorTime if historical activity should be considered.

🔍 Possible query adjustment (if you want only active speakers)
-        voice: {
-          lastFloorTime: {
-            _gt: "0",
-          },
-        },
+        voice: {
+          floor: { _eq: true },
+          lastFloorTime: {
+            _gt: "0",
+          },
+        },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const AUDIO_ONLY_USERS_SUBSCRIPTION = gql`
subscription AudioOnlyUsers {
user(
where: {
cameras_aggregate: {
count: {
predicate: { _eq: 0 },
},
},
voice: {
lastFloorTime: {
_gt: "0",
},
},
},
order_by: {
voice: {
lastFloorTime: desc,
},
},
) {
meetingId
name
userId
nameSortable
pinned
away
disconnected
role
avatar
color
presenter
clientType
raiseHand
isModerator
reactionEmoji
voice {
floor
lastFloorTime
joined
listenOnly
userId
deafened
}
}
}
`;
export default {
OWN_VIDEO_STREAMS_QUERY,
VIDEO_STREAMS_SUBSCRIPTION,
VIEWERS_IN_WEBCAM_COUNT_SUBSCRIPTION,
GRID_USERS_SUBSCRIPTION,
AUDIO_ONLY_USERS_SUBSCRIPTION,
export const AUDIO_ONLY_USERS_SUBSCRIPTION = gql`
subscription AudioOnlyUsers {
user(
where: {
cameras_aggregate: {
count: {
predicate: { _eq: 0 },
},
},
voice: {
floor: { _eq: true },
lastFloorTime: {
_gt: "0",
},
},
},
order_by: {
voice: {
lastFloorTime: desc,
},
},
) {
meetingId
name
userId
nameSortable
pinned
away
disconnected
role
avatar
color
presenter
clientType
raiseHand
isModerator
reactionEmoji
voice {
floor
lastFloorTime
joined
listenOnly
userId
deafened
}
}
}
`;
export default {
OWN_VIDEO_STREAMS_QUERY,
VIDEO_STREAMS_SUBSCRIPTION,
VIEWERS_IN_WEBCAM_COUNT_SUBSCRIPTION,
GRID_USERS_SUBSCRIPTION,
AUDIO_ONLY_USERS_SUBSCRIPTION,
🤖 Prompt for AI Agents
In `@bigbluebutton-html5/imports/ui/components/video-provider/queries.ts` around
lines 123 - 176, AUDIO_ONLY_USERS_SUBSCRIPTION currently selects any user with
voice.lastFloorTime > "0", causing stale audio-only tiles; update the
subscription filter inside user.where to include only current speakers by adding
voice: { floor: { _eq: true } } (or replace/augment with a recency condition on
voice.lastFloorTime, e.g. lastFloorTime > "<recent-timestamp-or-epoch-window>")
so that only actively speaking users (via voice.floor) or those within the
chosen time window are returned; adjust the query's voice selection remains the
same so UI code reading voice.floor and voice.lastFloorTime continues to work.

…ntSettings.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@antobinary antobinary added this to the Release 3.0 milestone Jan 29, 2026
@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown

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

@sonarqubecloud

sonarqubecloud Bot commented Feb 2, 2026

Copy link
Copy Markdown

@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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts`:
- Around line 531-569: The availableSlots calculation can go negative when
pinned/local streams exceed myPageSize, which corrupts audioOnlySlotsUsedOnPage1
and downstream pagination; after computing availableSlots = myPageSize -
pinnedAndLocalCount in both places (the initial audioOnlySlotsUsedOnPage1 block
and the "Add audio-only users only on page 1" block), clamp it to zero (e.g.
availableSlots = Math.max(0, availableSlots)) before using it to compute
maxAudioOnlySlots, audioOnlySlotsUsedOnPage1, or slicing paginatedStreams so
negative values cannot drive incorrect pagination.

Comment on lines +531 to +569
// This is needed to adjust pagination for displaced video streams
let audioOnlySlotsUsedOnPage1 = 0;
if (showAudioOnlyOnFirstPage && audioOnlyUsers.length > 0) {
const uniqueAudioOnly = audioOnlyUsers.filter(
(audioUser) => !streams.find((s) => s.userId === audioUser.userId),
);

if (uniqueAudioOnly.length > 0) {
const pinnedAndLocalCount = pin.length + mine.length;
const availableSlots = myPageSize - pinnedAndLocalCount;
const maxAudioOnlySlots = Math.min(availableSlots, maxAudioOnlyUsers);
audioOnlySlotsUsedOnPage1 = Math.min(uniqueAudioOnly.length, maxAudioOnlySlots);
}
}
totalNumberOfOtherStreams = others.length + audioOnlySlotsUsedOnPage1;

const effectiveChunkIndex = currentVideoPageIndex > 0
? chunkIndex - audioOnlySlotsUsedOnPage1
: chunkIndex;

let paginatedStreams = sortVideoStreams(others, sortingMethod)
.slice(effectiveChunkIndex, (effectiveChunkIndex + myPageSize)) || [];

// Add audio-only users only on page 1
if (showAudioOnlyOnFirstPage && currentVideoPageIndex === 0 && audioOnlySlotsUsedOnPage1 > 0) {
const uniqueAudioOnly = audioOnlyUsers.filter(
(audioUser) => !streams.find((s) => s.userId === audioUser.userId),
);

const pinnedAndLocalCount = pin.length + mine.length;
const availableSlots = myPageSize - pinnedAndLocalCount;
const audioOnlyToAdd = uniqueAudioOnly.slice(0, audioOnlySlotsUsedOnPage1);

if (audioOnlyToAdd.length > 0 && paginatedStreams.length + audioOnlyToAdd.length > availableSlots) {
const remoteStreamsToKeep = availableSlots - audioOnlyToAdd.length;
paginatedStreams = paginatedStreams.slice(0, Math.max(0, remoteStreamsToKeep));
}

paginatedStreams = [...paginatedStreams, ...audioOnlyToAdd];

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.

⚠️ Potential issue | 🟠 Major

Clamp availableSlots to avoid negative pagination math.
If pinned/local streams exceed the page size, availableSlots becomes negative, which can drive audioOnlySlotsUsedOnPage1 (and totalNumberOfOtherStreams) below zero and miscompute pagination. Clamp to zero before using it.

🛠️ Suggested fix
-          const pinnedAndLocalCount = pin.length + mine.length;
-          const availableSlots = myPageSize - pinnedAndLocalCount;
+          const pinnedAndLocalCount = pin.length + mine.length;
+          const availableSlots = Math.max(0, myPageSize - pinnedAndLocalCount);
           const maxAudioOnlySlots = Math.min(availableSlots, maxAudioOnlyUsers);
           audioOnlySlotsUsedOnPage1 = Math.min(uniqueAudioOnly.length, maxAudioOnlySlots);
@@
-        const pinnedAndLocalCount = pin.length + mine.length;
-        const availableSlots = myPageSize - pinnedAndLocalCount;
+        const pinnedAndLocalCount = pin.length + mine.length;
+        const availableSlots = Math.max(0, myPageSize - pinnedAndLocalCount);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// This is needed to adjust pagination for displaced video streams
let audioOnlySlotsUsedOnPage1 = 0;
if (showAudioOnlyOnFirstPage && audioOnlyUsers.length > 0) {
const uniqueAudioOnly = audioOnlyUsers.filter(
(audioUser) => !streams.find((s) => s.userId === audioUser.userId),
);
if (uniqueAudioOnly.length > 0) {
const pinnedAndLocalCount = pin.length + mine.length;
const availableSlots = myPageSize - pinnedAndLocalCount;
const maxAudioOnlySlots = Math.min(availableSlots, maxAudioOnlyUsers);
audioOnlySlotsUsedOnPage1 = Math.min(uniqueAudioOnly.length, maxAudioOnlySlots);
}
}
totalNumberOfOtherStreams = others.length + audioOnlySlotsUsedOnPage1;
const effectiveChunkIndex = currentVideoPageIndex > 0
? chunkIndex - audioOnlySlotsUsedOnPage1
: chunkIndex;
let paginatedStreams = sortVideoStreams(others, sortingMethod)
.slice(effectiveChunkIndex, (effectiveChunkIndex + myPageSize)) || [];
// Add audio-only users only on page 1
if (showAudioOnlyOnFirstPage && currentVideoPageIndex === 0 && audioOnlySlotsUsedOnPage1 > 0) {
const uniqueAudioOnly = audioOnlyUsers.filter(
(audioUser) => !streams.find((s) => s.userId === audioUser.userId),
);
const pinnedAndLocalCount = pin.length + mine.length;
const availableSlots = myPageSize - pinnedAndLocalCount;
const audioOnlyToAdd = uniqueAudioOnly.slice(0, audioOnlySlotsUsedOnPage1);
if (audioOnlyToAdd.length > 0 && paginatedStreams.length + audioOnlyToAdd.length > availableSlots) {
const remoteStreamsToKeep = availableSlots - audioOnlyToAdd.length;
paginatedStreams = paginatedStreams.slice(0, Math.max(0, remoteStreamsToKeep));
}
paginatedStreams = [...paginatedStreams, ...audioOnlyToAdd];
// This is needed to adjust pagination for displaced video streams
let audioOnlySlotsUsedOnPage1 = 0;
if (showAudioOnlyOnFirstPage && audioOnlyUsers.length > 0) {
const uniqueAudioOnly = audioOnlyUsers.filter(
(audioUser) => !streams.find((s) => s.userId === audioUser.userId),
);
if (uniqueAudioOnly.length > 0) {
const pinnedAndLocalCount = pin.length + mine.length;
const availableSlots = Math.max(0, myPageSize - pinnedAndLocalCount);
const maxAudioOnlySlots = Math.min(availableSlots, maxAudioOnlyUsers);
audioOnlySlotsUsedOnPage1 = Math.min(uniqueAudioOnly.length, maxAudioOnlySlots);
}
}
totalNumberOfOtherStreams = others.length + audioOnlySlotsUsedOnPage1;
const effectiveChunkIndex = currentVideoPageIndex > 0
? chunkIndex - audioOnlySlotsUsedOnPage1
: chunkIndex;
let paginatedStreams = sortVideoStreams(others, sortingMethod)
.slice(effectiveChunkIndex, (effectiveChunkIndex + myPageSize)) || [];
// Add audio-only users only on page 1
if (showAudioOnlyOnFirstPage && currentVideoPageIndex === 0 && audioOnlySlotsUsedOnPage1 > 0) {
const uniqueAudioOnly = audioOnlyUsers.filter(
(audioUser) => !streams.find((s) => s.userId === audioUser.userId),
);
const pinnedAndLocalCount = pin.length + mine.length;
const availableSlots = Math.max(0, myPageSize - pinnedAndLocalCount);
const audioOnlyToAdd = uniqueAudioOnly.slice(0, audioOnlySlotsUsedOnPage1);
if (audioOnlyToAdd.length > 0 && paginatedStreams.length + audioOnlyToAdd.length > availableSlots) {
const remoteStreamsToKeep = availableSlots - audioOnlyToAdd.length;
paginatedStreams = paginatedStreams.slice(0, Math.max(0, remoteStreamsToKeep));
}
paginatedStreams = [...paginatedStreams, ...audioOnlyToAdd];
🤖 Prompt for AI Agents
In `@bigbluebutton-html5/imports/ui/components/video-provider/hooks/index.ts`
around lines 531 - 569, The availableSlots calculation can go negative when
pinned/local streams exceed myPageSize, which corrupts audioOnlySlotsUsedOnPage1
and downstream pagination; after computing availableSlots = myPageSize -
pinnedAndLocalCount in both places (the initial audioOnlySlotsUsedOnPage1 block
and the "Add audio-only users only on page 1" block), clamp it to zero (e.g.
availableSlots = Math.max(0, availableSlots)) before using it to compute
maxAudioOnlySlots, audioOnlySlotsUsedOnPage1, or slicing paginatedStreams so
negative values cannot drive incorrect pagination.

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

✅ Automated tests have passed!

@antobinary antobinary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested locally, worked well!

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.

[3.0] Unified layout - missing avatar user(s) in non-grid mode

2 participants