-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: infinite loop in useAgentsList after first fetch #35779
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! 🎉 |
🦋 Changeset detectedLatest commit: eb3370a The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #35779 +/- ##
===========================================
+ Coverage 60.96% 61.02% +0.06%
===========================================
Files 2951 3099 +148
Lines 70290 73253 +2963
Branches 16167 16408 +241
===========================================
+ Hits 42852 44705 +1853
- Misses 24498 25519 +1021
- Partials 2940 3029 +89
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:
|
Proposed changes (including videos or screenshots)
This PR fixes an issue where fetching entered an infinite loop when interacting with the
AutoCompleteAgentcomponent.Cause:
The component internally uses the
useAgentsListhook, which was incorrectly adding one to the total number of items. As a result, when Virtuoso rendered the list,endReachedwas triggered repeatedly because the total count (with the extra +1) was never truly reached. This led toloadMoreItemsbeing called indefinitely.Issue(s)
CTZ-38
Steps to test or reproduce
/v1/livechat/users/agentshould start happeningFurther comments
useAgentsListwill come in a future PRThis pull request addresses an infinite loop issue in the
useAgentsListhook within the Rocket.Chat repository. The changes include:Infinite Loop Fix: The
useAgentsListhook had an issue with incorrect item count calculation, which has been resolved by removing the +1 adjustment to the total count.Accessibility Enhancements:
AutoCompleteAgentandDepartmentAgentsTablecomponents now supportaria-labelledbyfor improved accessibility.AddAgentcomponent has been updated with aria attributes and type safety improvements.EditDepartmentcomponent introduces unique IDs for form elements to ensure labels are correctly associated with their inputs.Type Safety Improvements: Type safety has been enhanced across several components by importing the
AriaAttributestype from React.These changes aim to improve both the functionality and accessibility of the Rocket.Chat application.