-
Notifications
You must be signed in to change notification settings - Fork 11.8k
chore: Remove some omnichannel tech debt -2 #35854
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 ready to merge! 🎉 |
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #35854 +/- ##
===========================================
+ Coverage 64.59% 64.76% +0.17%
===========================================
Files 3223 3072 -151
Lines 95227 91973 -3254
Branches 17845 17512 -333
===========================================
- Hits 61511 59566 -1945
+ Misses 30821 29659 -1162
+ Partials 2895 2748 -147
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Proposed changes (including videos or screenshots)
Removes 2 callbacks and replace them with patchfunctions
Use promise.all where applicable
Moved
check
calls to the meteor method calling the function, which should make easier to remove the meteor method at some pointRemoved duplicated db calls for validation of data
Attempting new strategy: instead of find-check-delete, delete and then check. This reduces one DB call (no check) and uses the result from the delete call to check if the value was valid
Projections & types for projections
Removed unused file
Use ajv for department/id/agents endpoint
Issue(s)
https://rocketchat.atlassian.net/browse/CTZ-87
Steps to test or reproduce
Further comments
This pull request focuses on removing technical debt within the omnichannel components of the Rocket.Chat project. Key changes include:
Type Safety and Validation Enhancements:
livechat:saveAgentInfo
,livechat:addMonitor
,livechat:removeMonitor
,livechat:removeTag
,livechat:removeUnit
,livechat:saveTag
) to include input validation using Meteor'scheck
package, enhancing robustness against invalid inputs.Performance Improvements:
livechat.ts
,config.ts
) to run concurrently usingPromise.all
, improving performance and code structure.Code Refactoring and Simplification:
LivechatDepartmentEE
model to make thebusinessUnit
parameter optional and extracted core query logic into a helper method, improving maintainability.findEnabledWithAgentsAndBusinessUnit
method to reuse existing logic, reducing code duplication.Type Definitions and Static Analysis:
These changes collectively aim to improve the performance, maintainability, and type safety of the omnichannel components in the Rocket.Chat codebase.