regression: Adjust close connection condition#39470
regression: Adjust close connection condition#39470juliajforesti wants to merge 1 commit intodevelopfrom
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughThe Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #39470 +/- ##
===========================================
- Coverage 70.94% 70.89% -0.06%
===========================================
Files 3196 3196
Lines 113288 113288
Branches 20542 20509 -33
===========================================
- Hits 80376 80319 -57
- Misses 30865 30918 +53
- Partials 2047 2051 +4
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
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ee/apps/ddp-streamer/src/DDPStreamer.ts`:
- Around line 53-60: Add regression tests for the new (uid, sessionId) behavior
in DDPStreamer: create two websocket clients registered in clientMap with the
same uid but different connection.id values, then trigger the 'user.forceLogout'
event on the streamer with both uid+matching sessionId and uid+non-matching
sessionId cases; assert that the client whose client.connection.id equals the
sessionId is closed and the other remains open. Target the logic paths around
onEvent('user.forceLogout'), clientMap, wss?.clients, client?.connection.id and
client?.userId to ensure sessionId is authoritative when present and that
uid-only behavior remains unchanged. Ensure tests cover both matching and
non-matching sessionId while uid is provided so future changes cannot regress
this contract.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9bc4e234-10a6-4309-88eb-fd12549e4fb5
📒 Files selected for processing (1)
ee/apps/ddp-streamer/src/DDPStreamer.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). (1)
- GitHub Check: cubic · AI code reviewer
🧰 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:
ee/apps/ddp-streamer/src/DDPStreamer.ts
🧠 Learnings (2)
📚 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:
ee/apps/ddp-streamer/src/DDPStreamer.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:
ee/apps/ddp-streamer/src/DDPStreamer.ts
|
@juliajforesti, shouldn’t it be something like this #39116? |
|
/jira CORE-1847 |
@ricardogarim The logic is slightly different, although I believe the result is the same... |
Proposed changes (including videos or screenshots)
adjust
user.forceLogoutevent condition for closing the connection when passing thesessionIdIssue(s)
Steps to test or reproduce
Further comments
root cause: #39383
CORE-1847
Summary by CodeRabbit
Release Notes