Repository navigation
[4.0 port] fix(akka-apps): Allow Locked Users to See Moderator Voice State #25921 - #25938
Conversation
A voice session can be established before the user's meeting record exists, as happens when media reconnects ahead of the client. Its voice record then takes the default role and keeps it. When the user record is created, bring the voice record's role in line with it. (cherry picked from commit 73f2b63)
…e state The row akka-apps sends when it no longer holds a user's voice record reports VIEWER, so a moderator's role is taken from their cached row for that event, as on 4.0. Adds unit tests for the voice-state gate. (cherry picked from commit d440b58) [antobinary: 4.0 already takes a moderator's role from the cached row, so of the middleware change only the optional read of userRole is new here. voiceActivity.ts keeps its 4.0 version, whose query does select the role.]
A voice state event that clears a user's state (leftVoiceConf) can report VIEWER for a moderator, so the cached role decides for those. Any other event carries the user's current role, which now stands: after a demotion, the user's voice state follows the lock like any viewer's. Recipients that were shown the user as a moderator and may no longer see them get a row that ends the user's talking and unmuted state and carries no name, so the indicator does not stay on screen at its last state. (cherry picked from commit 1c1a034)
…ser list With "see other viewers in the user list" locked, a locked viewer still has the moderators on its user list and must keep receiving their voice state. 3.0.38 withheld it: the voice state event carried no role, so the middleware could not tell a moderator from a viewer, and the locked viewer saw no talking indicator and a moderator muted while speaking. Two tests in the "Lock viewers" group: - a locked viewer sees a moderator's talking indicator and mute state, including a viewer who joins once the moderator is already unmuted; - the exemption follows the speaker's role: another viewer's voice state stays hidden, shows once that viewer is promoted, and is taken off the screen again on demotion. Both fail on 3.0.38 and pass with the preceding commits of this branch. With only the akka-apps change deployed the first passes and the second fails at the demotion step, which is the part the middleware handles. The user list draws another user's mute state only as the glyph of the avatar's ::after badge, with no attribute or text to select on, so hasUserListMicState compares the computed style. (cherry picked from commit 7de9dda)
The two tests picked from 3.0 in the previous commit assume the 3.0 user list. On 4.0: - the user list sits behind the sidebar button, so the viewers' pages open it before the list is counted or read; - a row's actions open from its "more options" button, and menus closed earlier leave hidden items in the DOM, so promote and demote act on the visible item of the speaker's row; - a row shows another user's microphone state as a toolbar entry with its own data-test (audioStateUnmuted, audioStateMuted), so hasUserListMicState selects on that instead of the computed style of the avatar badge. The client writes the muted one with a trailing space, hence the prefix match. On v4.0.x-develop before this branch the first test already passes, as 4.0 has carried the speaker's role since c85d703. The second fails at the demotion step: the locked viewer keeps the demoted user's talking indicator. With the middleware change of this branch both pass.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. WalkthroughWhen a user joins with an existing voice session, the application updates the session role if it differs from the user's role. The streaming middleware now handles missing roles and sends cleared voice-state rows to recipients who lose access after a role change. New backend and Playwright tests cover voice-state visibility for locked and unlocked viewers, including moderator demotion and departure. Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Redis
participant Middleware as HandleUserVoiceStateEvtMsg
participant LockedViewer
participant UnlockedViewer
Redis->>Middleware: Voice-state event after role change
Middleware->>LockedViewer: Cleared voice-state row
Middleware->>UnlockedViewer: Current voice-state row
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue remains before merge. Browser behavior has not been verified at runtime. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The reviewed controls tie voice-state visibility to meeting membership and trusted roles. No introduced security weakness is established, but delivery failure and recovery behavior for visibility revocation remain incompletely verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 6 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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. Comment |
🚨 Automated tests failed |
420e8ca
into
bigbluebutton:v4.0.x-develop
porting forward #25921 to BBB 4.0