fix(ui): filter team members modal to show only non-members#3610
Conversation
Closes IBM#3085 Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
…minimum in team members modal Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
…dal-search-only-nonmembers
Maintainer Review & RebaseRebased onto current Commits (4 on branch)
Verification
Security
|
Review SummaryRebased onto main (clean, no conflicts) and reviewed for correctness, security, consistency, and test coverage. Original PR — Well Implemented
Fixes Added During Review1. Stale cache leakage across modal sessions ( 2. Hidden role-input encoding mismatch ( 3. Member overrides lost when filtered out by search ( 4. Missing test assertion ( Test Results
|
crivetimihai
left a comment
There was a problem hiding this comment.
Reviewed, rebased, and fixed three bugs found during review (stale cache leakage, encoding mismatch, off-screen member override loss). All tests pass. Approved.
🔗 Related Issue Closes #3085
Supersedes #3209
📝 Summary
The Manage Members modal loaded all non-members eagerly via infinite scroll, which crashed browsers at 20K+ users due to DOM accumulation.
Changes:
searchparameter onget_team_members()serverSideUserSearchwith two focused server-side search functions (serverSideMemberSearch,serverSideNonMemberSearch) - Selection state is preserved across searches with a 2-char minimum enforced🏷️ Type of Change
🧪 Verification
make lintmake test✅ Checklist
make black isort pre-commit)📓 Notes (optional)
Re-opened from #3209 (which was itself re-created from #3103) since the branch lived on the upstream repo and I couldn't push conflict
resolution directly. Code and changes are identical — only the merge conflicts with upstream main have been resolved.
Files changed (4): -
mcpgateway/admin.py— Split unified search into two per-section inputs; non-members container no longer auto-loadsmcpgateway/services/team_management_service.py— Addedsearchparam +_escape_like()toget_team_members()mcpgateway/static/admin.js— ReplacedserverSideUserSearchwithserverSideMemberSearchandserverSideNonMemberSearchtests/unit/mcpgateway/test_admin.py— Updated 13 tests for new search param, addedtest_admin_team_non_members_partial_html_empty_search