Skip to content

Conversation

@cardoso
Copy link
Member

@cardoso cardoso commented Nov 18, 2025

Proposed changes (including videos or screenshots)

The Presence.updateConnection function is called when a heartbeat is received from a connection.

Connections with an _updatedAt field older than 5 minutes are considered stale and removed periodically.

Issue(s)

https://rocketchat.atlassian.net/browse/SUP-846

Steps to test or reproduce

Further comments

I wrote e2e tests to verify reactivity in a separate PR since it's a bit complicated: #37710

Summary by CodeRabbit

  • New Features

    • Presence status now refreshes automatically on user heartbeats for improved accuracy.
    • Stale sessions are now automatically removed in batches to keep presence data clean.
  • Tests

    • Added comprehensive unit tests for session cleanup and presence reaping logic.

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 18, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2025

🦋 Changeset detected

Latest commit: c230094

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-services Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/presence Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/omnichannel-services Patch
rocketchat-services Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/models Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 18, 2025

Walkthrough

A new PresenceReaper system is introduced to periodically identify and remove stale user connections from the database. Heartbeat messages are intercepted to trigger presence updates, preventing offline sessions from keeping users marked as online.

Changes

Cohort / File(s) Change Summary
Type System Updates
apps/meteor/definition/externals/meteor/meteor.d.ts, apps/meteor/definition/externals/meteor/ddp-common.d.ts
Added structured typing for server object with session tracking; introduced new Heartbeat class and HeartbeatOptions type to the DDPCommon namespace for managing heartbeat lifecycle and state.
Presence Interface & Implementation
packages/core-services/src/types/IPresence.ts, ee/packages/presence/src/Presence.ts
Added updateConnection() method to IPresence interface; integrated PresenceReaper into Presence class with lifecycle management (start/stop) and reaper update handling.
Presence Reaper Core
ee/packages/presence/src/lib/PresenceReaper.ts, ee/packages/presence/src/lib/PresenceReaper.spec.ts
Implemented new PresenceReaper class with periodic batch processing to identify stale connections, remove them, and mark users offline; added comprehensive unit test coverage for document processing, batch flushing, and integration flows.
Heartbeat & Message Interception
apps/meteor/ee/server/startup/presence.ts, ee/apps/ddp-streamer/src/Client.ts
Added heartbeat message interception to trigger presence updates on login; integrated presence tracking in DDP client message handling to refresh connection status on non-heartbeat packets.
Release Metadata
.changeset/spicy-nails-design.md
Added changeset documenting patch updates for presence and related packages with behavior summary.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Client as DDP Client
    participant HB as Heartbeat
    participant Presence as Presence Service
    participant Reaper as PresenceReaper
    participant DB as UsersSessions Collection

    User->>Client: Heartbeat messageReceived
    Client->>Client: messageReceived()
    Client->>Presence: updateConnection(uid, connectionId)
    Presence->>DB: Update session timestamp
    DB-->>Presence: Success

    rect rgb(220, 240, 220)
      Note over Reaper,DB: Periodic Reaper Run (60s interval)
      Reaper->>DB: Query stale connections<br/>(updated before cutoffDate)
      DB-->>Reaper: Cursor with user sessions
      Reaper->>Reaper: processDocument()<br/>Filter stale vs. valid
      Reaper->>Reaper: buildReaperPlan<br/>Mark for removal/offline
      Reaper->>DB: bulkWrite()<br/>Remove stale connections
      DB-->>Reaper: Batch update complete
      Reaper->>Presence: onUpdate(userIds[])
      Presence->>Presence: handleReaperUpdates()
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Areas requiring extra attention:

  • ee/packages/presence/src/lib/PresenceReaper.ts — Core batch processing logic, cutoff date calculations, and bulkWrite operation structure should be verified for correctness
  • apps/meteor/ee/server/startup/presence.ts — Heartbeat interception hook placement and the _seenPacket flag logic to ensure it captures presence updates at the correct point in the message lifecycle
  • ee/apps/ddp-streamer/src/Client.ts — Verify that messageReceived() is called in the correct sequence relative to other packet handling and that it doesn't introduce side effects that could affect message routing
  • ee/packages/presence/src/lib/PresenceReaper.spec.ts — Test assertions should be reviewed to ensure they cover edge cases (empty collections, partial batches, concurrent updates)

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • gabriellsh
  • aleksandernsilva
  • ggazzo

