fix(directory,admin): trim search whitespace in user search hooks#41561
fix(directory,admin): trim search whitespace in user search hooks#41561Sathvik2954 wants to merge 1 commit into
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 |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (5)📚 Learning: 2026-02-10T16:32:42.586ZApplied to files:
📚 Learning: 2026-05-11T20:30:35.265ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-05-06T12:21:44.083ZApplied to files:
🔇 Additional comments (2)
WalkthroughUser search inputs in Directory and Administration Users are trimmed before their client-side query payloads are built. ChangesUser search normalization
Estimated code review effort: 2 (Simple) | ~5 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Proposed changes (including videos or screenshots)
Applies
.trim()to search input terms inuseDirectoryQueryanduseFilteredUsershooks.This prevents search queries containing leading or trailing whitespace (e.g.
" john ") from sending un-trimmed queries to the backend API, fixing user and channel lookup failures when extra spaces are present in search inputs.Issue(s)
Closes #41545
Closes #41530
Steps to test or reproduce
admin).Further comments
apps/meteor/client/views/directory/hooks/useDirectoryQuery.tsapps/meteor/client/views/admin/users/hooks/useFilteredUsers.tsSummary by CodeRabbit