Skip to content

fix(ui): search-only non-members in Manage Members modal#3209

Closed
crivetimihai wants to merge 3 commits intomainfrom
fix/team-members-modal-search-only-nonmembers
Closed

fix(ui): search-only non-members in Manage Members modal#3209
crivetimihai wants to merge 3 commits intomainfrom
fix/team-members-modal-search-only-nonmembers

Conversation

@crivetimihai
Copy link
Copy Markdown
Member

Note: This PR was re-created from #3103 due to repository maintenance. Your code and branch are intact. @omorros please verify everything looks good.

🔗 Related Issue

Closes #3085


📝 Summary

The Manage Members modal loaded all non-members eagerly via infinite scroll, which crashed browsers at 20K+ users due to DOM accumulation.

Changes:

  • Non-members section no longer loads on modal open. Users must search by name/email first; results are capped at 50.
  • Current members section gains its own search bar with server-side filtering via a new search parameter on get_team_members().
  • The old monolithic client-side search function (serverSideUserSearch) is replaced by two focused server-side search functions (serverSideMemberSearch, serverSideNonMemberSearch).

🏷️ Type of Change

  • Bug fix

🧪 Verification

Check Command Status
Lint suite make lint
Unit tests make test
Coverage ≥ 80% make coverage

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • Tests added/updated for changes
  • Documentation updated (if applicable)
  • No secrets or credentials committed

📓 Notes (optional)

Files changed (4):

  • mcpgateway/admin.py — Split unified search into two per-section inputs; non-members container no longer auto-loads
  • mcpgateway/services/team_management_service.py — Added search param + _escape_like() to get_team_members()
  • mcpgateway/static/admin.js — Replaced serverSideUserSearch with serverSideMemberSearch and serverSideNonMemberSearch
  • tests/unit/mcpgateway/test_admin.py — Updated 13 tests for new search param, added test_admin_team_non_members_partial_html_empty_search

Closes #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>
@crivetimihai crivetimihai added this to the Release 1.0.0-GA milestone Feb 24, 2026
@crivetimihai crivetimihai added bug Something isn't working performance Performance related items ui User Interface SHOULD P2: Important but not vital; high-value items that are not crucial for the immediate release labels Feb 24, 2026
@omorros
Copy link
Copy Markdown
Contributor

omorros commented Feb 24, 2026

Hi @crivetimihai thanks for reopening this! I've verified the code, everything looks good, intact and matching my original changes. Ready for review whenever you get the chance. Thanks!

@marekdano marekdano requested a review from vishu-bh February 25, 2026 14:29
Copy link
Copy Markdown
Collaborator

@vishu-bh vishu-bh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @omorros tackling scalability issue: moving non-members to explicit, server-side search with a 2-character minimum and capped results is a practical fix that protects the UI from DOM overload while keeping the Manage Members workflow usable.

Looks good to me. Thanks!!

@vishu-bh
Copy link
Copy Markdown
Collaborator

@omorros there are conflicts on this PR. Can you resolve them and it can reviewed again. Thanks!

@omorros
Copy link
Copy Markdown
Contributor

omorros commented Mar 11, 2026

Hi @vishu-bh, reopened from #3209 since I couldn't push conflict resolution to the upstream branch directly. Conflicts are resolved and everything is up to date with main. Ready for re-review whenever you get the chance. Thanks!

@vishu-bh
Copy link
Copy Markdown
Collaborator

Closing this PR, as it is a dupilicate of #3610

@vishu-bh vishu-bh closed this Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working performance Performance related items SHOULD P2: Important but not vital; high-value items that are not crucial for the immediate release ui User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][PERFORMANCE][UI]: The team members and non-members should not load in one go in Manage members modal.

3 participants