Skip to content

Feat(html5): Add Dynamic Feature Disabling via Modal - #24086

Open
Tainan404 wants to merge 5 commits into
bigbluebutton:v3.0.x-releasefrom
Tainan404:i-24034
Open

Tainan404 wants to merge 5 commits into
bigbluebutton:v3.0.x-releasefrom
Tainan404:i-24034

Conversation

@Tainan404

@Tainan404 Tainan404 commented Oct 13, 2025 •

Copy link
Copy Markdown
Member

What does this PR do?

This pull request introduces dynamic feature disabling functionality, allowing moderators to enable or disable specific meeting features during a live session — a capability that was previously only available at meeting creation time.

Key Changes

  • Backend (Scala / Core):

    • Added a new model: DisabledFeatures2x for managing disabled features dynamically, including persistence through MeetingDAO.updateDisabledComponents.
    • Introduced ChangeDisabledFeaturesInMeetingCmdMsgHdlr, handling feature-disable commands and enforcing permission and validation checks.
    • Extended MeetingActor, RunningMeeting, and ReceivedJsonMsgHandlerActor to support runtime updates and message routing for disabled features.
    • Added database persistence for feature updates and integrated with analytics tracking.
  • GraphQL:

    • Added a new GraphQL mutation action: ChangeDisabledFeaturesInMeeting.
    • Implemented input validation and moderator permission checks in ChangeDisabledFeaturesInMeeting.ts.
    • Updated GraphQL metadata (actions.graphql, actions.yaml) to register the mutation.
  • Frontend (React / HTML5 Client):

    • Added a new modal: DisableFeaturesModal, providing a UI for moderators to toggle feature availability dynamically.
    • Integrated the modal into the User Options dropdown in the user list.
    • Added Apollo GraphQL integration for real-time updates and mutations.
    • Updated locale strings (en.json) for full UI translation support.
    • Added responsive, styled UI components for feature toggles.

Supported Features

Breakout rooms, captions, chat (public/private), polls, screen sharing, whiteboard, learning dashboard, live transcription, presentations, timer, reactions, layouts, and more.


Closes Issue(s)

Closes #24034


Motivation

To improve moderator control and flexibility by allowing in-session configuration of meeting features, reducing the need to end and recreate sessions when feature restrictions change.


How to test

  1. Setup:

    • Run the backend and frontend environments with the new branch.
    • Join a meeting as both moderator and viewer for comparison.
  2. Moderator actions:

    • Open the User Options Dropdown → Disable Features.
    • Toggle various features (e.g., Chat, Breakout Rooms, Screenshare).
    • Ensure UI elements and functionalities update accordingly in real time.
  3. Validation:

    • Verify that only moderators can see and use the modal.
    • Check database (meeting.disabledFeatures) reflects changes.
    • Confirm persistence after refresh and rejoin.
  4. Edge Cases:

    • Attempt to disable permanently restricted features — should be blocked.
    • Ensure non-moderators receive permission rejection messages.

More

Disabling chat reactions

Screencast.from.13-10-2025.18.25.35.webm

Create meeting with disabled features

Screencast.from.13-10-2025.18.26.31.webm

Disabled features by category
image

@coderabbitai

coderabbitai Bot commented Oct 13, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a centralized DisabledFeatures2x model and wires it through server, DB, actor routing, message handling, GraphQL, and UI. Replaces many handlers' checks from meetingProp.disabledFeatures to liveMeeting.disabledFeatures2x (using DisabledFeatures2x.contains). Introduces ChangeDisabledFeaturesInMeetingCmdMsg, a handler trait to validate and apply changes, MeetingDAO.updateDisabledComponents persistence, a GraphQL action/mutation, and an HTML5 Disable Features modal + subscription and locale keys. LiveMeeting/RunningMeeting are extended to carry disabledFeatures2x.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Moderator as Client (Moderator)
  participant UI as HTML5 UI — Disable Features Modal
  participant GQL as GraphQL Server
  participant Adapter as Actions Adapter
  participant Redis as Redis
  participant RA as ReceivedJsonMsgHandlerActor
  participant MA as MeetingActor
  participant Hdlr as ChangeDisabledFeaturesInMeetingCmdMsgHdlr
  participant DF as DisabledFeatures2x
  participant DAO as MeetingDAO / DB

  Moderator->>UI: open modal, submit disabledFeatures
  UI->>GQL: ChangeDisabledFeaturesInMeeting(disabledFeatures)
  GQL->>Adapter: validate role & input
  Adapter->>Redis: publish ChangeDisabledFeaturesInMeetingCmdMsg
  Redis->>RA: deliver envelope
  RA->>MA: routeGenericMsg(ChangeDisabledFeaturesInMeetingCmdMsg)
  MA->>Hdlr: handleChangeDisabledComponentsCmdMsg(msg)
  Hdlr->>Hdlr: validate permissions & requested features
  Hdlr->>DF: setAll(newDisabled)
  Hdlr->>DF: persist(meetingId, disabled)
  DF->>DAO: updateDisabledComponents(meetingId, Vector[String])
  DAO-->>DF: ack
  MA-->>UI: subscriptions reflect updated meeting.disabledFeatures
Loading
sequenceDiagram
  autonumber
  participant Handler as Feature Handler (chat/polls/layouts/...)
  participant LM as LiveMeeting
  participant DF as DisabledFeatures2x

  Handler->>LM: access disabledFeatures2x
  LM->>DF: contains("featureKey") / toVector()
  DF-->>Handler: boolean (disabled?)
  alt disabled
    Handler-->>Handler: follow disabled path (reject/eject/skip)
  else enabled
    Handler-->>Handler: proceed normal flow
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Areas to focus review on:

  • DisabledFeatures2x implementation: thread-safety, mutation semantics, and persist contract with MeetingDAO.
  • MeetingDAO.updateDisabledComponents: SQL/update correctness and serialization of Vector[String].
  • ChangeDisabledFeaturesInMeetingCmdMsgHdlr: permission checks, allowedFeatures set, handling of permanently disabled features, and side effects (eject/logging).
  • Integration points in MeetingActor, ReceivedJsonMsgHandlerActor, AnalyticsActor: message routing and ordering.
  • Widespread handler changes: ensure all feature gates now uniformly use DisabledFeatures2x.contains and retain prior semantics.
  • GraphQL action/mutation and HTML5 modal: input validation, role gating, subscription wiring, and locale / UI state sync.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective: adding dynamic feature disabling via a modal UI for moderators during live sessions.
Description check ✅ Passed The description comprehensively explains the changes across backend, GraphQL, and frontend with clear sections on what was added, supported features, testing procedures, and issue resolution.
Linked Issues check ✅ Passed The PR substantially exceeds the scope of issue #24034 by implementing a complete feature-disabling system rather than just emoji reactions. While the emoji picker and chat reactions are included, the implementation provides comprehensive runtime control over numerous meeting features (chat, breakout rooms, presentations, layouts, etc.), representing a full platform feature rather than the targeted emoji picker control.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives of implementing runtime feature disabling. Backend, GraphQL, and frontend modifications consistently support this goal. Changes include new models (DisabledFeatures2x), handlers, persistence, UI components, and localization—all directly related to dynamic feature control.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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: 8

🧹 Nitpick comments (26)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginHdlrHelpers.scala (1)

32-32: Consider using the DisabledFeatures2x.contains helper method.

The migration to the new DisabledFeatures2x API is correct. However, DisabledFeatures2x.scala provides a contains helper method that encapsulates the same logic. Using it would improve consistency across the codebase.

Apply this diff to use the helper method:

-    val pluginsDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("plugins")
+    val pluginsDisabled: Boolean = org.bigbluebutton.core.models.DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "plugins")

Or if you prefer a shorter import at the top of the file:

+import org.bigbluebutton.core.models.DisabledFeatures2x.contains

