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: each time a mode is applied there is one RoomConfiguredEvent (class when the room starts, meeting after changing the mode), a second moderator joining adds none, and the events end up in the meeting's events.xml.
One small thing: release-testing.md has no section for roomModeReport.spec.ts. The "How to test" steps from this PR would fit there.
|
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.
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.
Give up a room mode change after ROOM_MODE_APPLY_TIMEOUT, as the pre-flight does: the steps not yet sent are skipped, the change-failed notice shows and the settings window unlocks.
Take 0.11.0 instead: BBBToggle now has a disabled look (dimmed text and checked track, not-allowed cursor), so the switches under "Fixed for this session" in the Room modes tab no longer look editable. The title becomes 'bump bbb-ui-components-react to 0.11.0' when squashed.
feat(pre-flight): bring back what only the previous room mode set The applier set a mode over the room's current state, so whatever a previous mode had set stayed where the new mode is silent. That was harmless while modes were only applied to a room nobody had configured, but a mode changed during the session must not leave the previous one behind, nor undo what a moderator changed by hand. The applier now reads the room's base settings. A setting the previous mode's preset set and the new mode's preset leaves out goes back to the base. Everything else the mode and the edits leave out is not sent, so a lock no mode sets, a change made by hand and an edit applied with the previous mode stay as the room has them; so does a setting the new mode sets but leaves out, such as public chat in a room without chat. A room created before the base was kept, or one whose base cannot be read, keeps what the previous mode set, and the failed read is logged; it never holds the applier waiting. A previous mode this client does not know is logged too. The pre-flight goes through the same applier. The guest policy its summary showed is the one applied: left unedited, that is the room's current policy, so it is passed along as an edit. settingsToApply moves next to the other room mode settings so the in-session change can share it, and lockSettingsVariables takes just the eleven lock settings, which is all the base carries.
…applied Review (bigbluebutton#26255, point 1): a mode switch no longer goes back to the room as created, so the guest policy the pre-flight showed is not passed along as an edit, neither to the apply nor to the room modes tab. Left out, it stays as the room has it, which also keeps a change another moderator made meanwhile.
Review (bigbluebutton#26255, point 1): switching applies the new mode's settings and leaves what no mode sets as the room has it. The tab shows the room's current guest policy instead of the one it was created with, and the docs and release tests describe the new rule.
Review (bigbluebutton#26255, point 1): after a switch from Class to Meeting, the guest policy and the private chat lock changed by hand stay. RED against the previous applier, which put the guest policy back to the room's own.
Review (bigbluebutton#26255, point 1): the base is what a switch brings back for a setting only the previous mode set, not what every mode is applied over.
The room's base settings (meeting.roomBaseSettings) were built as a nested map inside MeetingDAO, the only place that knew their shape. RoomModeSettings in bbb-common-message now holds that shape: the lock settings, the users policies and the voice settings a room mode controls. MeetingDAO writes RoomModeSettings.fromProps, and the stored JSON keeps the same fields and values.
Nothing left BBB when a room mode was applied, so the front-end that owns the room could not learn what the moderator chose. SetRoomModeCmdMsgHdlr now sends RoomConfiguredEvtMsg for every room mode it accepts, the current one included: the Room modes tab applies the current mode again when one of its settings is edited. The event carries the mode, the settings the room has once the mode is applied, who applied it and when. The settings are read from the meeting's state; the client applies them before it sets the mode, through the same meeting actor, so they are in place when the event is built. RoomModeChangedEvtMsg is still sent only when the mode changes. The recorder stores the event as RoomConfiguredEvent, with the settings as JSON in the base settings' shape, so it reaches events.xml in meetings that keep their events (record or meetingKeepEvents).
roomModeReport.spec covers RoomConfiguredEvent in two cases. Each apply is recorded once, with the room's settings and who applied it: from the pre-flight, a change in the Room modes tab, and the same mode applied again there with an edit. A reload or a second moderator records nothing, and the record is still in the meeting's events after the meeting ends. The events are read where the server keeps them: from its Redis with redis-cli (core/recordedEvents), or from the archived events.xml once the recording is archived. The tests skip when that Redis does not hold the meeting, so they run on the BBB host, as in CI. The room is created with meetingKeepEvents=true, so a server that stops recording fails them instead.
…s events Add the manual steps for roomModeReport.spec.ts to release-testing.md, from the PR's How to test.
Give the focus back to the window when a room mode change fails: it sat on "Change room mode", disabled while applying, so it fell to the page and Esc did nothing until a click inside the window. It goes back to the button, or to the window when the button stays disabled, and only when it is not in the window already. roomModeSwitch covers it by dropping SetRoomMode and pressing Esc once the change is given up.
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.
A reload lands on the pre-flight once the server has removed the user who left, and the room layout never shows. The reload step now accepts both landings: on the pre-flight, it checks there is no panel and joins the room.
The reload after the switch can land on the pre-flight once the server has removed the user who left. It now goes through reloadsIntoRoom, which accepts both landings.
…s events The reload can land on the pre-flight once the server has removed the user who left. It now goes through reloadsIntoRoom, which accepts both landings.
⏳ Automated tests are running... |
What does this PR do?
When a moderator applies a room mode, akka sends a
RoomConfiguredEvtMsgand records it with the meeting's events asRoomConfiguredEvent. It carries the mode, the room's settings once the mode is applied, who applied it and when.RoomModeChangedEvtMsgis still sent only on a change.roomBaseSettings.events.xmlin meetings that keep their events (record=trueormeetingKeepEvents=true).Stacked on #26255, #26188, #26180, #26113 and #26099; their commits sit below these.
In detail:
Closes Issue(s)
None
How to test
Turn on
public.app.preFlight.enabledandpublic.app.preFlight.roomModes.enabled. Create a meeting withrecord=true, join as a moderator, pick Class and click Start room. List itsRoomConfiguredEvents by the internal meeting id:roomModeclass, the moderator'suserId, the room'ssettings.events.xml.Automated:
pre-flight/roomModeReport.spec.ts(2 cases,@ci). It reads the events withredis-cli, so it runs on the BBB host, as in CI. Thepre-flight/specs pass locally on LiveKit. These steps are also inrelease-testing.md, under "Room mode reported in the meeting's events".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).bbb-webhooksor otherwise) is left for a follow-up.Changelog
Technical — akka sends and records
RoomConfiguredEventeach time a room mode is applied.User-facing — None.