fix: search users by ID + show member email in org lists#680
Merged
Conversation
Admins could not locate a user by id from the _users search box; only email/name/nickname matched. - add id to MatchesSearch (dynamodb/cassandra scan path) - add id column to the OR-search in sql/mongodb/arangodb/couchbase - update dashboard search placeholder
Org member lists showed opaque user ids. Resolve each membership's user identity for display. - add email/given_name/family_name to OrgMember (GraphQL only; no proto mirror) - populate via GetUserByID per member; blank on a dangling user, one lookup per member per paginated page - dashboard shows email with user_id as secondary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-up fixes to #678 (both reported broken from the dashboard).
1. Search users by ID
_userssearch matched email/name/nickname but not the user id, so admins couldn't find a user by ID. Added the id to the search on every backend (SQL/Mongo/Arango/Couchbase LIKE-or-regex with bound params/QuoteMeta; DynamoDB/Cassandra scan viaMatchesSearch). Dashboard placeholder → "Search by email, name, or ID...". Search tests extended (id-prefix returns the user) across TEST_DBS.2. Show member email in org member lists
The
OrgMembertype had onlyuser_id, so the org detail member list showed opaque IDs. Addedemail/given_name/family_name(nullable) toOrgMember, resolved from the user in the_org_membersservice (one lookup per member per page; dangling user → blank, never errors). Dashboard member cell shows email (falls back to user_id). GraphQL-only; gen committed.Testing
go build/vet/golangci-lint (0 issues), graphql codegen parity, SQLite integration + storage search tests green (id-search + member-email assertions added), dashboard tsc/build/prettier clean. Non-SQLite via CI make test-all-db (id-search mirrors the already-cross-DB-validated email search).