Then on line 32:

-    val pluginsDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("plugins")
+    val pluginsDisabled: Boolean = contains(liveMeeting.disabledFeatures2x, "plugins")
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/timer/ActivateTimerReqMsgHdlr.scala (1)

33-33: Migration to DisabledFeatures2x looks good.

The migration from the legacy props.meetingProp.disabledFeatures path to the new disabledFeatures2x model is correct and aligns with the broader refactoring across the codebase.

Optional: Consider using the DisabledFeatures2x.contains helper.

The DisabledFeatures2x companion object provides a contains method that encapsulates this check. Using it would be more idiomatic:

-    val isTimerFeatureEnabled: Boolean = !liveMeeting.disabledFeatures2x.toVector.contains("timer")
+    val isTimerFeatureEnabled: Boolean = !DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "timer")

This avoids the intermediate toVector call and uses the API as designed.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala (1)

28-28: Consider using the DisabledFeatures2x.contains helper method.

Instead of calling liveMeeting.disabledFeatures2x.toVector.contains("breakoutRooms"), use the companion object helper: DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "breakoutRooms"). This avoids the intermediate Vector allocation on every check and provides a clearer, more maintainable API.

Apply this diff:

-    if (liveMeeting.disabledFeatures2x.toVector.contains("breakoutRooms")) {
+    if (DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "breakoutRooms")) {
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/CreateGroupChatReqMsgHdlr.scala (1)

29-29: Consider using the DisabledFeatures2x.contains helper method.

Similar to the breakout rooms handler, prefer the companion object helper to avoid allocating an intermediate Vector on every check:

Apply this diff:

-      privateChatDisabled = liveMeeting.disabledFeatures2x.toVector.contains("privateChat")
+      privateChatDisabled = DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "privateChat")
bigbluebutton-html5/public/locales/en.json (1)

192-193: Clarify terminology between viewer-lock option and features modal.

The dropdown option uses “Lock viewers” (app.userList.userOptions.disabledFeaturesLabel/Desc) while the modal is titled “Disable features” (app.disable-features.title). To prevent ambiguity, consider renaming the dropdown to something like “Manage viewer locks” or “Viewer permissions.”

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReactionReqMsgHdlr.scala (1)

16-17: Consider optimizing multiple .toVector calls.

These two consecutive calls to .toVector.contains() create two Vector allocations. For better performance, either cache the vector or use the companion object's contains method.

Option 1: Cache the vector result

-    val chatDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chat")
-    val chatMessageReactionsDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chatMessageReactions")
+    val disabledFeaturesVec = liveMeeting.disabledFeatures2x.toVector
+    val chatDisabled: Boolean = disabledFeaturesVec.contains("chat")
+    val chatMessageReactionsDisabled: Boolean = disabledFeaturesVec.contains("chatMessageReactions")

Option 2: Use the companion object's contains method

-    val chatDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chat")
-    val chatMessageReactionsDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chatMessageReactions")
+    val chatDisabled: Boolean = DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "chat")
+    val chatMessageReactionsDisabled: Boolean = DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "chatMessageReactions")
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReqMsgHdlr.scala (1)

15-16: Consider optimizing multiple .toVector calls.

Same as in DeleteGroupChatMessageReactionReqMsgHdlr: these consecutive calls create unnecessary Vector allocations. Cache the result or use the companion method.

-    val chatDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chat")
-    val deleteChatMessageDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("deleteChatMessage")
+    val disabledFeaturesVec = liveMeeting.disabledFeatures2x.toVector
+    val chatDisabled: Boolean = disabledFeaturesVec.contains("chat")
+    val deleteChatMessageDisabled: Boolean = disabledFeaturesVec.contains("deleteChatMessage")
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageMsgHdlr.scala (1)

27-40: Consider optimizing three .toVector calls in the same function.

This function calls .toVector three times (lines 27, 29, 40), creating three separate Vector allocations. Cache the vector once at the beginning of the function.

+    val disabledFeaturesVec = liveMeeting.disabledFeatures2x.toVector
-    val chatDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chat")
+    val chatDisabled: Boolean = disabledFeaturesVec.contains("chat")
     var privateChatDisabled: Boolean = false
-    val replyChatMessageDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("replyChatMessage")
+    val replyChatMessageDisabled: Boolean = disabledFeaturesVec.contains("replyChatMessage")
     var chatLocked: Boolean = false
     var chatLockedForUser: Boolean = false
     var hasModMembers: Boolean = false
     var isPrivateChat: Boolean = false

     for {
       user <- Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId)
       groupChat <- state.groupChats.find(msg.body.chatId)
     } yield {
       if (groupChat.access == GroupChatAccess.PRIVATE) {
-        privateChatDisabled = liveMeeting.disabledFeatures2x.toVector.contains("privateChat")
+        privateChatDisabled = disabledFeaturesVec.contains("privateChat")
         isPrivateChat = true
       }
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala (1)

18-18: Use DisabledFeatures2x.contains to avoid repeated Vector allocation.

The pattern .toVector.contains(...) creates a new Vector on every feature check. The DisabledFeatures2x companion object provides a contains method that should be used instead.

Apply this diff:

-    if (liveMeeting.disabledFeatures2x.toVector.contains("layouts")) {
+    if (DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "layouts")) {

Based on relevant code snippets from DisabledFeatures2x.scala showing the companion object's contains method.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageReactionReqMsgHdlr.scala (1)

16-17: Use DisabledFeatures2x.contains to avoid repeated Vector allocation.

Each .toVector.contains(...) call creates a new Vector. Use the companion object's contains method instead.

Apply this diff:

-    val chatDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chat")
-    val chatMessageReactionsDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chatMessageReactions")
+    val chatDisabled: Boolean = DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "chat")
+    val chatMessageReactionsDisabled: Boolean = DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "chatMessageReactions")

Based on relevant code snippets from DisabledFeatures2x.scala.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserReactionEmojiReqMsgHdlr.scala (1)

33-33: Use DisabledFeatures2x.contains to avoid Vector allocation.

Replace .toVector.contains(...) with the companion object's contains method.

Apply this diff:

-    val userReactionsIsDisabled = liveMeeting.disabledFeatures2x.toVector.contains("userReactions")
+    val userReactionsIsDisabled = DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "userReactions")

Based on relevant code snippets from DisabledFeatures2x.scala.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/audiocaptions/UpdateTranscriptPubMsgHdlr.scala (1)

58-58: Use DisabledFeatures2x.contains to avoid Vector allocation.

Replace .toVector.contains(...) with the companion object's contains method.

Apply this diff:

-    val isTranscriptionEnabled = !liveMeeting.disabledFeatures2x.toVector.contains("liveTranscription")
+    val isTranscriptionEnabled = !DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "liveTranscription")

Based on relevant code snippets from DisabledFeatures2x.scala.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (1)

16-16: Use DisabledFeatures2x.contains to avoid Vector allocation.

Replace .toVector.contains(...) with the companion object's contains method.

Apply this diff:

-    if (liveMeeting.disabledFeatures2x.toVector.contains("screenshare")) {
+    if (DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "screenshare")) {

Based on relevant code snippets from DisabledFeatures2x.scala.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationDownloadablePubMsgHdlr.scala (1)

29-30: Use DisabledFeatures2x.contains to avoid repeated Vector allocation.

Both checks create new Vectors. Use the companion object's contains method instead.

Apply this diff:

-    } else if (liveMeeting.disabledFeatures2x.toVector.contains("downloadPresentationOriginalFile")
+    } else if (DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "downloadPresentationOriginalFile")
       && msg.body.fileStateType == "Original") {
       val reason = "Download original presentation is disabled for meeting."
       PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, bus.outGW, liveMeeting)
       state
-    } else if (liveMeeting.disabledFeatures2x.toVector.contains("downloadPresentationConvertedToPdf")
+    } else if (DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "downloadPresentationConvertedToPdf")
       && msg.body.fileStateType == "Converted") {

Based on relevant code snippets from DisabledFeatures2x.scala.

Also applies to: 34-35

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/EditGroupChatMessageReqMsgHdlr.scala (1)

15-16: Use DisabledFeatures2x.contains to avoid repeated Vector allocation.

Each .toVector.contains(...) call creates a new Vector. Use the companion object's contains method instead.

Apply this diff:

-    val chatDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("chat")
-    val editChatMessageDisabled: Boolean = liveMeeting.disabledFeatures2x.toVector.contains("editChatMessage")
+    val chatDisabled: Boolean = DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "chat")
+    val editChatMessageDisabled: Boolean = DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "editChatMessage")

Based on relevant code snippets from DisabledFeatures2x.scala.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala (1)

39-39: Use DisabledFeatures2x.contains to avoid repeated Vector allocation.

Both checks create new Vectors. Use the companion object's contains method instead.

Apply this diff:

-    if (msg.body.contentType == "camera" && liveMeeting.disabledFeatures2x.toVector.contains("cameraAsContent")) {
+    if (msg.body.contentType == "camera" && DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "cameraAsContent")) {
       log.error(
         "Camera as a content is disabled for meeting {}, meetingID = {}",
         liveMeeting.props.meetingProp.name, liveMeeting.props.meetingProp.intId
       )
-    } else if (msg.body.contentType == "screenshare" && liveMeeting.disabledFeatures2x.toVector.contains("screenshare")) {
+    } else if (msg.body.contentType == "screenshare" && DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "screenshare")) {

Based on relevant code snippets from DisabledFeatures2x.scala.

Also applies to: 44-44

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StartExternalVideoPubMsgHdlr.scala (1)

29-29: Consider using the companion object helper method.

The DisabledFeatures2x companion object provides a contains helper method that encapsulates the .toVector.contains() logic. Using DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "externalVideos") would improve consistency across the codebase and make future refactoring easier.

Apply this pattern:

-    if (liveMeeting.disabledFeatures2x.toVector.contains("externalVideos")) {
+    if (DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "externalVideos")) {
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageFromApiSysPubMsgHdlr.scala (1)

17-17: Consider using the companion object helper method.

The DisabledFeatures2x companion object provides a contains helper method. Using DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "chat") would improve consistency across the codebase.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserRaiseHandReqMsgHdlr.scala (1)

48-48: Consider using the companion object helper method.

The DisabledFeatures2x companion object provides a contains helper method. Using DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "raiseHand") would improve consistency.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/MakePresentationDownloadReqMsgHdlr.scala (2)

135-143: Consider using the companion object helper method.

Multiple feature flag checks use .toVector.contains() directly. Using the DisabledFeatures2x.contains() helper method would improve consistency across the codebase.

Example for one check:

-    if (liveMeeting.disabledFeatures2x.toVector.contains("downloadPresentationWithAnnotations")
+    if (DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "downloadPresentationWithAnnotations")

Apply the same pattern to the checks on lines 139 and 143.


216-216: Consider using the companion object helper method.

Same suggestion as above: use DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "importPresentationWithAnnotationsFromBreakoutRooms") for consistency.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/disabledcomponents/ChangeDisabledComponentsInMeetingCmdMsgHdlr.scala (1)

10-21: Avoid drift between backend allowedFeatures and frontend supportedFeatures

This hardcoded set can diverge from the UI list. Consider centralizing in a shared constant (e.g., common module or generated from GraphQL metadata) and reusing on both sides.

bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (2)

289-293: Handle mutation result/errors (optional)

Consider awaiting the mutation and handling errors/feedback.

-  const handleDisabledFeaturesSubmit = (newDisabledFeatures: string[]) => {
-    setDisabledFeatures({
-      variables: { disabledFeatures: newDisabledFeatures },
-    });
-  };
+  const handleDisabledFeaturesSubmit = async (newDisabledFeatures: string[]) => {
+    try {
+      await setDisabledFeatures({ variables: { disabledFeatures: newDisabledFeatures } });
+    } catch (e) {
+      // TODO: surface error to user/log
+    }
+  };

171-181: Single source of truth for feature list (optional)

supportedFeatures duplicates the backend allowlist. To prevent drift, consider deriving this list from a shared constant or querying metadata.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)

5-37: Consider simplifying the API design.

The companion object methods take a DisabledFeatures2x instance as a parameter and delegate to its private methods. This creates an unusual level of indirection. In Scala, it's more idiomatic to either:

  • Make the class methods public and call them directly on instances
  • Use the companion object for factory methods and static utilities

This pattern makes the API more complex without clear benefits.

Example refactor to make instance methods public:

 object DisabledFeatures2x {
-  def findAll(disabled: DisabledFeatures2x): Vector[String] = disabled.toVector
-
-  def add(disabled: DisabledFeatures2x, feature: String): Unit = {
-    disabled.save(feature)
-  }
-
-  def remove(disabled: DisabledFeatures2x, feature: String): Unit = {
-    disabled.remove(feature)
-  }
-
-  def setAll(disabled: DisabledFeatures2x, features: Vector[String]): Unit = {
-    disabled.replaceAll(features)
-  }
-
-  def clear(disabled: DisabledFeatures2x): Unit = {
-    disabled.clear()
-  }
-
   def persist(meetingId: String, disabled: DisabledFeatures2x): Unit = {
     MeetingDAO.updateDisabledComponents(meetingId, disabled.toVector)
   }
-
-  def contains(disabled: DisabledFeatures2x, feature: String): Boolean = {
-    disabled.toVector.contains(feature)
-  }
-
-  def set(disabled: DisabledFeatures2x, features: Vector[String]): DisabledFeatures2x = {
-    disabled.replaceAll(features)
-    disabled
-  }
 }
 
 class DisabledFeatures2x {
   private var disabledFeatures: collection.immutable.HashSet[String] =
     new collection.immutable.HashSet[String]()
 
   def toVector: Vector[String] = disabledFeatures.toVector
 
-  private def save(feature: String): Unit = {
+  def add(feature: String): Unit = {
     disabledFeatures += feature
   }
 
-  private def remove(feature: String): Unit = {
+  def remove(feature: String): Unit = {
     disabledFeatures -= feature
   }
 
-  private def replaceAll(features: Vector[String]): Unit = {
+  def setAll(features: Vector[String]): Unit = {
     disabledFeatures = collection.immutable.HashSet(features: _*)
   }
 
-  private def clear(): Unit = {
+  def clear(): Unit = {
     disabledFeatures = collection.immutable.HashSet.empty
   }
+
+  def contains(feature: String): Boolean = {
+    disabledFeatures.contains(feature)
+  }
 }

Then callers would use instance.add(feature) instead of DisabledFeatures2x.add(instance, feature).


45-47: Rename save to avoid confusion.

The private method save only adds a feature to the in-memory HashSet. The name "save" typically implies database persistence, which could confuse future maintainers. Since the companion object's persist method handles actual database persistence, consider renaming this to addFeature or similar.

Apply this diff:

-  private def save(feature: String): Unit = {
+  private def addFeature(feature: String): Unit = {
     disabledFeatures += feature
   }

And update the companion object:

   def add(disabled: DisabledFeatures2x, feature: String): Unit = {
-    disabled.save(feature)
+    disabled.addFeature(feature)
   }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a26fc40 and c796278.

📒 Files selected for processing (43)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/audiocaptions/UpdateTranscriptPubMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/disabledcomponents/ChangeDisabledComponentsInMeetingCmdMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StartExternalVideoPubMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/CreateGroupChatReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReactionReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/EditGroupChatMessageReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageFromApiSysPubMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageReactionReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginHdlrHelpers.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginPersistEventMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/polls/StartPollReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/MakePresentationDownloadReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPageInfiniteWhiteboardPubMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationDownloadablePubMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/timer/ActivateTimerReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserRaiseHandReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserReactionEmojiReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/LiveMeeting.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (4 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/AnalyticsActor.scala (1 hunks)
  • bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala (1 hunks)
  • bbb-graphql-actions/src/actions/ChangeDisabledFeaturesInMeeting.ts (1 hunks)
  • bbb-graphql-server/metadata/actions.graphql (1 hunks)
  • bbb-graphql-server/metadata/actions.yaml (1 hunks)
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/mutations.ts (1 hunks)
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/queries.ts (1 hunks)
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/styles.ts (1 hunks)
  • bigbluebutton-html5/imports/ui/components/presentation/container.jsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (6 hunks)
  • bigbluebutton-html5/imports/ui/core/graphql/queries/meetingSubscription.ts (1 hunks)
  • bigbluebutton-html5/public/locales/en.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-10-10T12:15:03.265Z
Learnt from: jaapjansma
PR: bigbluebutton/bigbluebutton#21204
File: bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/MeetingsManagerActor.scala:21-21
Timestamp: 2024-10-10T12:15:03.265Z
Learning: When reviewing code changes in BigBlueButton, particularly in case classes like `RegisterUser` in `MeetingsManagerActor.scala`, ensure to accurately distinguish between added parameters and replaced parameters to avoid incorrect assessments.

Applied to files:

  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala
🧬 Code graph analysis (33)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageReactionReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
bbb-graphql-actions/src/actions/ChangeDisabledFeaturesInMeeting.ts (3)
bbb-graphql-middleware/internal/common/types.go (1)
  • RedisMessage (99-108)
bbb-graphql-actions/src/imports/validation.ts (2)
  • throwErrorIfNotModerator (3-7)
  • throwErrorIfInvalidInput (29-126)
bigbluebutton-html5/imports/ui/services/features/index.js (1)
  • disabledFeatures (7-7)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPageInfiniteWhiteboardPubMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserReactionEmojiReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/disabledcomponents/ChangeDisabledComponentsInMeetingCmdMsgHdlr.scala (3)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (3)
  • MeetingActor (57-65)
  • MeetingActor (67-1269)
  • props (58-65)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1)
  • meetingId (43-66)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (6)
  • contains (29-31)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • setAll (17-19)
  • toVector (43-43)
  • persist (25-27)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginPersistEventMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • set (33-36)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
bigbluebutton-html5/imports/ui/services/features/index.js (1)
  • disabledFeatures (7-7)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationDownloadablePubMsgHdlr.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1)
  • meetingId (43-66)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/EditGroupChatMessageReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageFromApiSysPubMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala (1)
bigbluebutton-html5/imports/ui/services/features/index.js (1)
  • disabledFeatures (7-7)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/disabledcomponents/ChangeDisabledComponentsInMeetingCmdMsgHdlr.scala (1)
  • handleChangeDisabledComponentsCmdMsg (22-60)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/MakePresentationDownloadReqMsgHdlr.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1)
  • meetingId (43-66)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginHdlrHelpers.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReactionReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (3)
  • MeetingDAO (97-249)
  • meetingId (43-66)
  • updateDisabledComponents (238-245)
bigbluebutton-html5/imports/ui/services/features/index.js (1)
  • disabledFeatures (7-7)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (3)
bigbluebutton-html5/imports/ui/services/features/index.js (1)
  • disabledFeatures (7-7)
bigbluebutton-html5/imports/ui/core/hooks/useMeeting.ts (1)
  • useMeeting (68-94)
bigbluebutton-html5/imports/ui/components/disable-features-modal/mutations.ts (2)
  • SetDisabledFeaturesMutationVars (3-5)
  • SET_DISABLED_FEATURES (7-11)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StartExternalVideoPubMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/CreateGroupChatReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala (1)
bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala (2)
  • ChangeDisabledFeaturesInMeetingCmdMsg (352-352)
  • ChangeDisabledFeaturesInMeetingCmdMsg (353-356)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserRaiseHandReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/polls/StartPollReqMsgHdlr.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1)
  • meetingId (43-66)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/DatabaseConnection.scala (2)
  • DatabaseConnection (13-89)
  • enqueue (42-45)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/audiocaptions/UpdateTranscriptPubMsgHdlr.scala (2)
bigbluebutton-html5/imports/ui/components/audio/audio-modal/container.jsx (1)
  • isTranscriptionEnabled (132-132)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (1)
bigbluebutton-html5/imports/ui/core/singletons/modalController.tsx (1)
  • useModalRegistration (192-245)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/timer/ActivateTimerReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (2)
  • toVector (43-43)
  • contains (29-31)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-fsesl-akka)
  • GitHub Check: build-package (bbb-apps-akka)
  • GitHub Check: build-package (bbb-graphql-server)
🔇 Additional comments (23)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/polls/StartPollReqMsgHdlr.scala (1)

27-34: Migration to disabledFeatures2x looks correct.

The shift from the legacy liveMeeting.props.meetingProp.disabledFeatures to liveMeeting.disabledFeatures2x maintains the same permission-checking behavior while aligning with the new dynamic feature-flag system introduced in this PR. The eject logic and error messages remain unchanged.

bigbluebutton-html5/imports/ui/core/graphql/queries/meetingSubscription.ts (1)

6-6: Verify GraphQL schema and subscription consumers
Ensure the server’s Meeting type defines disabledFeatures with the correct scalar or list type (e.g. [String]) and update all frontend subscription consumers to handle this new field.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/AnalyticsActor.scala (1)

94-94: LGTM! Consistent logging integration.

The addition of logging for ChangeDisabledFeaturesInMeetingCmdMsg follows the established pattern for analytics tracking and aligns with the broader feature-disabling infrastructure introduced in this PR.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala (1)

115-115: Approve the migration to DisabledFeatures2x.

The change correctly propagates the 2x disabled features to breakout rooms, maintaining consistency across the feature-flag infrastructure.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1)

238-245: LGTM! Correct persistence implementation.

The updateDisabledComponents method correctly:

  • Enqueues the update asynchronously via DatabaseConnection.enqueue
  • Converts Vector[String] to List as required by Slick's API
  • Follows the established DAO pattern

This integrates seamlessly with the DisabledFeatures2x persistence flow.

bigbluebutton-html5/public/locales/en.json (1)

1111-1144: LGTM! Comprehensive and well-organized feature labels.

The new locale keys under app.disable-features.* are:

  • Consistently named following the existing pattern
  • Comprehensive, covering all features mentioned in the PR objectives
  • Clear and descriptive for users
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scala (1)

32-32: LGTM! Correct integration of DisabledFeatures2x.

The initialization and wiring of disabledFeatures2x:

  • Uses the DisabledFeatures2x.set helper to initialize from meeting props
  • Passes it to LiveMeeting constructor, making it available throughout the meeting lifecycle
  • Follows the established pattern for other meeting components

Also applies to: 47-47

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala (1)

413-414: LGTM! Consistent message routing integration.

The routing case for ChangeDisabledFeaturesInMeetingCmdMsg follows the established pattern (routeGenericMsg) and correctly integrates with the message handling infrastructure.

bigbluebutton-html5/imports/ui/components/disable-features-modal/styles.ts (1)

1-45: LGTM! Well-structured responsive modal styling.

  • Clean component hierarchy extending existing modal styles
  • Responsive 2-column grid that stacks on mobile (768px breakpoint)
  • Proper spacing, shadows, and typography
  • Uses design system CSS variables

Verify that --color-background-light and --color-text-primary are defined in the global styles or theme (no definitions found in CSS/SCSS).

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/LiveMeeting.scala (1)

30-30: LGTM!