Poem

🐰 Hopping through the sessions with care,
Stale connections disappearing in the air,
Heartbeat by heartbeat, presence stays true,
No phantom ghosts online for me or you!

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: updating connections on heartbeat and removing stale ones.
Linked Issues check ✅ Passed The PR addresses SUP-846 by implementing stale session removal (5-minute threshold) and connection updates on heartbeats, directly mitigating dangling sessions.
Out of Scope Changes check ✅ Passed All changes are directly related to the issue scope: Presence API extensions, PresenceReaper for stale removal, DDP Heartbeat type definitions, and integration in presence startup.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/presence-dangling

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.

@cardoso cardoso force-pushed the fix/presence-dangling branch from 8c8ebb6 to 3c26ca0 Compare November 18, 2025 18:01
@cardoso cardoso added this to the 7.14.0 milestone Nov 19, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +12MiB
rocketchat 358MiB 347MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB +103B
queue-worker-service 132MiB 132MiB -999B
ddp-streamer-service 126MiB 126MiB +168B
account-service 113MiB 113MiB -424B
stream-hub-service 110MiB 110MiB -443B
presence-service 110MiB 110MiB -333B
authorization-service 110MiB 110MiB +297B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 16:51", "12/15 18:59 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 21 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.2GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37551
  • Baseline: develop
  • Timestamp: 2025-12-15 18:59:03 UTC
  • Historical data points: 21

Updated: Mon, 15 Dec 2025 18:59:04 GMT

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.70%. Comparing base (cea565b) to head (c230094).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #37551   +/-   ##
========================================
  Coverage    67.69%   67.70%           
========================================
  Files         3457     3457           
  Lines       113831   113831           
  Branches     20908    20908           
========================================
+ Hits         77061    77069    +8     
+ Misses       34639    34633    -6     
+ Partials      2131     2129    -2     
Flag Coverage Δ
e2e 57.39% <ø> (+0.03%) ⬆️
e2e-api 42.28% <ø> (-0.04%) ⬇️

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.

@cardoso cardoso force-pushed the fix/presence-dangling branch from c180d53 to d90e850 Compare November 21, 2025 22:06
@cardoso cardoso marked this pull request as ready for review November 22, 2025 00:28
@cardoso cardoso requested review from a team as code owners November 22, 2025 00:28
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/models/src/models/UsersSessions.ts (1)

32-41: Optional status handling is good; consider a more explicit check

Making status optional and guarding the $set keeps pings from overwriting the stored status while still refreshing _updatedAt, which matches the intended behavior.

To make this future‑proof against any falsy-but-valid status values, you could prefer an explicit undefined check instead of a truthiness check:

-			$set: {
-				...(status && { 'connections.$.status': status }),
-				'connections.$._updatedAt': new Date(),
-			},
+			$set: {
+				...(status !== undefined && { 'connections.$.status': status }),
+				'connections.$._updatedAt': new Date(),
+			},
apps/meteor/client/meteor/overrides/ddpOverREST.ts (1)

9-29: Fix unsound type predicate and make ping call explicitly fire-and-forget

The shouldBypass type guard (line 9) claims to narrow to non-method messages when it returns true, but it also returns true for several method messages (login/resume, UserPresence:, stream-, and bypassMethods). This violates the type predicate's promise and is unsound.

Additionally, the type narrowing isn't actually being used—the code immediately checks if (message.msg === 'ping') after the predicate succeeds (line 34), indicating the type isn't relied upon.

Change shouldBypass to return a plain boolean:

-const shouldBypass = (message: Meteor.IDDPMessage): message is Exclude<Meteor.IDDPMessage, Meteor.IDDPMethodMessage> => {
+const shouldBypass = (message: Meteor.IDDPMessage): boolean => {
 	if (message.msg !== 'method') {
 		return true;
 	}
 	const { method, params } = message;
 	// ... rest unchanged
}

For the ping side effect (lines 34–36), make the fire-and-forget intent explicit and avoid unhandled rejections:

 if (message.msg === 'ping') {
-	sdk.call('UserPresence:ping');
+	void sdk.call('UserPresence:ping').catch(() => {});
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5ef03e2 and d90e850.

📒 Files selected for processing (15)
  • apps/meteor/client/meteor/overrides/ddpOverREST.ts (2 hunks)
  • apps/meteor/definition/externals/meteor/meteor.d.ts (1 hunks)
  • apps/meteor/server/methods/userPresence.ts (2 hunks)
  • ee/apps/ddp-streamer/src/DDPStreamer.ts (1 hunks)
  • ee/apps/ddp-streamer/src/configureServer.ts (1 hunks)
  • ee/packages/presence/src/Presence.ts (2 hunks)
  • ee/packages/presence/src/lib/processConnectionStatus.ts (0 hunks)
  • ee/packages/presence/src/lib/processStatus.ts (1 hunks)
  • ee/packages/presence/src/processPresenceAndStatus.ts (1 hunks)
  • ee/packages/presence/tests/lib/processConnectionStatus.test.ts (1 hunks)
  • ee/packages/presence/tests/lib/processPresenceAndStatus.test.ts (1 hunks)
  • ee/packages/presence/tests/lib/processStatus.test.ts (1 hunks)
  • packages/core-services/src/types/IPresence.ts (1 hunks)
  • packages/model-typings/src/models/IUsersSessionsModel.ts (1 hunks)
  • packages/models/src/models/UsersSessions.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • ee/packages/presence/src/lib/processConnectionStatus.ts
🧰 Additional context used
🧬 Code graph analysis (8)
ee/packages/presence/tests/lib/processStatus.test.ts (1)
ee/packages/presence/src/lib/processStatus.ts (1)
  • processStatus (6-16)
ee/packages/presence/src/processPresenceAndStatus.ts (3)
packages/core-typings/src/IUserSession.ts (1)
  • IUserSessionConnection (3-9)
ee/packages/presence/src/lib/processConnectionStatus.ts (1)
  • processConnectionStatus (6-14)
ee/packages/presence/src/lib/processStatus.ts (1)
  • processStatus (6-16)
packages/model-typings/src/models/IUsersSessionsModel.ts (1)
packages/core-typings/src/IUserSession.ts (1)
  • IUserSession (11-14)
ee/apps/ddp-streamer/src/configureServer.ts (2)
ee/packages/presence/src/Presence.ts (1)
  • Presence (11-284)
apps/meteor/server/methods/userPresence.ts (3)
  • userId (24-30)
  • userId (31-37)
  • userId (38-44)
ee/packages/presence/tests/lib/processPresenceAndStatus.test.ts (1)
ee/packages/presence/src/processPresenceAndStatus.ts (1)
  • processPresenceAndStatus (16-31)
packages/models/src/models/UsersSessions.ts (1)
packages/core-typings/src/IUserSession.ts (1)
  • IUserSession (11-14)
ee/apps/ddp-streamer/src/DDPStreamer.ts (3)
ee/apps/ddp-streamer/src/configureServer.ts (4)
  • server (10-10)
  • userId (119-125)
  • userId (126-132)
  • userId (133-139)
apps/meteor/server/methods/userPresence.ts (3)
  • userId (24-30)
  • userId (31-37)
  • userId (38-44)
ee/packages/presence/src/Presence.ts (1)
  • Presence (11-284)
apps/meteor/server/methods/userPresence.ts (2)
ee/packages/presence/src/Presence.ts (1)
  • Presence (11-284)
ee/apps/ddp-streamer/src/configureServer.ts (3)
  • userId (119-125)
  • userId (126-132)
  • userId (133-139)
🔇 Additional comments (13)
packages/model-typings/src/models/IUsersSessionsModel.ts (1)

8-8: LGTM! Optional status enables ping-based connection tracking.

Making the status parameter optional allows the system to update connection timestamps (via ping handlers) without forcing a status change. This helps maintain accurate connection state for presence tracking and addresses the dangling session issue.

apps/meteor/definition/externals/meteor/meteor.d.ts (1)

50-61: LGTM! Improved type safety for DDP messages.

The refactoring separates ping and method messages into distinct interfaces (IDDPPingMessage and IDDPMethodMessage), then creates a union type. This enables type guards and better type narrowing at call sites, improving type safety for DDP message handling.

ee/packages/presence/tests/lib/processStatus.test.ts (1)

1-30: LGTM! Comprehensive test coverage for processStatus.

The test suite thoroughly validates all combinations of connection status and default status across the four UserStatus values (ONLINE, BUSY, AWAY, OFFLINE). The tests confirm the expected precedence logic:

  • OFFLINE connection status always takes precedence
  • ONLINE default allows connection status to pass through
  • Non-ONLINE defaults override the connection status
packages/core-services/src/types/IPresence.ts (1)

18-18: LGTM! Parameter reordering improves API consistency.

The signature change reorders parameters to (uid, session, status?) which is more logical (identifying the connection before specifying its status) and makes status optional. This enables ping handlers to update connection tracking without forcing a status change, which is key to fixing dangling sessions.

Note: This is a breaking change, but the PR appears to update all call sites consistently.

ee/apps/ddp-streamer/src/configureServer.ts (1)

119-139: LGTM! Presence methods updated consistently.

All three presence methods (UserPresence:online, UserPresence:away, and the new UserPresence:ping) have been updated to use the new signature with parameters in the order (userId, session, status?). The new ping method omits the status parameter, allowing it to update connection tracking without changing the user's status, which is crucial for fixing dangling sessions.

ee/packages/presence/src/Presence.ts (2)

7-7: LGTM! Import path updated for refactored module.

The import has been updated to reflect the reorganization of presence utilities, with processPresenceAndStatus now in a dedicated module at the root of the presence package.


206-212: LGTM! Implementation correctly handles optional status.

The setConnectionStatus method now accepts an optional status parameter and passes it through to UsersSessions.updateConnectionStatusById. When status is undefined (as in ping handlers), the connection timestamp is updated without changing the status, which helps maintain accurate connection state while preventing unwanted status changes.

ee/packages/presence/src/lib/processStatus.ts (1)

1-16: LGTM! Status precedence logic is well-designed.

The processStatus function implements a clear precedence hierarchy for determining user status:

  1. OFFLINE connection status always takes precedence - respects actual disconnection
  2. ONLINE default allows connection status to pass through - shows real-time presence
  3. Non-ONLINE defaults override connection status - respects explicit user status settings (BUSY, AWAY)

This logic is intuitive and well-tested in the corresponding test file.

ee/apps/ddp-streamer/src/DDPStreamer.ts (1)

219-225: LGTM, but note the unawaited promise for error handling purposes.

The new PING event handler correctly guards against missing userId and successfully maintains connection state. The concern about concurrent ping events is partially mitigated:

Safe: MongoDB's atomic updateOne with the $ positional operator in updateConnectionStatusById prevents data corruption from concurrent updates to the same user's session document.

⚠️ Consideration: Presence.setConnectionStatus() is not awaited in the PING handler, which means errors in either updateConnectionStatusById or the subsequent updateUserPresence call will be silently swallowed. While updateUserPresence performs a read-compute-write sequence that could theoretically result in stale status being written if multiple calls interleave for the same user, this is acceptable for presence tracking since the system is eventually consistent by design. However, for proper error handling and observability, consider awaiting the call or attaching a .catch() handler to log unexpected failures.

ee/packages/presence/tests/lib/processConnectionStatus.test.ts (1)

4-4: Import path update looks correct

The new relative path to processConnectionStatus matches the tests/libsrc/lib layout and keeps the existing test behavior intact.

ee/packages/presence/src/processPresenceAndStatus.ts (1)

7-31: Presence derivation from fresh sessions looks sound

Filtering by _updatedAt <= 5 minutes, reducing with processConnectionStatus from OFFLINE, and then deriving the final status via processStatus gives the expected behavior for empty, stale-only, and mixed-session inputs and cleanly separates statusConnection from status.

ee/packages/presence/tests/lib/processPresenceAndStatus.test.ts (1)

6-286: Test suite gives comprehensive coverage of the new presence logic

The scenarios here (single vs multiple connections, no connections, stale vs recent updates, and different default statuses) exercise all key branches of processPresenceAndStatus, including the 5‑minute freshness window and the precedence rules between statusConnection and status.

apps/meteor/server/methods/userPresence.ts (1)

12-44: Server-side ping wiring and parameter reordering look consistent

The new 'UserPresence:ping' method and the reordered arguments for Presence.setConnectionStatus(userId, connection.id, status) align with the updated setConnectionStatus(uid, session, status?) signature and allow pings to refresh _updatedAt without mutating status, while still guarding for missing userId/connection.

@cardoso cardoso changed the title fix: dangling usersSessions fix(presence): handle dangling sessions by updating status on ping Nov 22, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.changeset/spicy-nails-design.md (1)

1-10: Changeset metadata looks good; consider clarifying the summary.

The affected packages and patch version bump are appropriate for this fix. However, the summary could be more specific to help users understand the mechanism. Currently it reads generically; consider mentioning that the fix refreshes connection activity via ping messages and excludes idle sessions.

Example revision:

-Fixes user status inaccuracy by refreshing active connections and filtering out the stale ones.
+Fixes user status inaccuracy by refreshing connection activity on ping and filtering out idle sessions (no activity for 5+ minutes).

This gives future readers clearer context about the fix's scope and timing strategy.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d90e850 and 5f0b3a4.

📒 Files selected for processing (1)
  • .changeset/spicy-nails-design.md (1 hunks)
⏰ 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

Copy link
Member

@KevLehman KevLehman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think diego has more context on how this should behave, so my comments are on code-side.

I don't see anything spooky on the implementation rather than the fact the connections would be always updated (since we're gonna update the updatedAt on every ping)

@RocketChat RocketChat deleted a comment from coderabbitai bot Nov 27, 2025
@RocketChat RocketChat deleted a comment from coderabbitai bot Nov 27, 2025
@RocketChat RocketChat deleted a comment from coderabbitai bot Nov 27, 2025
@RocketChat RocketChat deleted a comment from coderabbitai bot Nov 27, 2025
@RocketChat RocketChat deleted a comment from coderabbitai bot Nov 27, 2025
@RocketChat RocketChat deleted a comment from coderabbitai bot Nov 27, 2025
@RocketChat RocketChat deleted a comment from coderabbitai bot Nov 27, 2025
@RocketChat RocketChat deleted a comment from coderabbitai bot Nov 27, 2025
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

    Sorry, I couldn't do that backport because of conflicts. Could you please solve them?
    
    you can do so by running the following commands:
git fetch
git checkout backport-7.13.2-37551
git cherry-pick 4aa3634186d97f4144c39f6b42a65107d3d30df0
// solve the conflict
git push

after that just run /patch again

@scuciatto
Copy link
Member

/backport 7.12.3

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

Sorry, I couldn't do that backport because of conflicts. Could you please solve them?

you can do so by running the following commands:

git fetch
git checkout backport-7.12.3-37551
git cherry-pick 4aa3634186d97f4144c39f6b42a65107d3d30df0
// solve the conflict
git push

after that just run /backport 7.12.3 again

@scuciatto
Copy link
Member

/backport 7.11.3

@scuciatto
Copy link
Member

/backport 7.10.6

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

Sorry, I couldn't do that backport because of conflicts. Could you please solve them?

you can do so by running the following commands:

git fetch
git checkout backport-7.11.3-37551
git cherry-pick 4aa3634186d97f4144c39f6b42a65107d3d30df0
// solve the conflict
git push

after that just run /backport 7.11.3 again

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

Sorry, I couldn't do that backport because of conflicts. Could you please solve them?

you can do so by running the following commands:

git fetch
git checkout backport-7.10.6-37551
git cherry-pick 4aa3634186d97f4144c39f6b42a65107d3d30df0
// solve the conflict
git push

after that just run /backport 7.10.6 again

@scuciatto
Copy link
Member

/patch

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

Pull request #37883 added to Project: "Patch 7.13.2"

@scuciatto
Copy link
Member

/backport 7.12.3

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

Pull request #37884 added to Project: "Patch 7.12.3"

@scuciatto
Copy link
Member

/backport 7.11.3

@scuciatto
Copy link
Member

/backport 7.10.6

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

Pull request #37885 added to Project: "Patch 7.11.3"

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Dec 19, 2025

Pull request #37886 added to Project: "Patch 7.10.6"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants