Skip to content

feat(video-conf): add new streamer with discussionUpdated event#40967

Draft
d-gubert wants to merge 2 commits into
developfrom
feat/video-conf-streamer
Draft

feat(video-conf): add new streamer with discussionUpdated event#40967
d-gubert wants to merge 2 commits into
developfrom
feat/video-conf-streamer

Conversation

@d-gubert

@d-gubert d-gubert commented Jun 16, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Issue(s)

DMV-52

Steps to test or reproduce

Further comments

Review in cubic

Summary by CodeRabbit

  • New Features
    • Introduced real-time notification system for video conference discussion updates. Conference participants are now automatically notified in real-time when discussions are assigned to or modified within their video conference sessions. The notification stream is securely delivered with member-based access controls, ensuring only authorized conference participants can receive and view discussion updates.

@dionisio-bot

dionisio-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fac92e1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the type: feature Pull requests that introduces new feature label Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.44444% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.08%. Comparing base (f57901d) to head (b48fa4f).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 59.24% <ø> (-0.03%) ⬇️
e2e-api 46.21% <44.44%> (-0.02%) ⬇️
unit 70.04% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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

🧹 Nitpick comments (1)
apps/meteor/server/modules/notifications/notifications.module.ts (1)

543-550: ⚡ Quick win

Remove the implementation comment directive in notifyVideoConference

Line 548 adds an implementation comment (@ts-expect-error), which conflicts with the repository guideline. Prefer a typed local eventName value 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

📥 Commits

Reviewing files that changed from the base of the PR and between f57901d and fac92e1.

📒 Files selected for processing (5)
  • apps/meteor/server/modules/listeners/listeners.module.ts
  • apps/meteor/server/modules/notifications/notifications.module.ts
  • apps/meteor/server/services/video-conference/service.ts
  • packages/core-services/src/events/Events.ts
  • packages/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.ts
  • apps/meteor/server/services/video-conference/service.ts
  • apps/meteor/server/modules/listeners/listeners.module.ts
  • packages/ddp-client/src/types/streams.ts
  • apps/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.ts
  • apps/meteor/server/services/video-conference/service.ts
  • apps/meteor/server/modules/listeners/listeners.module.ts
  • packages/ddp-client/src/types/streams.ts
  • apps/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.ts
  • apps/meteor/server/services/video-conference/service.ts
  • apps/meteor/server/modules/listeners/listeners.module.ts
  • packages/ddp-client/src/types/streams.ts
  • apps/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.ts
  • apps/meteor/server/services/video-conference/service.ts
  • apps/meteor/server/modules/listeners/listeners.module.ts
  • packages/ddp-client/src/types/streams.ts
  • apps/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!

Comment thread apps/meteor/server/services/video-conference/service.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Pull requests that introduces new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant