Skip to content

Conversation

@lucas-a-pelegrino
Copy link
Member

@lucas-a-pelegrino lucas-a-pelegrino commented Sep 11, 2025

Proposed changes (including videos or screenshots)

This PR removes the livechat:getAnalyticsChartData deprecated meteor method.

Issue(s)

CTZ-53

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores

    • Major version bump for @rocket.chat/meteor reflecting a breaking change.
  • Refactor

    • Removed the deprecated Realtime API method livechat:getAnalyticsChartData from Livechat analytics.
    • Integrations or scripts relying on this method will stop working; migrate to supported analytics endpoints or reports.

@lucas-a-pelegrino lucas-a-pelegrino added this to the 8.0.0 milestone Sep 11, 2025
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 11, 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 Sep 11, 2025

🦋 Changeset detected

Latest commit: 474f96c

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

This PR includes changesets to release 40 packages
Name Type
@rocket.chat/meteor Major
@rocket.chat/core-typings Major
@rocket.chat/rest-typings Major
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@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 Sep 11, 2025

Walkthrough

Removes the deprecated Meteor DDP method livechat:getAnalyticsChartData (server implementation and startup import) and adds a changeset declaring a major version bump documenting the removal.

Changes

Cohort / File(s) Summary
Livechat analytics method removal
apps/meteor/app/livechat/server/methods/getAnalyticsChartData.ts, apps/meteor/app/livechat/server/index.ts
Deletes the server-side implementation and Meteor registration of livechat:getAnalyticsChartData and removes the startup import that would register it.
Release changeset
.changeset/fifty-rice-smash.md
Adds a changeset declaring a major version bump for @rocket.chat/meteor and documents removal of the deprecated Realtime API method.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant D as Meteor DDP
  participant S as Livechat Server
  participant A as OmnichannelAnalytics

  rect rgba(200,230,255,0.25)
  note right of C: Old flow (before this change)
  C->>D: call livechat:getAnalyticsChartData(options)
  D->>S: Invoke registered method
  S->>A: getAnalyticsChartData(utcOffset, executedBy, options)
  A-->>S: ChartDataResult
  S-->>D: Result
  D-->>C: ChartDataResult
  end

  rect rgba(255,230,200,0.25)
  note right of C: New flow (after removal)
  C->>D: call livechat:getAnalyticsChartData(options)
  D-->>C: Method not found (no handler registered)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check for stray references to livechat:getAnalyticsChartData across client code, tests, docs, integrations, and build artifacts.
  • Confirm release notes or replacement REST endpoint references where applicable.

Possibly related PRs

Suggested labels

stat: ready to merge

Suggested reviewers

  • KevLehman
  • aleksandernsilva
  • sampaiodiego

Poem

I hopped through code and cleared an old trail,
The handler gone, no more a tale.
A changeset stomps, a version climbs high,
Logs breathe easy beneath the sky. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and specifically describes the main change: removing the deprecated livechat:getAnalyticsChartData method.
Linked Issues check ✅ Passed The changeset documents removal of the deprecated livechat:getAnalyticsChartData method and implements a major version bump, aligning with the objective to deprecate and remove this API method.
Out of Scope Changes check ✅ Passed All changes are directly related to removing the deprecated livechat:getAnalyticsChartData method: removing the import, deleting the implementation file, and documenting the removal in the changeset.
✨ 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 chore/v8/CTZ-53

📜 Recent 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 b8add7c and 474f96c.

📒 Files selected for processing (3)
  • .changeset/fifty-rice-smash.md (1 hunks)
  • apps/meteor/app/livechat/server/index.ts (0 hunks)
  • apps/meteor/app/livechat/server/methods/getAnalyticsChartData.ts (0 hunks)
💤 Files with no reviewable changes (2)
  • apps/meteor/app/livechat/server/methods/getAnalyticsChartData.ts
  • apps/meteor/app/livechat/server/index.ts
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: rodrigok
Repo: RocketChat/Rocket.Chat PR: 36991
File: apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts:219-221
Timestamp: 2025-09-19T15:15:04.642Z
Learning: The Federation_Matrix_homeserver_domain setting in apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts is part of the old federation system and is being deprecated/removed, so configuration issues with this setting should not be flagged for improvement.
📚 Learning: 2025-09-19T15:15:04.642Z
Learnt from: rodrigok
Repo: RocketChat/Rocket.Chat PR: 36991
File: apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts:219-221
Timestamp: 2025-09-19T15:15:04.642Z
Learning: The Federation_Matrix_homeserver_domain setting in apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts is part of the old federation system and is being deprecated/removed, so configuration issues with this setting should not be flagged for improvement.

Applied to files:

  • .changeset/fifty-rice-smash.md
⏰ 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
🔇 Additional comments (1)
.changeset/fifty-rice-smash.md (1)

1-5: Changeset is well-formed and appropriately documents the breaking change.

The changeset correctly declares a major version bump for @rocket.chat/meteor and provides a clear description of the removed method. The structure, version level, and description all align with best practices for documenting breaking changes.


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.

@codecov
Copy link

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.92%. Comparing base (3c42f0d) to head (474f96c).
⚠️ Report is 388 commits behind head on release-8.0.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-8.0.0   #36925      +/-   ##
=================================================
+ Coverage          66.43%   70.92%   +4.48%     
=================================================
  Files               3276     3031     -245     
  Lines             109596   104339    -5257     
  Branches           20860    18371    -2489     
=================================================
+ Hits               72814    74003    +1189     
+ Misses             34116    28401    -5715     
+ Partials            2666     1935     -731     
Flag Coverage Δ
e2e 58.04% <ø> (+0.19%) ⬆️
e2e-api ?
unit 72.29% <ø> (+0.73%) ⬆️

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.

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)
.changeset/fifty-rice-smash.md (2)

2-3: Confirm all affected packages get a major bump (ddp-client types may also be breaking).

If the ddp-client (or any public client typings) removed the livechat:getAnalyticsChartData signature, that package should also receive a major bump in this same changeset to signal the breaking API removal to downstreams.

Proposed update if applicable:

 ---
 "@rocket.chat/meteor": major
+\"@rocket.chat/ddp-client\": major
 ---

5-5: Strengthen the breaking note with impact and migration guidance.

Call out that clients will now receive “Method not found” and provide a brief migration note or explicit “no replacement” statement plus references (issue/PR).

Proposed wording:

-Removes deprecated Realtime API method: `livechat:getAnalyticsChartData`
+BREAKING: Removes deprecated Realtime API method `livechat:getAnalyticsChartData`.
+
+Impact: Servers no longer register this method; DDP callers will receive "Method not found".
+Migration: Remove usages of this method in clients/integrations. If an alternative API exists, migrate accordingly and link it here.
+
+Refs: CTZ-53, PR #36925.

I can draft the migration note once you confirm the intended replacement (if any).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4450305 and 181479d.

📒 Files selected for processing (3)
  • .changeset/fifty-rice-smash.md (1 hunks)
  • apps/meteor/app/livechat/server/index.ts (0 hunks)
  • apps/meteor/app/livechat/server/methods/getAnalyticsChartData.ts (0 hunks)
💤 Files with no reviewable changes (2)
  • apps/meteor/app/livechat/server/methods/getAnalyticsChartData.ts
  • apps/meteor/app/livechat/server/index.ts
⏰ 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

@juliajforesti juliajforesti marked this pull request as ready for review October 6, 2025 20:45
@juliajforesti juliajforesti requested a review from a team as a code owner October 6, 2025 20:45
juliajforesti
juliajforesti previously approved these changes Oct 6, 2025
@ggazzo ggazzo dismissed stale reviews from aleksandernsilva and juliajforesti October 31, 2025 17:40

The merge-base changed after approval.

@ggazzo ggazzo requested review from a team as code owners October 31, 2025 17:40
@ggazzo ggazzo force-pushed the release-8.0.0 branch 4 times, most recently from 329ef07 to 8fa1cac Compare October 31, 2025 19:22
@juliajforesti juliajforesti removed request for a team November 4, 2025 18:41
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants