Skip to content

fix(scope-group-mgmt): show all members when group matched by name#161

Merged
qiyundai merged 1 commit into
devfrom
fix/group-search-show-all-members
May 22, 2026
Merged

fix(scope-group-mgmt): show all members when group matched by name#161
qiyundai merged 1 commit into
devfrom
fix/group-search-show-all-members

Conversation

@qiyundai
Copy link
Copy Markdown
Collaborator

Summary

  • Searching a group by name would show the group in the list but expanding it displayed "No members match your search" — because the same query was applied to filter the member list, and users don't have the group name in their fields
  • Fixed with smart filtering: when the group itself matches the query (by name or description), all members are shown on expand; user filtering is only applied when the group surfaced via a member match
  • Also adds a defensive empty-string guard to groupMetaMatchesQuery, making it consistent with the parallel userMatchesQuery helper

Behavior change

Search term Before After
Group name (e.g. "Admins") Expand → "No members match your search" Expand → all members visible
User name/email (e.g. "alice") Matching user shown only Matching user shown only (unchanged)

Test plan

  • Search a group by its exact name → expand → all members visible
  • Search a user by name/email → matching group auto-expands → only that user visible
  • Clear search → all groups shown, expand shows all members
  • npm run check passes

🤖 Generated with Claude Code

When searching by group name, the expanded member list was always empty
because the same query term was applied to filter users — who naturally
don't match the group name. Now, if the group itself matches the query
(name or description), all its members are shown; filtering is only
applied when the group surfaced via a member match.

Also adds a defensive empty-string guard to groupMetaMatchesQuery,
matching the style of the parallel userMatchesQuery helper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@qiyundai qiyundai merged commit 0bfc47b into dev May 22, 2026
3 checks passed
@qiyundai qiyundai mentioned this pull request May 29, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants