Repository navigation
Refactor(html5, akka): Make fit to width be persisted between presenters changes - #22644
Conversation
WalkthroughThis change set introduces a new command message and its corresponding handler functionality to enable setting a presentation’s "fit-to-width" property. A new trait, Sequence Diagram(s)sequenceDiagram
participant Client
participant GraphQLServer
participant MeetingActor
participant PresPodHdlr as PresentationPodHandler
participant DB
Client->>GraphQLServer: Invoke presentationSetFitToWidth mutation
GraphQLServer->>MeetingActor: Publish SetPresentationFitToWidthCmdMsg
MeetingActor->>PresPodHdlr: Route SetPresentationFitToWidthCmdMsg
PresPodHdlr->>PresPodHdlr: Validate user permissions
alt Permission granted
PresPodHdlr->>DB: Call updateFitToWidth(pageId, fitToWidth)
DB-->>PresPodHdlr: Confirm update
PresPodHdlr-->>MeetingActor: Return updated state
else Permission denied
PresPodHdlr->>MeetingActor: Eject user from meeting
end
MeetingActor-->>GraphQLServer: Updated meeting state
GraphQLServer-->>Client: Send updated presentation page data
Suggested labels
Suggested reviewers
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (13)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
bigbluebutton-html5/imports/ui/components/app/container.jsx (2)
82-82: Add optional error handling for mutation.
UsinguseMutationis straightforward, but consider catching errors (e.g., in an onError callback) to provide user feedback on failure.
105-112: Refine mutation callback to handle response and errors.
Currently, the mutation doesn't track success or error states. Adding a.then/.catchor onCompleted/onError handler can improve user feedback if the update fails.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala (1)
9-31: Revisit references to “infinite whiteboard” for clarity.
The permission-checking logic reuses “infiniteWhiteboard” reasons for a “fit to width” feature, which can be confusing. Consider renaming and clarifying these messages to match the new functionality. Also, consider removing the semicolon at line 25 for idiomatic Scala style.- val reason = "No permission to set infinite whiteboard." + val reason = "No permission to set fit-to-width."akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPageDAO.scala (1)
139-149: Handle errors robustly inupdateFitToWidth.
While logging is helpful, consider surfacing failures to the caller or capturing them for retry logic.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationPodHdlrs.scala(1 hunks)akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala(1 hunks)akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPageDAO.scala(4 hunks)akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPresentationDAO.scala(1 hunks)akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/PresentationPods.scala(2 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/MeetingActor.scala(1 hunks)bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/PresentationPodsMsgs.scala(1 hunks)bbb-graphql-actions/src/actions/presentationSetFitToWidth.ts(1 hunks)bbb-graphql-server/bbb_schema.sql(3 hunks)bigbluebutton-html5/imports/ui/components/app/app-graphql/mutations.ts(1 hunks)bigbluebutton-html5/imports/ui/components/app/app-graphql/queries.ts(1 hunks)bigbluebutton-html5/imports/ui/components/app/component.jsx(3 hunks)bigbluebutton-html5/imports/ui/components/app/container.jsx(5 hunks)bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: build-package (others)
- GitHub Check: build-package (bbb-html5)
- GitHub Check: build-package (bbb-fsesl-akka)
- GitHub Check: build-package (bbb-web)
- GitHub Check: build-package (bbb-graphql-server)
- GitHub Check: build-package (bbb-playback-record)
- GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (26)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationPodHdlrs.scala (1)
35-35: Well-structured trait addition for the fit-to-width functionality.The addition of
SetPresentationFitToWidthCmdMsgHdlrto the existing trait chain follows the established pattern in this class. This trait will handle the newly introduced command to persist presentation fit-to-width settings.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPresentationDAO.scala (1)
183-183: Database model correctly updated to store fitToWidth property.The
fitToWidthfield has been appropriately added to thePresPageDbModelinstantiation, ensuring that the presentation fit-to-width property is persisted in the database when updating presentation pages.bigbluebutton-html5/imports/ui/components/app/app-graphql/queries.ts (1)
1-15: Well-designed GraphQL subscription for fit-to-width updates.This new GraphQL subscription query is appropriately structured to fetch the
fitToWidthandpageIdfields from the current press page, which aligns with the PR objective of making fit-to-width persistent between presenter changes. The subscription pattern allows real-time updates when the values change.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala (1)
635-635: Message handler correctly integrated in the appropriate location.The new case for
SetPresentationFitToWidthCmdMsgis correctly placed among other presentation-related message handlers and passes the message to thepresentationPodsApp.handlemethod, maintaining consistency with the existing pattern for handling presentation commands.bigbluebutton-html5/imports/ui/components/app/app-graphql/mutations.ts (1)
1-17: Clean and focused GraphQL mutation for 'fit to width' functionality.The implementation defines a GraphQL mutation that allows setting the "fit to width" property for a presentation page. The mutation takes two required parameters: a boolean
fitToWidthvalue and thepageIdstring to identify which page to update. This forms the foundation for persisting the "fit to width" setting when changing presenters.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/PresentationPods.scala (1)
22-36: Good addition of the fitToWidth property to the PresentationPage case class.The addition of the
fitToWidthBoolean parameter with a default value offalseintegrates well with the existing parameters. The consistent formatting alignment of parameters improves readability.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala (1)
295-296: Appropriate message handler for SetPresentationFitToWidthCmdMsg.The routing of the new
SetPresentationFitToWidthCmdMsgmessage type is correctly implemented using therouteGenericMsgmethod, consistent with the pattern used for other presentation-related messages. This ensures that fit-to-width commands are properly processed in the message handling architecture.bbb-graphql-server/bbb_schema.sql (3)
1365-1366: Schema properly extended with fitToWidth column.The
pres_pagetable definition has been correctly modified to include thefitToWidthBoolean column, enabling persistence of this setting.
1426-1427: View definitions properly updated to include fitToWidth.The view
v_pres_pageincludes the newfitToWidthfield, ensuring it can be queried through the view.
1460-1461: Current page view updated to expose fitToWidth property.The
v_pres_page_currview includes thefitToWidthfield, making it accessible for the current presentation page, which is critical for preserving this setting when switching presenters.bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx (2)
1404-1409: Improve dependency handling for fitToWidth effect.This change removes
isPresenterfrom the dependency array, making the effect only run whenfitToWidthchanges. This is essential for persisting the fit-to-width setting when switching presenters, but it could lead to unexpected behavior if the implementation changes in the future.Consider adding a comment explaining why
isPresenteris intentionally omitted from the dependency array to help future developers understand this design decision.
1447-1482: Correctly updated dependency array to handle presenter changes.Adding
isPresenterto this dependency array ensures the camera synchronization logic reruns when the presenter changes, which is necessary for the fit-to-width persistence feature to work correctly.This change correctly implements the synchronization of the presentation view when the presenter changes, ensuring the fit-to-width setting is properly maintained.
bigbluebutton-html5/imports/ui/components/app/component.jsx (3)
157-157: Added fitToWidth prop to component props.This change extends the component's interface to include the fitToWidth property, allowing the component to respond to changes in this setting from parent components.
178-180: State update for fitToWidth changes.The implementation correctly updates the component's state when the fitToWidth prop changes, enabling persistence of this setting between presenter changes.
192-194: Enhanced setPresentationFitToWidth to propagate changes upwards.Added a call to
handlePresentationFitToWidthto ensure changes to the fitToWidth setting are communicated to parent components, which is essential for persisting this setting.bbb-graphql-actions/src/actions/presentationSetFitToWidth.ts (1)
1-31: Well-implemented message builder for the new fitToWidth feature.This new file provides a clean implementation of the Redis message builder for setting the fitToWidth property. It correctly:
- Validates that the user is a presenter (line 5)
- Validates the required input parameters (lines 6-9)
- Constructs the message with the appropriate structure (lines 11-30)
The implementation follows the established patterns for similar functionality in the codebase and properly handles input validation.
bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/PresentationPodsMsgs.scala (1)
405-407: Added new command message for fitToWidth setting.The implementation adds the necessary message types to support the fitToWidth feature:
SetPresentationFitToWidthCmdMsgobject with a constant NAME- Case class for the message extending StandardMsg
- Case class for the message body with userId, pageId, and fitToWidth fields
This follows the standard pattern for message definitions in the application and correctly implements all required components for the new feature.
bigbluebutton-html5/imports/ui/components/app/container.jsx (5)
2-2: No issues with the new import.
The usage of bothuseMutationanduseReactiveVaris correct and aligns well with the rest of the code.
22-23: New GraphQL imports align with feature requirements.
The newly added mutation and query for fit-to-width functionality are correctly declared.
101-104: Good approach for defaulting page data.
Optional chaining and default fallbacks help prevent runtime errors whencurrentPageInfois undefined.
128-129: Props forwarding looks correct.
Passing downfitToWidthandhandlePresentationFitToWidthensures the child component’s presentation display remains in sync.
31-34:Details
✅ Verification successful
Consider verifying the subscription returns valid array data.
Your optional chaining is helpful for null safety, but ensurepres_page_curris consistently an array.
🏁 Script executed:
#!/bin/bash # Description: Verify that `pres_page_curr` is always an array rg -A 5 pres_page_currLength of output: 11744
Verified: Subscription Data Structure is Correct
After reviewing the codebase, it’s clear that the subscription returning data for
pres_page_curris consistently handled as an array across multiple components (e.g., in app, whiteboard, presentation, webcam, and sidebar modules). The usage with optional chaining and array indexing (accessing[0]) confirms that the returned data type is valid. No further changes are needed.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala (1)
1-8: Imports and package structure are clear.
No issues found. The new package and imports are well-organized.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPageDAO.scala (3)
30-31: New field added to the model.
StoringfitToWidthas a Boolean is straightforward. Ensure default values or migrations handle existing records gracefully.
57-57: Tuple mapping includes new field.
IncludingfitToWidthis consistent with thePresPageDbModelcase class.
93-94: Properly inserting new field into the database.
EnsuresfitToWidthis persisted on creation. No issues identified.
| val maxImageHeight = column[Int]("maxImageHeight") | ||
| val uploadCompleted = column[Boolean]("uploadCompleted") | ||
| val infiniteWhiteboard = column[Boolean]("infiniteWhiteboard") | ||
| val fitToWidth = column[Boolean]("fitToWidth") |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Confirm database migrations for the new column.
A default value or migration script may be required to prevent errors on existing rows.
🏁 Script executed:
#!/bin/bash
# Description: Verify the `fitToWidth` column presence and default in the DB schema
rg -A 5 fitToWidth --glob '*.sql'Length of output: 1386
Database Migration and Default Value Confirmation Needed
Based on the verification, the SQL schema in bbb-graphql-server/bbb_schema.sql defines the "fitToWidth" column as a boolean without an accompanying default value. Since the DAO mapping in akka-bbb-apps/src/main/scala/org/bigbluebutton/core/db/PresPageDAO.scala treats it as a non-nullable Boolean, please ensure that a migration path is provided for existing rows to avoid potential errors. This could involve either:
- Adding a default value in the schema migration, or
- Implementing a migration script to backfill existing rows with an appropriate value.
Please confirm that one of these approaches has been or will be implemented.
|
This pull request has conflicts ☹ |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
record-and-playback/core/lib/recordandplayback/generators/events.rb (1)
1170-1185: Good implementation of the new event extraction methodThe new method
get_screenshare_as_content_eventssuccessfully extractsSetScreenshareAsContentEventevents from the provided XML, which appears to be related to the "Fit to Width" feature mentioned in the PR objectives.Some minor style improvements suggested:
- Use single quotes for strings without interpolation
- Add a trailing comma after the last hash item for better git diff when adding new items later
- BigBlueButton.logger.info("Extracting SetScreenshareAsContentEvent") + BigBlueButton.logger.info('Extracting SetScreenshareAsContentEvent') - screenshareAsContent: event.at_xpath('screenshareAsContent')&.text == "true" + screenshareAsContent: event.at_xpath('screenshareAsContent')&.text == "true",🧰 Tools
🪛 RuboCop (1.73)
[convention] 1171-1171: Prefer single-quoted strings when you don't need string interpolation or special symbols.
(Style/StringLiterals)
[convention] 1180-1180: Put a comma after the last item of a multiline hash.
(Style/TrailingCommaInHashLiteral)
[convention] 1180-1180: Prefer single-quoted strings when you don't need string interpolation or special symbols.
(Style/StringLiterals)
record-and-playback/presentation/scripts/publish/presentation.rb (1)
1299-1315: Implementation properly handles screenshare content eventsThe
process_swap_eventsmethod properly integrates with the newly addedget_screenshare_as_content_eventsmethod to extract and process screenshare content events. This is a key component for persisting the "Fit to Width" setting between presenter changes as described in the PR objectives.Some minor style improvements suggested:
- Use single quotes for strings without interpolation
- Remove the trailing comma in method arguments
- Remove extra blank lines at the end of the method
- BigBlueButton.logger.info("Processing screenshare as content events") + BigBlueButton.logger.info('Processing screenshare as content events') - show_screenshare: event[:screenshareAsContent], + show_screenshare: event[:screenshareAsContent] - -🧰 Tools
🪛 RuboCop (1.73)
[convention] 1300-1300: Prefer single-quoted strings when you don't need string interpolation or special symbols.
(Style/StringLiterals)
[convention] 1309-1309: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 1314-1315: Extra blank line detected.
(Layout/EmptyLines)
[convention] 1314-1315: Extra empty line detected at method body end.
(Layout/EmptyLinesAroundMethodBody)
bigbluebutton-html5/imports/ui/components/connection-status/component.jsx (2)
131-162: Well-structured container component with proper error handlingThe new
ConnectionStatusContainerfollows the container pattern effectively by:
- Handling data fetching logic
- Managing loading and error states
- Passing only the necessary data to the presentational component
However, there's a minor inconsistency in the log code naming.
- logCode: 'subscription_Failed', + logCode: 'subscription_failed',This change would maintain consistency with other log codes in the file that use lowercase.
1-164: Consider documenting the relation to "Fit to Width" functionalityWhile the code changes follow good React patterns for separation of concerns, it's not immediately clear how this connection status component refactoring relates to the PR objective of persisting "Fit to Width" settings between presenter changes. Consider adding a brief comment explaining this relationship for better maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
bbb-graphql-actions/package-lock.jsonis excluded by!**/package-lock.jsonbbb-learning-dashboard/package-lock.jsonis excluded by!**/package-lock.jsonbigbluebutton-html5/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (13)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/ScreenshareAsContenthdlrHelper.scala(1 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/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala(2 hunks)akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Layouts.scala(1 hunks)akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/SetScreenshareAsContentEvent.scala(1 hunks)akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala(2 hunks)bbb-graphql-actions/package.json(1 hunks)bbb-learning-dashboard/package.json(1 hunks)bigbluebutton-html5/imports/ui/components/connection-status/component.jsx(4 hunks)bigbluebutton-html5/imports/ui/components/notes/component.tsx(1 hunks)bigbluebutton-html5/package.json(2 hunks)record-and-playback/core/lib/recordandplayback/generators/events.rb(1 hunks)record-and-playback/presentation/scripts/publish/presentation.rb(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- bbb-learning-dashboard/package.json
🧰 Additional context used
🪛 RuboCop (1.73)
record-and-playback/core/lib/recordandplayback/generators/events.rb
[convention] 1171-1171: Prefer single-quoted strings when you don't need string interpolation or special symbols.
(Style/StringLiterals)
[convention] 1180-1180: Put a comma after the last item of a multiline hash.
(Style/TrailingCommaInHashLiteral)
[convention] 1180-1180: Prefer single-quoted strings when you don't need string interpolation or special symbols.
(Style/StringLiterals)
record-and-playback/presentation/scripts/publish/presentation.rb
[convention] 1300-1300: Prefer single-quoted strings when you don't need string interpolation or special symbols.
(Style/StringLiterals)
[convention] 1309-1309: Avoid comma after the last parameter of a method call.
(Style/TrailingCommaInArguments)
[convention] 1314-1315: Extra blank line detected.
(Layout/EmptyLines)
[convention] 1314-1315: Extra empty line detected at method body end.
(Layout/EmptyLinesAroundMethodBody)
🔇 Additional comments (19)
bbb-graphql-actions/package.json (1)
33-33: Dependency Version Update – Verify CompatibilityThe update of the
"redis"dependency version to"^4.7.0"appears to be a straightforward upgrade. Please verify that any API changes or deprecation notices between^4.6.10and^4.7.0have been accounted for, especially if there are interactions with redis elsewhere in the codebase. It would be good to run integration tests that involve redis functionality to ensure nothing is broken by this update.bigbluebutton-html5/imports/ui/components/notes/component.tsx (1)
161-162: Good additions for testability and component clarityAdding
data-test="notesHeader"improves testability by providing a clear selector for automated tests. SettingrightButtonProps={null}explicitly clarifies that no default right button should be rendered, working together with thecustomRightButtonprop that renders theNotesDropdowncomponent. These changes enhance the component's clarity and maintainability.record-and-playback/presentation/scripts/publish/presentation.rb (3)
1322-1322: Added new filename constant for layout XMLThe addition of
@layout_xml_filenamevariable supports the new functionality to persist layout settings across presenter changes.
1482-1483: Good integration of new functionalityThe new call to
process_swap_events(@doc)properly integrates the new functionality into the existing workflow.
1490-1491: Added proper file output for layout XMLThe code now correctly writes the layout XML to a file, ensuring the "Fit to Width" setting is persisted between presenter changes.
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/Layouts.scala (1)
88-88: Changed default value for screenshareAsContent to falseThis change modifies the default state of screenshare content handling, ensuring that screenshare is not automatically treated as content unless explicitly set. This aligns with the PR objective to better manage state persistence between presenter changes.
akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/RedisRecorderActor.scala (2)
124-124: Added handling for SetScreenshareAsContentEvtMsgGood addition of the case statement to handle the
SetScreenshareAsContentEvtMsgevent, which forwards to the new handler method.
775-779: Implementation of SetScreenshareAsContent handlerWell-implemented handler that records the screenshare as content state changes in Redis. This is crucial for persisting the state between presenter changes, aligning with the PR objective.
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/SetScreenshareAsContentReqMsgHdlr.scala (2)
5-5: Added necessary imports for permission handlingGood addition of the imports for
PermissionCheckandRightsManagementTrait, which are used in the permission validation logic.
27-27: Refactored to use ScreenshareAsContenthdlrHelperGood refactoring to use the helper class for sending the message. This promotes code reuse and maintainability by centralizing the message sending logic.
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/screenshare/ScreenshareRtmpBroadcastStartedVoiceConfEvtMsgHdlr.scala (2)
4-4: Added imports for helper class and presenter findingAppropriate imports for the new functionality to find presenters and use the shared helper method.
Also applies to: 9-9
66-74: Optimized screenshare content handling with presenter notificationExcellent enhancement to:
- Check if screenshare is already set as content before updating
- Only perform the database update when necessary
- Notify all presenters about the change
This improvement directly addresses the PR objective of ensuring that the 'Fit to Width' state is persisted between presenter changes by making sure all presenters are informed of the current state.
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/record/events/SetScreenshareAsContentEvent.scala (1)
3-15: Well-structured refactoring of the screenshare content event class.The implementation properly extends
AbstractParticipantRecordEventand provides a clean way to record screenshare content settings. The companion object with the constant definition is a good practice for maintaining string literals.akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/layout/ScreenshareAsContenthdlrHelper.scala (1)
1-28: Clean implementation of the helper object for screenshare content events.The helper object properly encapsulates the message creation and sending logic, following Scala best practices. This implementation supports the PR objective of persisting presentation settings between presenter changes by providing a standardized way to broadcast screenshare content status.
A few observations:
- Good use of named parameters for clarity
- Proper separation of message construction from sending
- Clean organization of imports and method structure
bigbluebutton-html5/package.json (2)
56-56: Updated Axios Version
Theaxiosdependency has been bumped to^1.8.2. Please verify that this update remains backward-compatible with the existing HTTP communication patterns in the client. Reviewing the axios changelog for any breaking changes would be advisable.
103-103: Updated Recharts Version
Therechartsdependency is updated to^2.15.1. Ensure that any API changes in Recharts between versions2.7.2and2.15.1are properly handled in the UI components that rely on it. Testing visual components for regression is recommended.bigbluebutton-html5/imports/ui/components/connection-status/component.jsx (3)
14-16: Component refactoring follows React best practicesThe refactored
ConnectionStatuscomponent now properly accepts user data via props instead of fetching it internally. This separation of concerns improves component reusability and testability.
64-64: Properly adapted to use the user propThe component now correctly uses the passed user prop in the
addUserNetworkHistorymethod, which aligns with the component refactoring.
164-164: Export update maintains API compatibilityUpdating the default export to the container component is the correct approach to maintain the same import signature for consumers of this module.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
bbb-playback.placeholder.sh (1)
1-1: Add a Shebang to Specify the Shell Interpreter.A shebang (e.g.
#!/bin/bash) at the top of the script ensures that the intended shell is used, which resolves the static analysis warning (SC2148) and provides consistency across environments.Apply the following diff:
+#!/bin/bash git clone --branch v5.3.0 --depth 1 https://github.com/bigbluebutton/bbb-playback bbb-playback🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
bbb-graphql-actions/package-lock.jsonis excluded by!**/package-lock.jsonbbb-learning-dashboard/package-lock.jsonis excluded by!**/package-lock.jsonbbb-export-annotations/package-lock.jsonis excluded by!**/package-lock.jsonbbb-graphql-actions/package-lock.jsonis excluded by!**/package-lock.jsonbbb-graphql-client-test/package-lock.jsonis excluded by!**/package-lock.jsonbbb-learning-dashboard/package-lock.jsonis excluded by!**/package-lock.jsonbigbluebutton-tests/playwright/package-lock.jsonis excluded by!**/package-lock.jsondocs/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (19)
bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx(3 hunks)bbb-graphql-actions/package.json(1 hunks)akka-bbb-apps/src/templates/systemloader/systemd/start-template(1 hunks)bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java(1 hunks)bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java(4 hunks)bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java(5 hunks)bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PresentationConversionCompletionService.java(2 hunks)bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PresentationFileProcessor.java(2 hunks)bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/S3FileManager.java(1 hunks)bbb-export-annotations/package.json(1 hunks)bbb-graphql-actions/package.json(1 hunks)bbb-graphql-middleware/internal/websrv/connhandler.go(1 hunks)bbb-playback.placeholder.sh(1 hunks)bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/component.tsx(1 hunks)bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx(1 hunks)bigbluebutton-html5/public/locales/ja.json(1 hunks)bigbluebutton-tests/playwright/package.json(1 hunks)bigbluebutton-web/grails-app/conf/spring/doc-conversion.xml(0 hunks)bigbluebutton-web/grails-app/conf/spring/resources.xml(1 hunks)
💤 Files with no reviewable changes (1)
- bigbluebutton-web/grails-app/conf/spring/doc-conversion.xml
🚧 Files skipped from review as they are similar to previous changes (4)
- bbb-graphql-actions/package.json
- bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx
- bbb-graphql-actions/package.json
- bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx
🧰 Additional context used
🪛 Shellcheck (0.10.0)
bbb-playback.placeholder.sh
[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
(SC2148)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: build-package (others)
- GitHub Check: build-package (bbb-html5)
- GitHub Check: build-package (bbb-web)
- GitHub Check: build-package (bbb-graphql-server)
- GitHub Check: build-package (bbb-playback-record)
- GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (23)
bigbluebutton-tests/playwright/package.json (1)
14-14: Upgrade: Verify the axios dependency update.The dependency
"axios": "^1.8.2"has been updated from its previous version. This change is consistent with similar updates in the repository and should help maintain a uniform dependency version across projects. Please ensure that any integrations and tests involving axios are verified against this new version.bbb-export-annotations/package.json (1)
12-12: Update Confirmation: Consistent axios dependency.The upgrade of axios to
"^1.8.2"aligns with the same change made in other parts of the codebase. Verify that the new version does not introduce breaking changes, particularly in any HTTP request handling or error behavior in this module.bbb-graphql-middleware/internal/websrv/connhandler.go (1)
72-76: Improved error handling for unauthorized WebSocket connections.The added code properly handles unauthorized connection attempts by sending a clear HTTP 403 Forbidden error response to the client and terminating the function when a WebSocket connection cannot be established due to origin authorization issues.
This enhancement:
- Provides better feedback to clients about why their connection was rejected
- Prevents further execution when authorization fails
- Uses the appropriate HTTP status code for authorization failures
akka-bbb-apps/src/templates/systemloader/systemd/start-template (1)
23-23: Approved: Increasing file descriptor limit improves service reliability.The change increases the maximum number of open file descriptors (
LimitNOFILE) from 1024 to 4096, which is a beneficial improvement. This higher limit allows the BigBlueButton Apps service to handle more concurrent connections and I/O operations, reducing the likelihood of "too many open files" errors, especially when managing presentation states across multiple users. This change supports the PR's objective by ensuring the backend has sufficient resources to persist presentation settings between presenter changes.bigbluebutton-html5/public/locales/ja.json (1)
1088-1088: Clarification on Touch Gesture Localization Update.The updated string for
"app.shortcut-help.gesture"replaces the generic"タッチジェスチャー"with"タッチ操作 (ホワイトボード)". This change clearly indicates that the touch-based gesture is specifically related to whiteboard functionality, which improves user comprehension in the context of the recent presentation management enhancements.bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/component.tsx (1)
234-234: Improved React key implementationChanging from using
createdAttimestamp tomessageIdas the key prop is a better practice for React's reconciliation process. This ensures unique identification of chat messages even if multiple messages share the same timestamp.bbb-common-web/src/main/java/org/bigbluebutton/api/ApiParams.java (1)
83-83: LGTM! Added constant for presentation conversion cache configuration.The addition of the
PRESENTATION_CONVERSION_CACHE_ENABLEDconstant follows the established pattern in this file and will be used as a key for configuration parameters.bigbluebutton-web/grails-app/conf/spring/resources.xml (1)
159-159: LGTM! Added property injection for presentation conversion cache.The addition of the
presentationConversionCacheEnabledproperty to theparamsProcessorUtilbean follows the correct pattern and allows the application to configure the presentation conversion cache feature.bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PresentationFileProcessor.java (2)
7-8: LGTM! Added necessary imports for Meeting dependency.These imports support the new meeting-specific approach to checking presentation conversion cache settings.
62-68: LGTM! Improved cache check to use meeting-specific settings.The code now properly extracts the meeting ID and uses it to retrieve the Meeting object to check if presentation conversion cache is enabled for that specific meeting. This approach allows for more granular control over caching on a per-meeting basis.
bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java (4)
92-92: LGTM! Added field for presentation conversion cache.This field will store the default presentation conversion cache setting.
547-557: LGTM! Added parameter processing for presentation cache configuration.The code properly parses the
PRESENTATION_CONVERSION_CACHE_ENABLEDparameter with appropriate error handling and logging.
811-811: LGTM! Added cache configuration to Meeting builder.The presentation conversion cache setting is now correctly passed to the Meeting object during creation.
1366-1368: LGTM! Added setter for presentation conversion cache configuration.This setter method allows the Spring framework to inject the configuration value into the ParamsProcessorUtil instance.
bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/PresentationConversionCompletionService.java (3)
4-5: Appropriate new import additions.The added imports for
MeetingandServiceUtilsare necessary for the refactored cache enablement check that follows.
84-84: Good code extraction for readability.Extracting the meeting ID into a named variable improves code readability before using it to retrieve the meeting object.
89-90: Architectural improvement: Cache enablement check moved to Meeting object.The change properly relocates the presentation conversion cache enablement check from the S3FileManager to the Meeting object. This aligns with the PR objective of making presentation settings (like "Fit to Width") persist across presenter changes by making such settings part of the meeting state rather than client-side only.
bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java (5)
72-72: Appropriate addition of new state flag.Adding the
presentationConversionCacheEnabledfield to the Meeting class follows the established pattern for meeting configuration flags and properly initializes it with a default value.
166-166: Constructor correctly initializes the new field.The constructor properly sets the new field from the builder parameter, maintaining consistency with the existing code pattern.
657-659: Well-named getter for the new field.The getter method follows Java conventions with the 'is' prefix for boolean properties and maintains consistency with the rest of the class.
967-967: Builder pattern implementation: Added field to Builder class.The field addition to the Builder class is consistent with the design pattern used throughout this class.
1051-1054: Complete Builder pattern implementation with fluent method.The addition of the
withPresentationConversionCacheEnabledmethod properly follows the builder pattern and fluent interface style used in the rest of the class.bbb-common-web/src/main/java/org/bigbluebutton/presentation/imp/S3FileManager.java (1)
30-30: Improved S3 client initialization condition.The condition for initializing the S3 client has been changed to check if the endpoint URL is not empty, rather than relying on a separate cache enablement flag. This properly decouples the S3 client initialization from the presentation conversion cache setting (which has been moved to the Meeting class), making the code more focused and maintainable.
| msg: SetPresentationFitToWidthCmdMsg, state: MeetingState2x, | ||
| liveMeeting: LiveMeeting, bus: MessageBus | ||
| ): MeetingState2x = { | ||
| if (liveMeeting.props.meetingProp.disabledFeatures.contains("infiniteWhiteboard")) { |
There was a problem hiding this comment.
Why check infiniteWhiteboard?
| export const GET_CURR_PRESS_PAGE_INFO = gql` | ||
| subscription MySubscription { | ||
| pres_page_curr { | ||
| fitToWidth | ||
| pageId | ||
| } | ||
| } | ||
| `; |
There was a problem hiding this comment.
Is it really necessary a new subscription dedicated for this prop?
Try to use the existing subscription CurrentPresentationPagesSubscription {.
There was a problem hiding this comment.
Reference
I sent a fix for it
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page.yaml (1)
27-27: Reorganized Column Permission:infiniteWhiteboard
The reordering ofinfiniteWhiteboardin the columns list reflects a shift in its placement relative to the newfitToWidthfield. While YAML lists typically do not enforce order on permission checks, please ensure that this change is consistent with any documentation and does not affect dependent queries or mappings.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala(1 hunks)bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page.yaml(1 hunks)bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page_curr.yaml(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/SetPresentationFitToWidthCmdMsgHdlr.scala
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build-package (bbb-graphql-server)
- GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (2)
bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page_curr.yaml (1)
17-17: Added Column Permission:fitToWidth
The addition of thefitToWidthcolumn for thebbb_clientrole is aligned with the new functionality for persisting the "Fit to Width" state. Please verify that the underlying view and database schema include this column to ensure full consistency across the system.bbb-graphql-server/metadata/databases/BigBlueButton/tables/public_v_pres_page.yaml (1)
24-24: New Column Permission:fitToWidth
Including thefitToWidthcolumn in the permission list ensures that clients can retrieve the persisted fit-to-width state. Confirm that the view returns this column and that it is correctly mapped in the data model.
…t to width information
|
Looks like the viewer zoom is not following the presenter zoom properly when I open the chat panel, in the video I show the problem with your PR and then I try in other server without your PR (from 0:37): Screencast.from.2025-03-12.11-04-36.mp4 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
bigbluebutton-html5/imports/ui/components/app/container.jsx (1)
50-52: Simplify conditional expressionThe ternary operator here can be simplified for better readability and to address the linting warning.
- // eslint-disable-next-line no-unneeded-ternary - skip: currentUser?.presenter ? false : true, + skip: !currentUser?.presenter,🧰 Tools
🪛 Biome (1.9.4)
[error] 52-52: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with(lint/complexity/noUselessTernary)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
bigbluebutton-html5/imports/ui/components/app/container.jsx(6 hunks)bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx(0 hunks)
💤 Files with no reviewable changes (1)
- bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/component.jsx
🧰 Additional context used
🪛 Biome (1.9.4)
bigbluebutton-html5/imports/ui/components/app/container.jsx
[error] 52-52: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: build-package (others)
- GitHub Check: build-package (bbb-html5)
- GitHub Check: build-package (bbb-fsesl-akka)
- GitHub Check: build-package (bbb-web)
- GitHub Check: build-package (bbb-graphql-server)
- GitHub Check: build-package (bbb-playback-record)
- GitHub Check: build-package (bbb-apps-akka)
🔇 Additional comments (3)
bigbluebutton-html5/imports/ui/components/app/container.jsx (3)
106-108: LGTM! Good defensive programmingNice use of nullish coalescing operators to provide default values, which helps prevent potential runtime errors when dealing with optional data from the subscription.
110-117: LGTM! Appropriate mutation handler implementationThe
handlePresentationFitToWidthfunction is well-implemented, correctly passing the page ID and fitToWidth value to the mutation.
133-134: LGTM! Successfully implementing "Fit to Width" persistenceThese prop additions successfully implement the PR objective of persisting the "Fit to Width" setting between presenter changes, by passing both the current state and the handler function to the App component.
|
|
Sometimes I come back to the previous page (page 1, that has fit-to-width applied) and the zoom of the viewer is wrong: Screencast.from.2025-03-12.16-36-03.mp4 |
Automated tests Summary🚨 Test workflow has failedClick here to check the action test reports (to view the report locally, see the docs) |
I think this bug isn't related with this PR, I was able to reproduce it switching between slides with different orientations on a bit busy setup (running a lot of proccess on parallel), looks like some race condition on zoom calculation. |
Alright, thanks for checking this out! |





What does this PR do?
This PR is a follow-up to #22490, addressing the issue with the 'Fit to Width' functionality. The bug causing 'Fit to Width' to reset occurred because the server did not store this state—it was a client-side only setting. When the client applied zoom with 'Fit to Width' enabled, switching the presenter caused the new presenter's client to be unaware of this setting, resulting in the values being reset to zero.
Closes Issue(s)
Closes #21873
How to test
More
Screencast.from.10-03-2025.13.47.45.webm