Skip to content

Conversation

@lucas-a-pelegrino
Copy link
Member

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

Proposed changes (including videos or screenshots)

This PR removes the livechat:removeAllClosedRooms deprecated meteor method.

Issue(s)

CTZ-58

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Breaking Changes
    • Removed the deprecated Realtime API method livechat:removeAllClosedRooms—integrations relying on this method will no longer work and must be updated.
  • Chores
    • Published a new major version to reflect the removal and signal the breaking change.

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

dionisio-bot bot commented Sep 12, 2025

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

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2025

🦋 Changeset detected

Latest commit: e0b11fe

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 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/federation-service 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

coderabbitai bot commented Sep 12, 2025

Walkthrough

Removes the server-side Meteor method livechat:removeAllClosedRooms by deleting its implementation and stopping its import at server startup. Adds a changeset declaring a major version bump for @rocket.chat/meteor to record the breaking Realtime API removal.

Changes

Cohort / File(s) Summary
Livechat method removal
apps/meteor/app/livechat/server/methods/removeAllClosedRooms.ts, apps/meteor/app/livechat/server/index.ts
Deleted the removeAllClosedRooms server method implementation and removed its import from server startup, eliminating the livechat:removeAllClosedRooms Meteor method and its server-side logic (permission check, logging, batch removal flow).
Release metadata
.changeset/neat-spoons-cover.md
Added changeset declaring a major release due to removal of deprecated Realtime API method livechat:removeAllClosedRooms.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Client
  participant MeteorServer as Meteor Server
  participant LivechatRooms
  participant Remover as removeOmnichannelRoom

  rect rgb(240,248,255)
  note over Client,MeteorServer: Before change
  Client->>MeteorServer: DDP call: livechat:removeAllClosedRooms(departmentIds?)
  MeteorServer->>MeteorServer: Check permission: remove-closed-livechat-rooms
  alt authorized
    MeteorServer->>MeteorServer: applyRoomRestrictions → extraQuery
    MeteorServer->>LivechatRooms: findClosedRooms(departmentIds, extraQuery)
    LivechatRooms-->>MeteorServer: closed room IDs
    loop per room
      MeteorServer->>Remover: removeOmnichannelRoom(roomId)
      Remover-->>MeteorServer: removed
    end
    MeteorServer-->>Client: return countRemoved
  else not authorized
    MeteorServer-->>Client: error-not-allowed
  end
  end

  rect rgb(255,245,238)
  note over Client,MeteorServer: After change
  Client->>MeteorServer: DDP call: livechat:removeAllClosedRooms(...)
  MeteorServer-->>Client: method not found / no handler
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • aleksandernsilva
  • sampaiodiego
  • MartinSchoeler

Poem

I hop through branches, whiskers keen,
A method sliced so neat and clean.
Closed rooms once swept with one swift broom —
Now silence hums inside the room.
A major bump, a tiny cheer, rabbit hops forth into next frontier. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title clearly specifies the removal of the deprecated livechat:removeAllClosedRooms method and marks it as a breaking change using the conventional commit “chore!:” prefix, concisely capturing the main change in a single descriptive sentence.
Linked Issues Check ✅ Passed The changes fully remove the livechat:removeAllClosedRooms Meteor method implementation, its registration import, and add a changeset declaring a major version bump, which satisfies the coding objectives of CTZ-58 to deprecate and remove this method.
Out of Scope Changes Check ✅ Passed All modifications are limited to removal of the deprecated method and its import, along with the corresponding changeset, with no unrelated files or features altered beyond the scope of the linked issue CTZ-58.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ 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-58

📜 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 a45b692 and e0b11fe.

📒 Files selected for processing (3)
  • .changeset/neat-spoons-cover.md (1 hunks)
  • apps/meteor/app/livechat/server/index.ts (0 hunks)
  • apps/meteor/app/livechat/server/methods/removeAllClosedRooms.ts (0 hunks)
