Skip to content

Conversation

@juliajforesti
Copy link
Contributor

@juliajforesti juliajforesti commented Nov 6, 2025

Proposed changes (including videos or screenshots)

Replace livechat:returnAsInquiry method call on apps/meteor/tests/data/livechat/rooms.ts with endpoint livechat/inquiries.returnAsInquiry

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Refactor
    • Optimized internal API communication patterns for the livechat inquiry return functionality, improving system efficiency and maintainability.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 6, 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 Nov 6, 2025

⚠️ No Changeset found

Latest commit: 589f2a1

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
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

Walkthrough

The test data in the livechat rooms fixture is updated to use a direct REST endpoint (livechat/inquiries.returnAsInquiry) instead of the Meteor method (livechat:returnAsInquiry), replacing the JSON-RPC style payload envelope with a simplified object containing only the roomId property.

Changes

Cohort / File(s) Summary
Livechat API migration
apps/meteor/tests/data/livechat/rooms.ts
Updated moveBackToQueue call from Meteor method to REST endpoint; simplified request payload from JSON-RPC envelope to single property object

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo
  • sampaiodiego
  • KevLehman

Poem

🐰 The methods of old fade into REST,
Test data updated, endpoint's the best,
From JSON-RPC to payloads so clean,
Livechat inquiry flows now pristine! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing the Meteor method livechat:returnAsInquiry with a REST endpoint in test code, which aligns with the file changes shown in the raw summary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 test/remove-returnAsInquiry

📜 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 dd959e2 and ba83713.

📒 Files selected for processing (1)
  • apps/meteor/tests/data/livechat/rooms.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: cardoso
Repo: RocketChat/Rocket.Chat PR: 36890
File: apps/meteor/tests/e2e/e2e-encryption/e2ee-otr.spec.ts:21-26
Timestamp: 2025-09-16T13:33:49.237Z
Learning: In Rocket.Chat test files, the im.delete API endpoint accepts either a `roomId` parameter (requiring the actual DM room _id) or a `username` parameter (for the DM partner's username). It does not accept slug-like constructions such as concatenating usernames together.
📚 Learning: 2025-10-28T16:53:42.761Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.

Applied to files:

  • apps/meteor/tests/data/livechat/rooms.ts
🧬 Code graph analysis (1)
apps/meteor/tests/data/livechat/rooms.ts (1)
apps/meteor/tests/data/api-data.ts (1)
  • credentials (39-42)
⏰ 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). (6)
  • 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)
  • GitHub Check: 📦 Meteor Build (production)
🔇 Additional comments (1)
apps/meteor/tests/data/livechat/rooms.ts (1)

432-439: Refactor verified and approved.

The migration from JSON-RPC method call to REST endpoint is complete and consistent across the codebase:

  • No remaining usages of the old livechat:returnAsInquiry method
  • The new endpoint is properly defined in the server REST routes
  • Client-side implementation already uses this endpoint pattern
  • Test helper function correctly updated with simplified payload structure

The change maintains backward compatibility for callers and improves code consistency.


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.

@juliajforesti juliajforesti added this to the 8.0.0 milestone Nov 6, 2025
@juliajforesti juliajforesti marked this pull request as ready for review November 6, 2025 16:10
@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.92%. Comparing base (dd959e2) to head (ba83713).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           release-8.0.0   #37409   +/-   ##
==============================================
  Coverage          70.92%   70.92%           
==============================================
  Files               3036     3036           
  Lines             104621   104621           
  Branches           18423    18422    -1     
==============================================
+ Hits               74201    74207    +6     
+ Misses             28466    28463    -3     
+ Partials            1954     1951    -3     
Flag Coverage Δ
e2e 58.06% <ø> (+0.03%) ⬆️
unit 72.28% <ø> (-0.01%) ⬇️

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 ggazzo requested review from a team as code owners November 6, 2025 18:06
@ggazzo ggazzo closed this Nov 6, 2025
@ggazzo ggazzo force-pushed the test/remove-returnAsInquiry branch from ba83713 to 589f2a1 Compare November 6, 2025 18:07
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.

3 participants