Skip to content

feat(pre-flight): room mode presets and settings summary - #26180

Draft
AtilaU19 wants to merge 45 commits into
bigbluebutton:v4.1.x-developfrom
AtilaU19:task-2848
Draft

AtilaU19 wants to merge 45 commits into
bigbluebutton:v4.1.x-developfrom
AtilaU19:task-2848

Conversation

@AtilaU19

@AtilaU19 AtilaU19 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Under the picked room mode, the pre-flight's Room mode panel shows what
the mode sets. The moderator can adjust part of it first.

Each mode carries a preset, kept as plain data:

Setting Class Meeting
Guest policy as created as created
Join muted on on
Public chat open open
Who can present with approval anyone
Whiteboard for everyone on off

These five are switches and selects; public chat is left out of a room
without chat. Listed as automatic: cameras visible to everyone and locks
for people who join later. "Recording never starts on its own" shows only
in a room that may record and is not set to record on its own. The guest
policy is read before the join from user_current.meeting, the recording
policy from the meeting's static data.

Another mode or Cancel drops the edits, and they lock once the room
starts. Nothing is applied to the room yet.

Builds on #26113 and #26099, whose commits sit below these. The first
fixes #26113's phone layout, exposed by this content; the focus fix found
with it is #26210. Review fixes are fixup! commits, squashed before merge.

In detail:

Closes Issue(s)

None

Motivation

Picking a room mode said nothing about what the room would do.

How to test

Turn on public.app.preFlight.enabled and
public.app.preFlight.roomModes.enabled; join a new meeting as a moderator.

  1. Pick Class, then Meeting: who presents and the whiteboard change.
  2. Edit, switch mode and back: the edits are gone.
  3. Start room after editing: the room keeps its creation settings.
  4. While it starts, the controls do not change.
Create parameters Guest policy Recording line
record=true server default listed
guestPolicy=ASK_MODERATOR Ask moderator listed
guestPolicy=ALWAYS_ACCEPT_AUTH kept on offer listed
record=true&autoStartRecording=true server default hidden
record=false server default hidden

On a phone or tablet, the summary stays within the screen. Repeat in the
dark theme.

Automated: pre-flight/roomModeSummary.spec.ts (11 cases, @ci) and the join
lock in roomModePanel.spec.ts. All of pre-flight/, with #26188 on top,
passes locally, 66 of 66.

More

Changelog

Technical — Room mode presets and an editable settings summary in the
pre-flight.

User-facing — After picking a room mode, moderators see what it sets and
can adjust it.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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

Tested on a dev server: the "How to test" table matches, Start room leaves the room as created, and the guest select follows changes made by another moderator.

Two general notes:

  • Alone, these controls do nothing, so I'd merge this together with #26188.
  • 9758f07 fixes a problem already in v4.1.x-develop (the participant's phone pre-flight has it too). It could be its own small PR.

usersPolicies {
guestPolicy
}
recordingPolicies {

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.

Every user re-polls user_current every 333 ms for the whole session, but only the moderator's pre-flight reads these fields. record and autoStartRecording never change and are already in meetingStaticData, so I'd read them from there. For guestPolicy, a subscription that runs only while the panel is shown would avoid the cost.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

record and autoStartRecording now come from meetingStaticData, so user_current no longer joins the recording policies (de9907e575).

guestPolicy stays in user_current. meetingStaticData doesn't select it, and a subscription that runs only while the panel is shown needs a new operation name in the middleware's not-in-meeting allowlist (Config.go), a server change the stack has avoided so far. What's left is one join, about 6–7 µs per subscriber per poll in my local measure (the two joins together were about 13 µs). If you'd rather have the dedicated subscription, I'll do it in a follow-up with the allowlist entry.

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.

Fine with a follow-up for guestPolicy; one join is a reasonable cost for now.

{intl.formatMessage(intlMessages.editable)}
</Styled.GroupHeading>
<Styled.Controls>
{EDITABLE_SETTINGS.map((setting) => {

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.

"Send public messages" shows even when the room has no public chat (tested with disabledFeatures=chat). The lock viewers modal hides it in that case (isChatEnabled); I'd do the same here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 223f47f1e0: the summary leaves "Send public messages" out when the room has no chat. useIsChatEnabled can't run before the join, so the same rule is read from meetingStaticData, next to the virtual background one in pre-flight/features.ts.

// moderator can go back to it after picking another.
const options = [
...setting.options,
...(setting.hiddenOptions ?? []).filter((option) => option.value === roomValues[setting.id]),

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.

The select goes blank if the room's policy changes after the moderator picked Always accept authenticated (room created with ALWAYS_ACCEPT_AUTH, edited away and back, then another moderator sets Ask moderator). Keeping the option while it's the current value fixes it: option.value === roomValues[setting.id] || option.value === value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in e0816d91f3, with your condition: the option stays while it's the room's value or the picked one.

dataTest: 'preFlightRoomModeAutomaticRecording',
// No mode starts the recording, but a room created to record on its own
// starts as the moderator enters: only said when the room does not.
appliesTo: (_preset, room) => !room.autoStartRecording,

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.

"Recording never starts on its own" is also listed while a recording is running (a second moderator gets the panel if the first started without a mode), and in rooms with record=false. I'd only list it when record is true and the room isn't recording.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

0e04f79b6e lists the line only when record is true and autoStartRecording is false. A recording that is already running can't be read before the join: v_meeting_recording grants select only to bbb_client. So the second-moderator case still shows the line. I documented it as a known limit, next to the second-moderator behaviour in the apply step; fixing it needs a Hasura permission for bbb_client_not_in_meeting.

name: intlMessages.className,
hint: intlMessages.classHint,
dataTest: 'preFlightRoomModeClass',
// The Mode values (Phase 1) matrix: a presenter leads, so presenting goes

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.

"Mode values (Phase 1) matrix" refers to a document upstream readers can't open (also in settings.ts:150 and roomModeSummary.ts:26). I'd describe the intent instead, e.g. "Class: a presenter leads, so presenting goes through a moderator and everyone can draw".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 2c7ff2b82d: the three comments now say what each preset and the list order are for.

// BBBToggle puts aria-labelledby and aria-describedby on the switch's
// span, not its input, so the helper reads as part of the name: pointed
// at the ids it renders until the library fixes it.
inputProps={{

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.

On the 0.9.0 bump, the library's slotProps.input replaces inputProps, so data-test and aria-disabled would be dropped silently. Worth a note here that they move to slotProps.input then.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added in 8a31d4c103: on the 0.9.0 bump, data-test and aria-disabled move to slotProps.input, and the two aria pointers go.

}
`;

const Controls = styled.div`

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.

While the room starts, the cards dim but these controls don't, though they ignore input. I'd use the same locked style as the cards.

While the room starts: cards dimmed, summary controls not

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 3fd23421fa: while the room starts, the controls dim like the cards (opacity: 0.6, default cursor).

}}
label={intl.formatMessage(setting.label)}
helperText={helper && intl.formatMessage(helper)}
textPosition="left"

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.

Switches and selects read as two layouts: right-aligned switch labels in larger text, and full-width selects with a small title. Full-width rows with the label at the start would line them up. Also, the Class presenter value is cut off ("Allow participants to present with mo…") on phones and at 1100–1280 px wide.

Select with a title above vs right-aligned switch row

Presenter value cut off at 1280 px

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Keeping the library's layout here: the full-width row needs bigbluebutton/bbb-ui-components-react#112, and a local override would depend on the toggle's internal markup. Once the library has it, the switches move to full-width rows. The cut-off presenter value goes to the copy review with design, together with the rest of the panel's strings (a shorter label is the likely fix).


const intlMessages = defineMessages({
guestPolicy: {
id: 'app.lock-viewers.guestPolicy.title',

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.

  • "Guest Policy" and "Presentation Policy" are Title Case next to sentence-case labels. app.guest-policy.title ("Guest policy") exists and is unused.
  • Outside the lock modal, "Send public messages" and "See other participants' webcam" lose their subject (participants). A "Participants can" heading would help.

Title Case titles and labels without their subject

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"Guest policy" now uses app.guest-policy.title (5250991809). "Presentation Policy" has no sentence-case key yet, and a "Participants can" heading is new copy, so both go to the copy review with design before the strings reach Transifex.

await this.modPage.hasElement(e.preFlightRoomModeAutomaticRecording, 'should say recording never starts by itself');

await this.modPage.waitAndClick(e.preFlightRoomModeMeeting);
await expectEditables(this.modPage, MEETING_PRESET, 'should start from the meeting preset');

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.

Some gaps:

  • Meeting's automatic items and guest select aren't checked.
  • Nothing checks that Always accept authenticated is absent in other rooms, or the record=false&autoStartRecording=true case.
  • The phone case would pass without either layout fix (no overflow or covered-control check).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Covered in 9f288d9a63: Meeting's automatic items and guest select, Always accept authenticated absent in other rooms, a record=false room, and the summary staying within the phone's width. The record=false room is created without autoStartRecording: with it on, the line is hidden under either rule, so the case wouldn't tell them apart. The covered-control check went with the focus fix to its own PR, #26210, since that fix is no longer in this branch.

@AtilaU19

Copy link
Copy Markdown
Contributor Author

Thanks for testing it on a dev server.

Each inline point has its own fixup! commit, replied in its thread. The branch was rebased to drop the focus fix, and #26188 was rebased on top of it.

@AtilaU19
AtilaU19 requested a review from germanocaumo October 23, 2026 19:34

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

Thanks, all addressed. Re-tested on a dev server (as included under #26188): the recording line follows record and autoStartRecording, the guest select keeps "Always accept authenticated" after another moderator changes the policy, and the controls dim while the room starts. Fine with leaving the switch layout to bbb-ui-components-react#112 and the copy to the design review.

The public chat setting is now hidden in rooms without chat, but the applier in #26188 still sends it; I left that comment on #26188.

@github-actions

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

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

Carry a room-level mode id on the meeting (empty means not configured),
readable by every client, including those still on the pre-flight, and
writable by a moderator through meetingSetRoomMode.

- bbb-common-message: SetRoomModeCmdMsg and RoomModeChangedEvtMsg
- akka-bbb-apps: MeetingStatus2x mirror, handler (moderator only, not
  in breakout rooms), MeetingDAO column and update, event broadcast
- bbb-graphql-server: meeting."roomMode" column, exposed to bbb_client
  and bbb_client_not_in_meeting, and the meetingSetRoomMode action
- bbb-graphql-actions: meetingSetRoomMode handler (moderator only, id
  validated as ^([a-z][a-z0-9-]{0,31})?$)
- bbb-graphql-middleware: allow the getRoomMode operation for users who
  have not joined yet
- bigbluebutton-html5: read roomMode in the meeting subscription
- tests: pre-flight/roomMode.spec.ts
Address the inline comments of the bigbluebutton#26099 review:

- bbb-graphql-actions: refuse a breakout room up front; akka refuses it
  too, but only after the call has answered true
- akka-bbb-apps: log RoomModeChangedEvtMsg in AnalyticsActor
- playwright: runMutation returns a rejected call as errors, so callers
  get one shape
- playwright: skip, naming the requirement, when the Apollo probe is not
  exposed (allowOverrideClientSettingsOnCreateCall)
- playwright: assert user_current.joined is false on the pre-join read
- playwright: cover the refusals only akka makes (a moderator still on the
  pre-flight, a breakout room) and invalid ids
- playwright: drop the viewer removal from the reload case, which could
  not fail on the room mode
feat(pre-flight): add room mode state on the meeting

Carry a room-level mode id on the meeting (empty means not configured),
readable by every client, including those still on the pre-flight, and
writable by a moderator through meetingSetRoomMode.

- bbb-common-message: SetRoomModeCmdMsg and RoomModeChangedEvtMsg
- akka-bbb-apps: MeetingStatus2x mirror, handler (moderator only, not
  in breakout rooms), MeetingDAO column and update, event broadcast
- bbb-graphql-server: meeting."roomMode" column, exposed to bbb_client
  and bbb_client_not_in_meeting, and the meetingSetRoomMode action
- bbb-graphql-actions: meetingSetRoomMode handler (moderator only, id
  validated as ^([a-z][a-z0-9-]{0,31})?$)
- bigbluebutton-html5: read roomMode in the meeting subscription and in
  userCurrentSubscription (user_current.meeting), which users who have
  not joined yet already receive
- tests: pre-flight/roomMode.spec.ts
Refuse an empty room mode, in bbb-graphql-actions and in akka. Empty is
only the column's default: accepting it let any moderator reopen the
pre-flight panel for everyone arriving after them, and no client path
needs to clear the mode. The invalid-mode case now also sends ''.
Follow the probe's switch upstream from the raw create module (APOLLO_CLIENT_SETTINGS_MODULE) to APOLLO_CLIENT_SETTINGS_OVERRIDE through createClientSettingsOverride.
Sort the breakout create import as simple-import-sort expects (playwright-code-validation).
The pre-flight is getting a room mode panel for moderators entering a
room nobody has configured. Picking a mode applies nothing to the room
yet, so the panel needs a switch of its own, off by default and apart
from the pre-flight's.

Add public.app.preFlight.roomModes.enabled (false), overridable per
session with userdata-bbb_pre_flight_room_modes, and
isRoomModePanelEnabled, which also requires the pre-flight and is
therefore off in breakout rooms.
The join's notices ("Device permission pending", joining without
audio) live in the join step's header, and the join button points at
one of them with aria-describedby. A second panel beside the setup one
has to show the same notices above its own footer and start the room
with the same join.

Move the notices into JoinNotices, rendered by exactly one place, and
let JoiningRoomHeader leave them out. JoiningRoomActions takes an
optional label and a secondary action shown before the button. The
screen itself is unchanged.
A tablet has no room for the room mode panel beside the setup panel.
While the panel is up, the pre-flight takes the phone layout there:
the presence manager decides it once and passes it down, and the
phone styles follow a data-phone-layout attribute on the page and on
the error dialog. A participant on a tablet keeps the desktop layout.

The mode cards stay focusable while the room starts but ignore clicks
and arrow keys, the summary fills the panel's height again, and the
two cards' footer rules line up.
The summary centres its content at every width, as the desktop empty
state sat at the top of the full-height box. The room modes list drops
its pointer to a design record that is not in this repository, and the
case for a viewer on a tablet checks the layout itself, since a single
panel draws no tabs in either layout.
Install the client settings overrides on the breakout's context with upstream's applyClientSettingsOverridesToContext, which replaces installClientSettingsOverrides.
In the phone layout the room mode panel lays its content out in a
single 1fr column. A 1fr track never shrinks below its content's
minimum width, so a wide control under the cards pushes the panel
past the screen and its end is cut off.

Size the column with minmax(0, 1fr), so it takes the screen's width
and its content wraps or shrinks inside it.
Picking a room mode in the pre-flight says nothing about what the
room will do, and leaves the moderator no say in it.

Each mode now carries a preset: the settings it asserts, as plain data
the in-session mode change can read too. Class and Meeting both join
muted with the public chat open; Class has participants present with
a moderator's approval and everyone on the whiteboard, Meeting lets
anyone present and keeps the whiteboard the presenter's. The waiting
room is left as the room was created.

Under the picked mode, a summary lists what the moderator can change
(guest policy, join muted, public chat, who can present, whiteboard
for everyone) with switches and selects, and what is applied without
asking (cameras visible to everyone, locks reaching later arrivals).
Each control starts from the preset, or from the room's own value for
what the mode leaves as created: the guest policy is read before the
join from user_current.meeting, with a policy the list does not offer
kept on offer while it is the room's. A room set to record on its own
starts recording as the moderator enters, so "Recording never starts
on its own" is only listed for a room that does not; that is read the
same way.

Edits live in the pre-flight's state: picking the same mode keeps
them, another mode or Cancel drops them, and once the room is starting
the controls ignore changes, as the cards do. Nothing reaches the room
yet.

BBBToggle 0.8.0 puts its aria-labelledby and aria-describedby on the
switch's span rather than its input, so the helper text read as part
of the name; the summary points the input at the label and helper
until the library is bumped to 0.9.0, which fixes it.
The recording policy is fixed when the room is created, so it is read
from the meeting's static data instead of being polled with every
user's user_current. Only the guest policy, which can change, stays in
that subscription.
A room created without chat has no public chat to lock: the summary
leaves the setting out, as the lock viewers modal does, reading the
disabled features from the meeting's static data before the join.
A guest policy the list does not offer stays on offer while it is the
room's or the picked one, so the select never shows a value it has no
option for when the room's policy changes under it.
The recording line is listed only in a room that may record and is
not set to start recording on its own. Whether a recording is already
running cannot be read before the join.
Comments say what each preset and the list order are for, without
pointing to a document readers of this repository cannot open.
From 0.9.0 BBBToggle takes slotProps.input instead of inputProps, so
data-test and aria-disabled move there on that bump.
While the room starts, the summary's controls are dimmed like the
mode cards they lock with.
The guest policy select uses the sentence-case guest policy title.
The summary spec checks the meeting's automatic items and guest
policy, that a policy the list leaves out is not offered in a room
without it, that a room that cannot record leaves the recording line
out, and that the summary stays within a phone's screen. The mode
summary case uses a room that may record, the only one where that line
shows.
bbb-ui-components-react 0.9.0 (now on v4.1.x-develop) takes slotProps.input instead of inputProps, and puts aria-labelledby and aria-describedby on the input itself, so the two pointers go.
germanocaumo added a commit to germanocaumo/bigbluebutton that referenced this pull request Nov 23, 2026

const intlMessages = defineMessages({
guestPolicy: {
id: 'app.guest-policy.title',

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.

After the rebase, app.guest-policy.title is no longer in en.json (4.0 removed it as unused in 707b4ff), so the label shows the raw id in the pre-flight and in the Room modes tab:

The guest policy label shows its message id

A key of its own, like the other app.preFlight.roomMode.settings.* labels, would fix it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 880026ac7e: the row now has its own key, app.preFlight.roomMode.settings.guestPolicy ("Guest policy"), like the other settings rows. The Room modes tab reuses the summary, so both places show the text again. roomModeSummary now checks that no label in the summary shows a message id.

Give the guest policy row a key of its own,
app.preFlight.roomMode.settings.guestPolicy ("Guest policy"): the
app.guest-policy.title it used left en.json in 707b4ff, so the
summary showed the message id. The summary test now checks that no
label shows a message id.
@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

This branch has not been deployed

No deployments
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 participants