Skip to content

feat(pre-flight): add the moderator room mode panel - #26113

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

AtilaU19 wants to merge 32 commits into
bigbluebutton:v4.1.x-developfrom
AtilaU19:task-2847

Conversation

@AtilaU19

@AtilaU19 AtilaU19 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a Room mode panel to the pre-flight for a moderator entering a room with no room mode. On a desktop it sits beside the setup panel. On a phone, and on a tablet, the screen takes the phone layout: the two panels become tabs and Start room is pinned to the bottom. Class or Meeting can be picked, Cancel clears the pick and Start room joins, with or without a mode. Once the room is starting, the cards keep the pick.

Nothing is applied to the room yet, so the panel has its own setting, public.app.preFlight.roomModes.enabled, off by default. The room mode comes with the moderator's own user data (user_current), so the panel is decided on the first render; with no room mode data, the regular join shows.

Builds on #26099: its commits sit below these five and drop out once it is merged. The review fixes are fixup! commits on top, squashed before merge.

In detail:

Closes Issue(s)

None

Motivation

A moderator has no way to say what a session is for before it starts. This panel is the first step: picking the mode.

How to test

Turn on public.app.preFlight.enabled and public.app.preFlight.roomModes.enabled; use a new meeting per row.

Pre-flight Room modes Who joins Expected
off on moderator Regular join
on off moderator Pre-flight, no panel
on on moderator, no mode Room mode panel
on on moderator, no mode, tablet Phone layout: tabs, Start room pinned
on on viewer Pre-flight, no panel
on on viewer, tablet Setup beside the join, no tabs
on on moderator, breakout No pre-flight
on on moderator, mode set Pre-flight, no panel