The addition of the disabledFeatures2x field properly integrates the new feature flag system into LiveMeeting.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginPersistEventMsgHdlr.scala (1)

25-25: LGTM!

The migration to disabledFeatures2x is consistent with the pattern used across the codebase.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPageInfiniteWhiteboardPubMsgHdlr.scala (1)

18-18: LGTM!

The feature flag check correctly uses the new disabledFeatures2x path.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala (1)

76-76: LGTM!

The migration to check disabledFeatures2x is correct and consistent with the broader refactoring.

bbb-graphql-server/metadata/actions.yaml (1)

199-204: LGTM!

The new Hasura action definition follows the established pattern and is correctly configured with synchronous handling and appropriate role permissions.

bbb-graphql-actions/src/actions/ChangeDisabledFeaturesInMeeting.ts (2)

18-22: Consider validating feature names against a whitelist.

The current validation only checks that disabledFeatures is a string array, but doesn't validate whether the feature names are valid. This could allow typos or invalid feature names to propagate to the backend. Consider adding a whitelist of valid feature names and validating against it to provide better UX with immediate feedback.

Example validation:

const VALID_FEATURES = [
  'chat', 'externalVideos', 'raiseHand', 'downloadPresentationWithAnnotations',
  'downloadPresentationOriginalFile', 'downloadPresentationConvertedToPdf',
  'importPresentationWithAnnotationsFromBreakoutRooms',
  // ... other valid features
];

const disabledFeatures = input["disabledFeatures"] as string[];
const invalidFeatures = disabledFeatures.filter(f => !VALID_FEATURES.includes(f));
if (invalidFeatures.length > 0) {
  throw new ValidationError(`Invalid feature names: ${invalidFeatures.join(', ')}`, 400);
}

1-39: LGTM with suggestion above.

The implementation correctly enforces moderator-only access, validates input structure, and constructs the Redis message following established patterns.

bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala (1)

349-360: LGTM!

The new command message types follow the established patterns in this file and are correctly structured.

bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (1)

33-33: LGTM on modal integration!

The DisabledFeaturesContainer import, intl message definitions, modal registration, and conditional rendering are all correctly implemented following the established patterns in this component.

Also applies to: 128-135, 174-174, 403-409

bigbluebutton-html5/imports/ui/components/disable-features-modal/queries.ts (1)

3-7: Confirm subscription payload shape

Interface models meeting as a single object, but elsewhere (useMeeting) we project from an array. If meeting resolves to a list, this type should be meeting: { disabledFeatures: string[] }[].

Would you confirm the GraphQL schema for the meeting subscription and align this interface accordingly?

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (3)

40-40: Trait integration looks good

Importing and mixing in ChangeDisabledFeaturesInMeetingCmdMsgHdlr is correct and keeps handling within MeetingActor.

Also applies to: 92-92


346-357: Ensure disabledFeatures2x is initialized before gating shared notes

This now gates on liveMeeting.disabledFeatures2x. If that structure isn’t seeded with props.meetingProp.disabledFeatures prior to calling initSharedNotes, the pad may be created despite being disabled via meeting params.

Two options:

  • Verify initialization order guarantees disabledFeatures2x is pre-populated.
  • Or defensively gate using both sources.

Suggested defensive tweak:

-    if (sharedNotesEnabledInClientSettings && !liveMeeting.disabledFeatures2x.toVector.contains("sharedNotes")) {
+    if (
+      sharedNotesEnabledInClientSettings &&
+      !liveMeeting.disabledFeatures2x.toVector.contains("sharedNotes") &&
+      !liveMeeting.props.meetingProp.disabledFeatures.contains("sharedNotes")
+    ) {

827-832: Correct routing for disabled-features command

Handling ChangeDisabledFeaturesInMeetingCmdMsg here is appropriate and delegates to the new handler.

bigbluebutton-html5/imports/ui/components/disable-features-modal/mutations.ts (1)

7-11: LGTM

Mutation and variables typing look correct for invoking ChangeDisabledFeaturesInMeeting.

@gustavotrott

Copy link
Copy Markdown
Contributor

Wow, I didn't know you would allow to disable any feature during the meeting. That's interesting.
Let’s just double-check if that’s the intended behavior; personally, I think it makes sense.

One small note: with so many options, it can be a bit hard to find what you’re looking for. Would it be possible to organize them into tabs (categories)?
For example: Chat, Presentation, Breakout Room, Others.

image

@antobinary antobinary added this to the Release 3.0 milestone Oct 14, 2025
@antobinary
antobinary self-requested a review October 14, 2025 16:00

@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

♻️ Duplicate comments (2)
bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (2)

431-431: Critical: Fix type error – initialSettings requires string[] not object.

This is a repeat of the previous review issue: passing {} as a fallback breaks the string[] prop type declared on line 19 and will cause runtime errors when the code tries to call .includes() on an object.

Apply this diff:

-      initialSettings={meetingStaticData?.disabledFeatures || {}}
+      initialSettings={meetingStaticData?.disabledFeatures || []}

358-370: Critical: Fix Toggle to be controlled and correct the checked logic.

Two critical issues remain from the previous review (see past comments above):

  1. Uncontrolled Toggle won't reflect real-time updates: Using defaultChecked means the Toggle ignores subsequent prop changes when disabledFeatures updates via subscription.

  2. Incorrect logic for permanently-disabled features: The condition !disabledFeatures.includes(feature) || initialSettings.includes(feature) causes features in initialSettings (permanently disabled at creation) to display as enabled (checked), contradicting disabled={initialSettings.includes(feature)} on line 369.

Apply this diff to fix both issues:

-              <Toggle
-              // @ts-ignore
-                defaultChecked={
-                  !disabledFeatures.includes(feature)
-                  || initialSettings.includes(feature)
-                }
-                onChange={() => toggleFeature(feature)}
-                ariaLabel={feature}
-                showToggleLabel={false}
-                invertColors
-                data-testid={`toggle-${feature}`}
-                disabled={initialSettings.includes(feature)}
-              />
+              <Toggle
+                checked={!localDisabled.includes(feature)}
+                onChange={() => toggleFeature(feature)}
+                ariaLabel={feature}
+                showToggleLabel={false}
+                invertColors
+                data-testid={`toggle-${feature}`}
+                disabled={initialSettings.includes(feature)}
+              />

This makes the Toggle controlled (reads from localDisabled state updated by the useEffect on line 305-307), removes the ts-ignore, and correctly shows permanently-disabled features as off.

🧹 Nitpick comments (2)
bigbluebutton-html5/public/locales/en.json (1)

1111-1156: Polish disable-features strings: grammar fix, clarify import label, add ariaTitle

  • Improve description grammar (Line 1112).
  • Key 1127 mentions “WithAnnotations” but label omits it; align text.
  • Add an ariaTitle for accessibility, like lock-viewers.
     "app.disable-features.title": "Disable features",
-    "app.disable-features.description": "Change session disable features setting",
+    "app.disable-features.description": "Change disabled features for this session",
+    "app.disable-features.ariaTitle": "Disable features settings modal",
@@
-    "app.disable-features.importPresentationWithAnnotationsFromBreakoutRoomsLabel": "Import Presentations from Breakout Rooms",
+    "app.disable-features.importPresentationWithAnnotationsFromBreakoutRoomsLabel": "Import Presentations with Annotations from Breakout Rooms",
bigbluebutton-html5/imports/ui/components/disable-features-modal/styles.ts (1)

1-7: Suggest refactor: Avoid !important if possible.

Line 6 uses !important to override width, which is generally a code smell that can make styles harder to maintain. Consider whether the parent styles can be adjusted to avoid needing !important.

If the override is necessary due to specificity in the base LockViewersModal, this is acceptable, but document why with a comment.

If the override is necessary, add a comment:

 const ModalContainer = styled(styles.LockViewersModal)`
+  /* Override parent width constraint for feature-rich modal */
   width: fit-content !important;
 `;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c796278 and cca7948.

📒 Files selected for processing (3)
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/styles.ts (1 hunks)
  • bigbluebutton-html5/public/locales/en.json (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (3)
bigbluebutton-html5/imports/ui/components/connection-status/component.jsx (1)
  • useCurrentUser (211-221)
bigbluebutton-html5/imports/ui/core/hooks/useMeeting.ts (1)
  • useMeeting (68-94)
bigbluebutton-html5/imports/ui/components/disable-features-modal/mutations.ts (2)
  • SetDisabledFeaturesMutationVars (3-5)
  • SET_DISABLED_FEATURES (7-11)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-html5)
🔇 Additional comments (13)
bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (8)

1-10: LGTM – Imports are well-organized.

All necessary dependencies are imported correctly: React hooks, Apollo Client for GraphQL mutations, react-intl for i18n, custom hooks for user/meeting data, styling, and mutations.


11-20: LGTM – TypeScript interfaces are well-defined.

The props interfaces clearly define the component contracts. Note that initialSettings: string[] on line 19 is correctly typed, but the actual prop passed on line 431 needs the fix mentioned in the separate comment.


22-214: LGTM – Comprehensive i18n message definitions.

All feature labels, section titles, and UI strings are properly defined with IDs and default messages. The categorization aligns well with the feature groupings defined later in the file.


216-293: LGTM – Well-organized feature categorization.

Features are logically grouped into semantic categories (Breakout Rooms, Chat, Presentation, etc.) and the supportedFeaturesToRender object provides a clean structure for rendering. Category keys correctly correspond to the intl message definitions.


302-316: LGTM – State management and toggle logic are correct.

The local state (localDisabled) correctly initializes from props and stays synchronized via the useEffect hook (lines 305-307). The toggleFeature function properly adds/removes features from the array. This ensures the UI reflects both subscription updates and local changes before submission.


318-326: LGTM – Modal action handlers are correct.

handleCancel properly resets local state to the original prop value before closing, and handleApply submits the local changes and closes the modal. Clean separation of concerns.


397-424: LGTM – Container logic and data fetching are well-structured.

The container correctly:

  • Fetches current user data to check moderator status (lines 398-402)
  • Uses the useMeeting hook with proper projection to get disabledFeatures (lines 404-409)
  • Sets up the GraphQL mutation (lines 411-413)
  • Guards against rendering for non-moderators or during loading (line 424)

328-394: LGTM – JSX rendering structure is well-organized.

The rendering follows a clean pattern:

  • Modal with proper accessibility props (title, contentLabel)
  • Categorized sections using Object.entries iteration
  • Responsive grid layout (from styles.ts)
  • Footer with Apply/Cancel actions

The structure aligns well with the categorization approach suggested in the PR comments to improve UX.

bigbluebutton-html5/imports/ui/components/disable-features-modal/styles.ts (5)

9-18: LGTM – Responsive grid layout is well-implemented.

The two-column grid with a mobile-first media query breakpoint at 768px provides a good user experience across devices. Gap spacing and margin are appropriate.


20-29: LGTM – FeatureItem styling follows best practices.

Good use of:

  • Flexbox for alignment
  • CSS custom properties for theming
  • min-height: 48px ensures adequate touch target size (accessibility)
  • Subtle shadow for depth

31-38: LGTM – Label text overflow handling is appropriate.

The combination of nowrap, overflow: hidden, and text-overflow: ellipsis prevents long feature names from breaking the layout. Margin spacing is appropriate.


40-50: LGTM – Category components are well-styled.

Section and title components provide clear visual hierarchy with:

  • Appropriate spacing (margin-bottom)
  • Typography scale from shared constants
  • Uppercase text transform for visual distinction

52-60: LGTM – Export structure extends base styles cleanly.

The default export spreads existing lock-viewers styles and adds new components, maintaining consistency with the existing codebase pattern.

@gustavotrott

Copy link
Copy Markdown
Contributor

Please take a look at coderabbitai comments.

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationDownloadablePubMsgHdlr.scala (1)

30-39: Add missing feature check for Annotated file type.

The code is missing a check for downloadPresentationWithAnnotations when fileStateType == "Annotated". While MakePresentationDownloadReqMsgHdlr.scala properly gates all three file types (Original, Converted, Annotated) against their respective feature flags, SetPresentationDownloadablePubMsgHdlr.scala only checks Original and Converted, creating a security gap where Annotated presentations can bypass the feature restriction.

Add this check before the existing conditions at line 30:

} else if (DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "downloadPresentationWithAnnotations")
  && msg.body.fileStateType == "Annotated") {
  val reason = "Download annotated presentation is disabled for meeting."
  PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, bus.outGW, liveMeeting)
  state
♻️ Duplicate comments (3)
bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (1)

358-370: Fix Toggle control and permanently-disabled feature logic.

Critical issues:

  1. Uncontrolled Toggle: Using defaultChecked means the toggle won't update when disabledFeatures changes via subscription. It only sets the initial state and ignores subsequent prop changes.

  2. Inverted logic for permanently disabled features: The expression !disabledFeatures.includes(feature) || initialSettings.includes(feature) causes permanently disabled features (those in initialSettings) to display as enabled (toggle ON), which is semantically incorrect. A disabled feature should show toggle OFF.

Replace with a controlled Toggle:

               <Toggle
-              // @ts-ignore
-                defaultChecked={
-                  !disabledFeatures.includes(feature)
-                  || initialSettings.includes(feature)
-                }
+                checked={!localDisabled.includes(feature)}
                 onChange={() => toggleFeature(feature)}
                 ariaLabel={feature}
                 showToggleLabel={false}
                 invertColors
                 data-testid={`toggle-${feature}`}
                 disabled={initialSettings.includes(feature)}
               />

This makes the toggle reflect localDisabled state (which syncs with subscription updates via the useEffect at lines 305-307) and correctly shows permanently disabled features as OFF.

bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (1)

269-277: Critical: Fix duplicate key by using unique index.

Line 271 uses generateAndStoreUUID(2, 'options-'), but index 2 is already used by the "Lock viewers" action at line 262. This creates duplicate React keys, causing warnings and unpredictable UI behavior.

Use a unique index for the "Disable features" action:

       {
         allow: true,
-        key: generateAndStoreUUID(2, 'options-'),
+        key: generateAndStoreUUID(9, 'options-'),
         label: intl.formatMessage(intlMessages.disabledFeaturesLabel),
         description: intl.formatMessage(intlMessages.disabledFeaturesDesc),
         onClick: () => disabledFeaturesModal.open(),
         icon: 'circle_close',
         dataTest: 'disabledFeaturesButton',
       },

(Index 9 is unused; indices 0-8 are allocated to other actions.)

bigbluebutton-html5/public/locales/en.json (1)

193-194: Fix duplicate "Lock viewers" label and description grammar.

Two issues:

  1. Duplicate label: Line 193 uses "Lock viewers", identical to line 191's lockViewersLabel. This will confuse users seeing two "Lock viewers" entries in the menu.

  2. Grammar/capitalization: Line 194 starts with lowercase "disabled" which is inconsistent with other descriptions in the file.

Suggested values:

-    "app.userList.userOptions.disabledFeaturesLabel": "Lock viewers",
-    "app.userList.userOptions.disabledFeaturesDesc": "disabled certain functionalities of the session",
+    "app.userList.userOptions.disabledFeaturesLabel": "Disable features",
+    "app.userList.userOptions.disabledFeaturesDesc": "Disable certain functionalities for this session",

Note: Per BigBlueButton's translation workflow, locale file updates should be made in Transifex rather than directly in pull requests. Based on learnings

🧹 Nitpick comments (3)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/audiocaptions/UpdateTranscriptPubMsgHdlr.scala (1)

58-58: LGTM! Feature check correctly migrated to DisabledFeatures2x pattern.

The change from liveMeeting.props.meetingProp.disabledFeatures to DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "liveTranscription") is logically equivalent and aligns with the PR's objective to support runtime updates to disabled features. The new pattern is consistent with similar updates across other handlers in the codebase.

Optional: Consider using constants for feature names.

The hardcoded string "liveTranscription" could benefit from being defined as a constant (e.g., FeatureNames.LIVE_TRANSCRIPTION) to prevent typos and improve maintainability. However, this appears to be the established pattern across the entire codebase, so addressing it would require a broader refactoring effort beyond this PR.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReactionReqMsgHdlr.scala (1)

16-17: Performance: DisabledFeatures2x.contains converts HashSet to Vector on each call.

The feature checks are functionally correct. However, DisabledFeatures2x.contains calls disabled.toVector.contains(feature), converting the internal HashSet to a Vector on every check. Since HashSet provides O(1) contains, the model should check the HashSet directly instead of converting to Vector (O(n)).

This is a systemic issue affecting all handlers using DisabledFeatures2x.contains, not specific to this file.

Consider refactoring DisabledFeatures2x.contains to check the HashSet directly:

In akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala:

 def contains(disabled: DisabledFeatures2x, feature: String): Boolean = {
-  disabled.toVector.contains(feature)
+  disabled.disabledFeatures.contains(feature)
 }

Note: This requires making disabledFeatures accessible to the companion object or adding a package-private accessor method.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (1)

827-827: Minor: Inconsistent comment spacing.

The comment uses two spaces after // while most other comments in the file use one space.

Apply this diff:

-      //  Disabled Components
+      // Disabled Components
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cca7948 and a79399b.

📒 Files selected for processing (31)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/audiocaptions/UpdateTranscriptPubMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala (3 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StartExternalVideoPubMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/CreateGroupChatReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReactionReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/EditGroupChatMessageReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageFromApiSysPubMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageMsgHdlr.scala (3 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageReactionReqMsgHdlr.scala (1 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginHdlrHelpers.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginPersistEventMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/polls/StartPollReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/MakePresentationDownloadReqMsgHdlr.scala (3 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPageInfiniteWhiteboardPubMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationDownloadablePubMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/timer/ActivateTimerReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserRaiseHandReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserReactionEmojiReqMsgHdlr.scala (2 hunks)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (4 hunks)
  • bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala (1 hunks)
  • bbb-graphql-server/metadata/actions.graphql (1 hunks)
  • bbb-graphql-server/metadata/actions.yaml (1 hunks)
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (1 hunks)
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/mutations.ts (1 hunks)
  • bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (13 hunks)
  • bigbluebutton-html5/public/locales/en.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (13)
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageFromApiSysPubMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/EditGroupChatMessageReqMsgHdlr.scala
  • bigbluebutton-html5/imports/ui/components/disable-features-modal/mutations.ts
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/CreateGroupChatReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserReactionEmojiReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageReactionReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StartExternalVideoPubMsgHdlr.scala
  • bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/UsersMsgs.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/SendGroupChatMessageMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/CreateBreakoutRoomsCmdMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPageInfiniteWhiteboardPubMsgHdlr.scala
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2024-10-10T12:15:03.265Z
Learnt from: jaapjansma
Repo: bigbluebutton/bigbluebutton PR: 21204
File: bbb-common-web/src/main/scala/org/bigbluebutton/api2/meeting/MeetingsManagerActor.scala:21-21
Timestamp: 2024-10-10T12:15:03.265Z
Learning: When reviewing code changes in BigBlueButton, particularly in case classes like `RegisterUser` in `MeetingsManagerActor.scala`, ensure to accurately distinguish between added parameters and replaced parameters to avoid incorrect assessments.

Applied to files:

  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/audiocaptions/UpdateTranscriptPubMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/MakePresentationDownloadReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReactionReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/timer/ActivateTimerReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginPersistEventMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/polls/StartPollReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserRaiseHandReqMsgHdlr.scala
  • akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginHdlrHelpers.scala
📚 Learning: 2025-10-15T17:52:37.432Z
Learnt from: guiiBecker
Repo: bigbluebutton/bigbluebutton PR: 24084
File: bigbluebutton-html5/public/locales/pt.json:323-323
Timestamp: 2025-10-15T17:52:37.432Z
Learning: Translation issues in locale files (bigbluebutton-html5/public/locales/*.json) should be updated in Transifex, the translation management platform used by the BigBlueButton project, rather than being fixed directly in pull requests.

Applied to files:

  • bigbluebutton-html5/public/locales/en.json
📚 Learning: 2025-10-15T17:57:46.195Z
Learnt from: guiiBecker
Repo: bigbluebutton/bigbluebutton PR: 24084
File: bigbluebutton-html5/public/locales/ja.json:723-727
Timestamp: 2025-10-15T17:57:46.195Z
Learning: In the bigbluebutton repository, locale files (e.g., public/locales/*.json) are managed through Transifex and should not be edited directly in pull requests. Translation corrections and updates should be made in Transifex, which then syncs to the repository.

Applied to files:

  • bigbluebutton-html5/public/locales/en.json
🧬 Code graph analysis (15)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/audiocaptions/UpdateTranscriptPubMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
bigbluebutton-html5/imports/ui/components/disable-features-modal/component.tsx (3)
bigbluebutton-html5/imports/ui/services/features/index.js (1)
  • disabledFeatures (7-7)
bigbluebutton-html5/imports/ui/core/hooks/useMeeting.ts (1)
  • useMeeting (68-94)
bigbluebutton-html5/imports/ui/components/disable-features-modal/mutations.ts (2)
  • SetDisabledFeaturesMutationVars (3-5)
  • SET_DISABLED_FEATURES (7-11)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/MakePresentationDownloadReqMsgHdlr.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1)
  • meetingId (43-66)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/disabledcomponents/ChangeDisabledComponentsInMeetingCmdMsgHdlr.scala (1)
  • handleChangeDisabledComponentsCmdMsg (22-60)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReactionReqMsgHdlr.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/LiveMeeting.scala (1)
  • LiveMeeting (10-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/timer/ActivateTimerReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginPersistEventMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationDownloadablePubMsgHdlr.scala (2)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/MeetingDAO.scala (1)
  • meetingId (43-66)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/polls/StartPollReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserRaiseHandReqMsgHdlr.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginHdlrHelpers.scala (1)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/DisabledFeatures2x.scala (3)
  • DisabledFeatures2x (5-37)
  • DisabledFeatures2x (39-60)
  • contains (29-31)
bigbluebutton-html5/imports/ui/components/user-list/user-list-graphql/user-participants-title/user-options-dropdown/component.tsx (1)
bigbluebutton-html5/imports/ui/core/singletons/modalController.tsx (1)
  • useModalRegistration (192-245)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build-package (bbb-web)
  • GitHub Check: build-package (bbb-apps-akka)
  • GitHub Check: build-package (bbb-html5)
  • GitHub Check: build-package (bbb-graphql-server)
  • GitHub Check: build-package (bbb-fsesl-akka)
🔇 Additional comments (27)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/polls/StartPollReqMsgHdlr.scala (1)

7-7: LGTM! Previous review feedback has been addressed.

The code correctly uses the DisabledFeatures2x.contains helper method for both the "polls" and "quizzes" feature checks, as suggested in the previous review. The import statement is properly added, and the implementation maintains the same control flow and error handling while successfully migrating from the legacy meetingProp.disabledFeatures to the new disabledFeatures2x model.

Also applies to: 27-34

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/audiocaptions/UpdateTranscriptPubMsgHdlr.scala (1)

7-7: LGTM! Import correctly added.

The DisabledFeatures2x import is necessary for the updated feature check on line 58 and follows the standard import pattern.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (2)

7-7: LGTM! Import correctly updated.

The addition of DisabledFeatures2x to the imports is necessary for the new permission check and is correctly placed.


16-16: LGTM! Permission check correctly migrated to DisabledFeatures2x.

The migration from liveMeeting.props.meetingProp.disabledFeatures.contains("screenshare") to DisabledFeatures2x.contains(liveMeeting.disabledFeatures2x, "screenshare") is correct and consistent with the broader refactoring across the codebase. This change enables the dynamic feature disabling capability that is the core objective of this PR, allowing moderators to toggle screenshare availability during an active meeting.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/BroadcastLayoutMsgHdlr.scala (2)

4-4: LGTM: Import correctly added.

The DisabledFeatures2x import is necessary for the feature check on line 18 and follows the existing import pattern.


18-18: LGTM: Feature check correctly migrated to new model.

The migration from the old disabledFeatures check to DisabledFeatures2x.contains is correct and maintains the same behavior while enabling runtime feature updates as intended by this PR.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginHdlrHelpers.scala (2)

5-5: LGTM!

The import of DisabledFeatures2x is correctly added to support the new feature check pattern introduced in this PR.


33-33: Migration to DisabledFeatures2x is correct and consistent.

The feature check has been successfully migrated to use the new DisabledFeatures2x model. Verification confirms that the feature identifier "plugins" is consistently applied across the codebase (PluginHdlrHelpers.scala and PluginPersistEventMsgHdlr.scala), and the new API pattern is uniformly implemented.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/timer/ActivateTimerReqMsgHdlr.scala (1)

8-8: LGTM! Feature flag check correctly migrated to DisabledFeatures2x.

The import addition and the updated timer feature check correctly implement the migration to the centralized DisabledFeatures2x model. The negation logic properly evaluates to true when the feature is enabled (i.e., not present in the disabled set), and the rest of the control flow remains appropriately unchanged.

Also applies to: 34-34

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/plugin/PluginPersistEventMsgHdlr.scala (2)

7-7: LGTM: Import addition supports the migration to DisabledFeatures2x.

The import is correctly placed and necessary for the new feature flag check.


25-48: LGTM: Migration to DisabledFeatures2x and control flow improvement.

The changes correctly migrate to the new DisabledFeatures2x.contains API and add the else block to properly guard plugin processing. This is both a refactoring and a behavioral fix: previously, even if plugins were disabled and the user was ejected, the plugin event would still be processed; now processing is correctly skipped when plugins are disabled.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationDownloadablePubMsgHdlr.scala (1)

8-8: LGTM: Import added correctly.

The import is necessary for the migration to the new DisabledFeatures2x pattern.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeUserRaiseHandReqMsgHdlr.scala (2)

5-5: LGTM: Import addition supports runtime feature disabling.

The DisabledFeatures2x import is correctly added to support the migration to runtime-updatable feature flags.


48-48: No issues found with the runtime feature flag migration.

The code change is thread-safe by Akka's design. Akka ensures each actor instance processes messages one at a time, guaranteeing thread safety for accessing actor state. Akka's "send rule" guarantees that changes to internal fields of an actor are visible when the next message is processed by that actor.

The migration correctly implements the runtime toggle pattern:

  • Reads via DisabledFeatures2x.contains() are atomic within message handling
  • Mutations via DisabledFeatures2x.setAll() and persist() occur only in ChangeDisabledComponentsInMeetingCmdMsgHdlr, ensuring centralized control
  • The immutable reference (val disabledFeatures2x in LiveMeeting) protects against external escaping

As long as liveMeeting remains confined to a single actor's message handlers and is never passed to Futures or other threads, the mutable state inside is safe.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationUploadTokenReqMsgHdlr.scala (2)

7-7: LGTM: Import correctly added.

The import of DisabledFeatures2x is properly structured and necessary for the new feature check pattern.


76-76: Migration to DisabledFeatures2x is correct and safe.

The change correctly implements the new feature-disabling pattern. The disabledFeatures2x parameter is required and non-nullable in the LiveMeeting constructor, and DisabledFeatures2x.contains safely handles its input. No NullPointerException risk exists.

bbb-graphql-server/metadata/actions.yaml (1)

1-204: LGTM! Consistent action definition and quote normalization.

The new changeDisabledFeaturesInMeeting action follows the established pattern (synchronous, correct handler, appropriate permissions). The quote style change from single to double quotes improves consistency across the file.

bbb-graphql-server/metadata/actions.graphql (1)

206-211: LGTM! Mutation follows GraphQL conventions.

The mutation name uses camelCase (consistent with other mutations in the file), has clear parameter naming, and appropriate types.

bigbluebutton-html5/public/locales/en.json (1)

1113-1157: LGTM! Comprehensive and well-structured localization keys.

The new app.disable-features.* keys provide complete coverage for the disable features modal, with consistent naming conventions and clear categorization by sections (breakout rooms, chat, presentation, etc.).

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/groupchats/DeleteGroupChatMessageReactionReqMsgHdlr.scala (1)

8-8: LGTM!

The import addition is necessary for the DisabledFeatures2x.contains method calls used in the updated feature checks.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (3)

40-40: LGTM!

The import is necessary for mixing in the ChangeDisabledFeaturesInMeetingCmdMsgHdlr trait.


92-92: LGTM!

The trait mixin properly integrates the ChangeDisabledFeaturesInMeetingCmdMsgHdlr, which includes permission checks, feature validation, and persistence logic.


346-346: LGTM!

The feature check correctly migrates to the DisabledFeatures2x model. Note: The performance concern regarding DisabledFeatures2x.contains (flagged in the previous file) applies here as well.

akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/MakePresentationDownloadReqMsgHdlr.scala (4)

10-10: LGTM!

Import addition is correct and necessary for the new feature-flag checks.


135-146: LGTM!

The migration of three presentation download feature checks to the new DisabledFeatures2x API is correct. The mutually exclusive conditions (Annotated, Original, Converted file types) are properly preserved, and error handling remains appropriate.


216-216: LGTM!

The breakout room presentation import feature check is correctly migrated to the new API. The error handling (logging instead of ejecting) is appropriate for the capture flow.


135-146: Feature name consistency verified—no issues found.

The extracted feature names across the codebase are consistent with no typos or spelling variations detected. All feature names in MakePresentationDownloadReqMsgHdlr.scala (downloadPresentationWithAnnotations, downloadPresentationOriginalFile, downloadPresentationConvertedToPdf, importPresentationWithAnnotationsFromBreakoutRooms) match their usage in related files and follow a consistent camelCase convention.

timerApp2x.handle(m, liveMeeting, msgBus)
updateUserLastActivity(m.header.userId)
// Disabled Components
case m: ChangeDisabledFeaturesInMeetingCmdMsg => handleChangeDisabledComponentsCmdMsg(m)

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

Add user activity tracking for consistency.

The handler modifies meeting state but doesn't update user activity like comparable handlers (e.g., ChangeLockSettingsInMeetingCmdMsg at line 628, SetGuestPolicyCmdMsg at line 697). This could affect user inactivity tracking and meeting analytics.

Apply this diff:

-      case m: ChangeDisabledFeaturesInMeetingCmdMsg => handleChangeDisabledComponentsCmdMsg(m)
+      case m: ChangeDisabledFeaturesInMeetingCmdMsg =>
+        handleChangeDisabledComponentsCmdMsg(m)
+        updateUserLastActivity(m.header.userId)

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

@github-actions

Copy link
Copy Markdown

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

@antobinary antobinary modified the milestones: Release 3.0, Release 3.1 Jan 8, 2026
@antobinary

Copy link
Copy Markdown
Member

Postponing to BBB 3.1+ after an internal conversation

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create new 'Lock viewers' menu entry to enable/disable emoji reactions to chat messages

3 participants