feat(video-conf): add new streamer with discussionUpdated event#40967
feat(video-conf): add new streamer with discussionUpdated event#40967d-gubert wants to merge 2 commits into
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Caution Review failedAn error occurred during the review process. Please try again later. 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 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #40967 +/- ##
===========================================
- Coverage 70.14% 70.08% -0.07%
===========================================
Files 3355 3357 +2
Lines 129261 129559 +298
Branches 22340 22428 +88
===========================================
+ Hits 90673 90804 +131
- Misses 35293 35453 +160
- Partials 3295 3302 +7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/meteor/server/modules/notifications/notifications.module.ts (1)
543-550: ⚡ Quick winRemove the implementation comment directive in
notifyVideoConferenceLine 548 adds an implementation comment (
@ts-expect-error), which conflicts with the repository guideline. Prefer a typed localeventNamevalue and emit that directly.Suggested change
notifyVideoConference<P extends string, E extends string>( callId: P, event: E extends ExtractNotifyUserEventName<'video-conference', P> ? E : never, ...args: `${P}/${E}` extends StreamKeys<'video-conference'> ? StreamerCallbackArgs<'video-conference', `${P}/${E}`> : never ): void { - // `@ts-expect-error` - as we currently only have one event for the 'video-conference' stream, typescript doesn't like the destructuring - return this.streamVideoConference.emit(`${callId}/${event}`, ...args); + const eventName = `${callId}/${event}` as `${string}/discussionUpdated`; + return this.streamVideoConference.emit(eventName, ...args); }As per coding guidelines,
**/*.{ts,tsx,js}should “Avoid code comments in the implementation”.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/meteor/server/modules/notifications/notifications.module.ts` around lines 543 - 550, The `notifyVideoConference` method currently uses a `@ts-expect-error` comment to suppress a TypeScript error on the emit call, which violates the coding guideline to avoid code comments in implementations. Instead of the inline template literal `${callId}/${event}` in the emit call, create a typed local constant variable `eventName` that holds this concatenated value, then pass that variable to the `this.streamVideoConference.emit()` call. This allows TypeScript to properly infer the type without requiring the error suppression directive.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/meteor/server/services/video-conference/service.ts`:
- Around line 1232-1236: The api.broadcast call for
'video-conference.discussionUpdated' is being sent before the users are added to
the discussion via the Promise.all with this.addUserToDiscussion calls. Move the
api.broadcast statement to execute after the Promise.all completes (after the
closing brace of the if block) so that users are synchronized to the discussion
before clients receive the discussionUpdated event with the new discussionRid.
This ensures clients have the necessary permissions to access the discussion
when they receive the broadcast.
---
Nitpick comments:
In `@apps/meteor/server/modules/notifications/notifications.module.ts`:
- Around line 543-550: The `notifyVideoConference` method currently uses a
`@ts-expect-error` comment to suppress a TypeScript error on the emit call,
which violates the coding guideline to avoid code comments in implementations.
Instead of the inline template literal `${callId}/${event}` in the emit call,
create a typed local constant variable `eventName` that holds this concatenated
value, then pass that variable to the `this.streamVideoConference.emit()` call.
This allows TypeScript to properly infer the type without requiring the error
suppression directive.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0fb99acb-b23f-468d-9c6c-955f5b46df37
📒 Files selected for processing (5)
apps/meteor/server/modules/listeners/listeners.module.tsapps/meteor/server/modules/notifications/notifications.module.tsapps/meteor/server/services/video-conference/service.tspackages/core-services/src/events/Events.tspackages/ddp-client/src/types/streams.ts
📜 Review details
⏰ 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: 🔨 Test Storybook / Test Storybook
- GitHub Check: 🔎 Code Check / Code Lint
- GitHub Check: 🔎 Code Check / TypeScript
- GitHub Check: 🔨 Test Unit / Unit Tests
- GitHub Check: 📦 Meteor Build (coverage)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
packages/core-services/src/events/Events.tsapps/meteor/server/services/video-conference/service.tsapps/meteor/server/modules/listeners/listeners.module.tspackages/ddp-client/src/types/streams.tsapps/meteor/server/modules/notifications/notifications.module.ts
🧠 Learnings (3)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
packages/core-services/src/events/Events.tsapps/meteor/server/services/video-conference/service.tsapps/meteor/server/modules/listeners/listeners.module.tspackages/ddp-client/src/types/streams.tsapps/meteor/server/modules/notifications/notifications.module.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
packages/core-services/src/events/Events.tsapps/meteor/server/services/video-conference/service.tsapps/meteor/server/modules/listeners/listeners.module.tspackages/ddp-client/src/types/streams.tsapps/meteor/server/modules/notifications/notifications.module.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.
Applied to files:
packages/core-services/src/events/Events.tsapps/meteor/server/services/video-conference/service.tsapps/meteor/server/modules/listeners/listeners.module.tspackages/ddp-client/src/types/streams.tsapps/meteor/server/modules/notifications/notifications.module.ts
🔇 Additional comments (4)
packages/core-services/src/events/Events.ts (1)
164-164: LGTM!packages/ddp-client/src/types/streams.ts (1)
462-462: LGTM!apps/meteor/server/modules/notifications/notifications.module.ts (1)
4-4: LGTM!Also applies to: 50-50, 96-97, 461-475
apps/meteor/server/modules/listeners/listeners.module.ts (1)
159-161: LGTM!
Proposed changes (including videos or screenshots)
Issue(s)
DMV-52
Steps to test or reproduce
Further comments
Summary by CodeRabbit