Tablet means a window between 641 and 1024 px wide. The last row needs meetingSetRoomMode (#26099).

With the panel up:

  1. Pick Class; the arrow keys move between Class and Meeting.
  2. Cancel clears the pick and focuses the first card.
  3. Start room joins, with or without a pick. While it starts, clicking another card or using the arrow keys keeps the pick.
  4. Up to 1024 px: two tabs, Start room pinned, no Cancel. With the camera on, resize across 640 and 1024 px: the preview keeps running.
  5. With the camera blocked, turn it on: the permission screen takes the panel's place, and "Continue without camera" brings it back.
  6. Repeat in the dark theme.

Automated: pre-flight/roomModePanel.spec.ts (17 cases, @ci). All of pre-flight/ passes locally, 43 of 43.

More

  • CI: the room mode PRs add @ci cases, and CI splits them into shards by count, so shards 2 and 8 of install-and-run-bbb-tests can hit the 25-minute Run tests limit here with no test failing. test(playwright): trim the pre-flight E2E suite for CI #26284, on top of this series, trims the pre-flight suite (82 to 34 @ci tests).
    Desktop, light
image

Desktop, dark
image

Tablet, room mode tab, light
image

Tablet, room mode tab, dark
image

Tablet, devices tab, light
image

Tablet, devices tab, dark
image

Phone, room mode tab, light
image

Phone, room mode tab, dark
image

Phone, devices tab, light
image

Phone, devices tab, dark
image

Changelog

Technical — Pre-flight room mode panel for moderators, behind public.app.preFlight.roomModes.enabled (off by default).
User-facing — Moderators entering an empty room can pick a room mode before starting it.

@coderabbitai

coderabbitai Bot commented Oct 20, 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

@AtilaU19
AtilaU19 requested a review from germanocaumo October 20, 2026 13:56
@antobinary antobinary added this to the Release 4.1 milestone Oct 20, 2026
@AtilaU19
AtilaU19 force-pushed the task-2847 branch 2 times, most recently from 1b0950e to b97e43f Compare October 20, 2026 18:07
@AtilaU19
AtilaU19 marked this pull request as draft October 20, 2026 19:10

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

I know this is still a draft; here is a first pass so it doesn't have to wait. I deployed it on a dev server (with #26099 underneath) and ran it: roomModePanel.spec.ts 33/33 with --repeat-each=3, the whole pre-flight/ folder 37/37, and manual checks of the gate (viewer, bot, breakout, a room that already has a mode, room modes on with the pre-flight off), the keyboard and both themes. The gate holds, and Start room joins without sending anything, as described.

Two layout problems, both reproduced on the dev server, are the main things:

  1. Crossing 640 px remounts the setup column for every pre-flight user, not only moderators: the camera restarts and unsaved picks revert. Rotating a phone is enough to trigger it. Details inline on pre-flight/component.tsx.
  2. Between 641 and about 900 px the cards don't fit. At 768 px (a tablet in portrait) the card text gets no width at all and the pills overlap it. Details inline on room-mode/styles.ts.

The rest is smaller and inline: an unreachable loading branch that would trap the moderator if it were ever reached, copy, the empty right column, alignment, the illustration, a duplicate live region, and some test gaps.

When it leaves draft, the description needs a refresh: it still describes the getRoomMode read with the 10 s fallback, its commit links point to an earlier rebase, the spec has 11 cases (Playwright's total of 12 counts the setup file), and pre-flight/ is 37 cases now.

Comment thread docs/docs/administration/customize.md Resolved
@samuelwei

samuelwei commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Unsure what a room mode controls. At the moment this can be and is maybe (always) better managed by frontends like GL, PILOS, Moodle, etc by passing room type specific parameters.

How this is already implemented in PILOS

image image image

@fcecagno

Copy link
Copy Markdown
Member

Hi @samuelwei, good to see you here, and thanks for the input.
The problem of doing the configuration beforehand is that, once the room is started, there's no easy way to change it. Any integration that builds room type selection can continue doing so, since the room mode in BigBlueButton will be optional.

@samuelwei

Copy link
Copy Markdown
Contributor

@fcecagno Maybe this feature would allow for setting the room mode on the create call and still allow for later changes ?

@antobinary

Copy link
Copy Markdown
Member

@fcecagno Maybe this feature would allow for setting the room mode on the create call and still allow for later changes ?

You mean after it was created? As in #18123 ?

@samuelwei

Copy link
Copy Markdown
Contributor

"The problem of doing the configuration beforehand is that, once the room is started, there's no easy way to change it." sound to me, like the moderator can set the room mode on join and later change it.

My request was, if the moderator can set and change during session, it might be also good to set using the API and also allow for a change during the session (maybe the change can be restricted via another parameter, allow_mode_change )

@fcecagno

Copy link
Copy Markdown
Member

@fcecagno Maybe this feature would allow for setting the room mode on the create call and still allow for later changes ?

I don't think this is planned for the first deliver, but it makes a lot of sense to let it be set by the create call.

Another requirement that makes sense, in my opinion, is to configure modes and restrictions applied to each mode using a configuration file (e.g. settings.yml), this way different deployments can have different room modes.

@antobinary
antobinary marked this pull request as ready for review October 22, 2026 22:41
@antobinary
antobinary marked this pull request as draft October 22, 2026 22:41
@github-actions

Copy link
Copy Markdown

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

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.
The pre-flight lays out the setup panel and the join step side by
side, stacked on a phone. The moderator's room mode panel needs a
place of its own beside the setup panel.

PreFlight takes an optional panel. Beside the setup panel it replaces
the join step, with the actions as its footer; the session's heading
stays in the page, visually hidden, as its heading and title. An error
still takes the panel's place, as it takes the join step's.

On a phone the panels become tabs, "Set up devices" and "Set up room",
with the actions pinned below both. The panels stay mounted and are
only hidden, so the camera preview and the picks survive switching.
The setup panel is always inside the tabs on a phone, with the tab
list hidden while it is alone, so a panel arriving later does not
remount it.
A moderator entering a room nobody has configured has nowhere in the
pre-flight to say what the session is for.

With the room mode panel setting on, a moderator entering a room whose
room mode is empty (not a bot, not in a breakout) gets a "Room mode"
panel beside the setup panel. The mode is read before the join through
the getRoomMode operation, which the middleware lets through for users
who have not joined yet. A spinner holds the join button's place while
it is read; a read that fails or gets no answer in 10 seconds falls
back to the regular join step.

Class and Meeting can be picked; Event, Streamed session (Webinar) and
Thesis defense are listed as coming soon. The cards form a radio
group, with the arrow keys moving between the modes that can be
picked. Until a pick, the panel shows an illustration, with a dark
variant for the dark theme since an image cannot read its tokens; then
the selected mode. Cancel clears the pick (not on a phone, as in the
design) and Start room joins, with or without a mode.

The pick only lives in the pre-flight's state: nothing reaches the
room yet, so starting leaves the room as it was created.
feat(pre-flight): add the moderator room mode panel

A moderator entering a room nobody has configured has nowhere in the
pre-flight to say what the session is for.

With the room mode panel setting on, a moderator entering a room whose
room mode is empty (not a bot, not in a breakout) gets a "Room mode"
panel beside the setup panel. The mode is read before the join from
user_current.meeting, which userCurrentSubscription already carries for
users who have not joined yet. A spinner holds the join button's place
until it arrives.

Class and Meeting can be picked; Event, Streamed session (Webinar) and
Thesis defense are listed as coming soon. The cards form a radio
group, with the arrow keys moving between the modes that can be
picked. Until a pick, the panel shows an illustration, with a dark
variant for the dark theme since an image cannot read its tokens; then
the selected mode. Cancel clears the pick (not on a phone, as in the
design) and Start room joins, with or without a mode.

The pick only lives in the pre-flight's state: nothing reaches the
room yet, so starting leaves the room as it was created.
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.
@github-actions

Copy link
Copy Markdown

🚨 Automated tests failed

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.

6 participants