Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
germanocaumo
left a comment
There was a problem hiding this comment.
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:
| usersPolicies { | ||
| guestPolicy | ||
| } | ||
| recordingPolicies { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
"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.
There was a problem hiding this comment.
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]), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
"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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
"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".
There was a problem hiding this comment.
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={{ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
- "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.
There was a problem hiding this comment.
"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'); |
There was a problem hiding this comment.
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=truecase. - The phone case would pass without either layout fix (no overflow or covered-control check).
There was a problem hiding this comment.
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.
|
Thanks for testing it on a dev server.
Each inline point has its own |
germanocaumo
left a comment
There was a problem hiding this comment.
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.
|
This pull request has conflicts ☹ |
|
This pull request has conflicts ☹ |
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.
|
|
||
| const intlMessages = defineMessages({ | ||
| guestPolicy: { | ||
| id: 'app.guest-policy.title', |
There was a problem hiding this comment.
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:
A key of its own, like the other app.preFlight.roomMode.settings.* labels, would fix it.
There was a problem hiding this comment.
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.
✅ Automated tests have passed! |





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:
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 recordingpolicy 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:
1frcolumn grew past the screen.
repeated parameter failed the create call.
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.enabledandpublic.app.preFlight.roomModes.enabled; join a new meeting as a moderator.record=trueguestPolicy=ASK_MODERATORguestPolicy=ALWAYS_ACCEPT_AUTHrecord=true&autoStartRecording=truerecord=falseOn 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 joinlock in
roomModePanel.spec.ts. All ofpre-flight/, with #26188 on top,passes locally, 66 of 66.
More
@cicases, and CI splits them into shards by count, so shards 2 and 8 ofinstall-and-run-bbb-testscan hit the 25-minuteRun testslimit 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@citests).user_currentpoll, measured locally with 1000 subscribers.
v4.1.x-developnow ships bbb-ui-components-react 0.9.0, which putsBBBToggle's aria props on the input (BBBToggle: helper text in the accessible name, aria props on the wrong element, role is checkbox bbb-ui-components-react#88):the summary passes
data-testandaria-disabledthroughslotProps.input,and the workaround is gone.
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.