-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: Adds deprecation warning for livechat:saveTag and new endpoint to replace it
#37281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: e2da75e The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 packages
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 |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughMigrates livechat tag saving from a Meteor RPC method ( Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client App
participant REST as REST Endpoint
participant Service as LivechatEnterprise
rect rgb(220, 255, 220)
Note over Client,REST: New flow (POST /v1/livechat/tags.save)
Client->>REST: POST /v1/livechat/tags.save\n{ _id, tagData, tagDepartments }
REST->>Service: LivechatEnterprise.saveTag(_id, tagData, tagDepartments)
Service-->>REST: result
REST-->>Client: 200 OK { tag data }
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
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 #37281 +/- ##
===========================================
+ Coverage 68.78% 68.81% +0.02%
===========================================
Files 3363 3360 -3
Lines 114202 114142 -60
Branches 20617 20604 -13
===========================================
- Hits 78556 78543 -13
+ Misses 33551 33511 -40
+ Partials 2095 2088 -7
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 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.
📒 Files selected for processing (7)
.changeset/seven-otters-turn.md(1 hunks)apps/meteor/client/omnichannel/tags/TagEdit.tsx(3 hunks)apps/meteor/ee/app/livechat-enterprise/server/api/tags.ts(2 hunks)apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.ts(2 hunks)apps/meteor/tests/data/livechat/tags.ts(1 hunks)apps/meteor/tests/e2e/utils/omnichannel/tags.ts(1 hunks)packages/rest-typings/src/v1/omnichannel.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}: Write concise, technical TypeScript/JavaScript with accurate typing
Follow DRY by extracting reusable logic into helper functions or page objects
Avoid code comments in the implementation
Files:
apps/meteor/tests/e2e/utils/omnichannel/tags.ts
apps/meteor/tests/e2e/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
apps/meteor/tests/e2e/**/*.{ts,tsx}: Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle
Store commonly used locators in variables/constants for reuse
Use page.waitFor() with specific conditions and avoid hardcoded timeouts
Implement proper wait strategies for dynamic content
Follow the Page Object Model pattern consistently
Files:
apps/meteor/tests/e2e/utils/omnichannel/tags.ts
🧬 Code graph analysis (4)
apps/meteor/tests/data/livechat/tags.ts (1)
apps/meteor/tests/data/api-data.ts (2)
request(10-10)credentials(39-42)
apps/meteor/client/omnichannel/tags/TagEdit.tsx (1)
apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
saveTag(141-143)
apps/meteor/ee/app/livechat-enterprise/server/api/tags.ts (3)
packages/rest-typings/src/v1/omnichannel.ts (4)
POSTLivechatTagsSaveSuccessResponse(586-586)isPOSTLivechatTagsSaveParams(555-555)POSTLivechatTagsRemoveSuccessResponse(616-616)isPOSTLivechatTagsRemoveParams(603-603)apps/meteor/ee/app/livechat-enterprise/server/lib/LivechatEnterprise.ts (1)
LivechatEnterprise(13-183)apps/meteor/ee/app/livechat-enterprise/server/methods/removeTag.ts (1)
id(17-26)
apps/meteor/tests/e2e/utils/omnichannel/tags.ts (2)
apps/meteor/tests/data/livechat/tags.ts (1)
removeTag(28-48)apps/meteor/ee/app/livechat-enterprise/server/methods/removeTag.ts (1)
id(17-26)
apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.ts
Outdated
Show resolved
Hide resolved
dougfabris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frontend looks good to me!
apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.ts
Outdated
Show resolved
Hide resolved
apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 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.
📒 Files selected for processing (1)
apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-04T16:49:19.107Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37377
File: apps/meteor/ee/server/hooks/federation/index.ts:86-88
Timestamp: 2025-11-04T16:49:19.107Z
Learning: In Rocket.Chat's federation system (apps/meteor/ee/server/hooks/federation/), permission checks follow two distinct patterns: (1) User-initiated federation actions (creating rooms, adding users to federated rooms, joining from invites) should throw MeteorError to inform users they lack 'access-federation' permission. (2) Remote server-initiated federation events should silently skip/ignore when users lack permission. The beforeAddUserToRoom hook only executes for local user-initiated actions, so throwing an error there is correct. Remote federation events are handled separately by the federation Matrix package with silent skipping logic.
Applied to files:
apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.ts
📚 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:
apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.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). (1)
- GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.ts (2)
7-7: LGTM!The import is correct and necessary for the deprecation warning functionality.
19-19: Previous issue resolved.The deprecation logger now correctly references
'livechat:saveTag'. The method name, version, and replacement endpoint are all accurate.
apps/meteor/ee/app/livechat-enterprise/server/methods/saveTag.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
dougfabris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frontend looks good!
Proposed changes (including videos or screenshots)
This PR aims at adding a deprecation warning for
livechat:saveTag, it also adds a new endpoint replacing the deprecated livechat method;livechat/tags.saveIssue(s)
CORE-1411
Steps to test or reproduce
Further comments
Summary by CodeRabbit
New Features
Deprecations
Public API