💤 Files with no reviewable changes (2)
  • apps/meteor/app/livechat/server/index.ts
  • apps/meteor/app/livechat/server/methods/removeAllClosedRooms.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/neat-spoons-cover.md

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.

Copy link

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.changeset/neat-spoons-cover.md (1)

1-6: Remove remaining client calls to the removed Realtime method livechat:removeAllClosedRooms.

  • Found references in clients:
    • apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTableFilter.tsx — line 16: useMethod('livechat:removeAllClosedRooms')
    • apps/meteor/client/views/omnichannel/currentChats/FilterByText.tsx — line 84: useMethod('livechat:removeAllClosedRooms')
  • Action: remove or replace these calls and update ServerMethods/types, tests, and docs to match the API removal before merging.
🧹 Nitpick comments (1)
.changeset/neat-spoons-cover.md (1)

5-5: Strengthen the BREAKING note and add migration guidance.

Call it a “Meteor (DDP) method” for clarity, and provide a short migration note and deprecation reference to help integrators.

Apply:

-Removes deprecated Realtime API method: `livechat:removeAllClosedRooms`
+BREAKING: remove deprecated Meteor (DDP) method `livechat:removeAllClosedRooms`.
+
+Migration:
+- Remove any client calls to this method; it no longer exists as of 8.0.0.
+- Replace usage with the supported cleanup workflow (e.g., REST/retention APIs or an admin job), and link to docs/changelog.
+
+Refs: CTZ-58.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5467e46 and a45b692.

📒 Files selected for processing (3)
  • .changeset/neat-spoons-cover.md (1 hunks)
  • apps/meteor/app/livechat/server/index.ts (0 hunks)
  • apps/meteor/app/livechat/server/methods/removeAllClosedRooms.ts (0 hunks)
💤 Files with no reviewable changes (2)
  • apps/meteor/app/livechat/server/index.ts
  • apps/meteor/app/livechat/server/methods/removeAllClosedRooms.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
🔇 Additional comments (1)
.changeset/neat-spoons-cover.md (1)

2-2: Verify '@rocket.chat/meteor' is the intended package in .changeset/neat-spoons-cover.md

No output from the prior script — run these from the repo root and paste outputs so I can confirm the changeset target matches an actual package name:

# show the changeset and config
sed -n '1,160p' .changeset/neat-spoons-cover.md || true
cat .changeset/config.json || true
jq -r '.packages[]?' .changeset/config.json 2>/dev/null || true

# list package names tracked in the repo (git) or fallback to find
git ls-files -- '**/package.json' -z | xargs -0 -n1 jq -r '.name // empty' | sort -u || true
find . -name package.json -not -path '*/node_modules/*' -print0 | xargs -0 -n1 jq -r '.name // empty' | sort -u || true

# search repo for the exact package string
rg -n --hidden --glob '!node_modules/**' '@rocket\.chat/meteor' || git grep -n '@rocket.chat/meteor' || true

If the package name is not present in the package.json list or differs from the monorepo's published package, update the changeset to the correct package name used by your publishing workflow.

@codecov
Copy link

codecov bot commented Sep 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.24%. Comparing base (d072acd) to head (e0b11fe).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           release-8.0.0   #36931   +/-   ##
==============================================
  Coverage          70.24%   70.24%           
==============================================
  Files               2999     2999           
  Lines             102301   102301           
  Branches           18221    18221           
==============================================
+ Hits               71861    71864    +3     
+ Misses             28576    28569    -7     
- Partials            1864     1868    +4     
Flag Coverage Δ
e2e 57.89% <ø> (+0.01%) ⬆️
unit 71.33% <ø> (-0.02%) ⬇️

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.

ggazzo and others added 22 commits October 3, 2025 17:15
lucas-a-pelegrino and others added 2 commits October 6, 2025 14:10
Updates the version of '@rocket.chat/meteor' to major and removes the deprecated method from the Realtime API.
@juliajforesti juliajforesti marked this pull request as ready for review October 6, 2025 18:47
@juliajforesti juliajforesti requested a review from a team as a code owner October 6, 2025 18:47
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.