Conversation
Implements the `search_profiles` Directory query for user discovery (WI-1.5, closes #16). Substring case-insensitive match over `users.handle` with pagination (limit capped at 50). Only Active users with a canister are returned; CreationPending, CreationFailed, DeletionPending, and the new Suspended status are excluded. - Adds `UserCanisterStatus::Suspended` variant + encode/decode/order/display. - Replaces stale `SearchProfilesError::Unauthorized` with `BadArgs` and `Internal(String)`. - Argument validation in `inspect_search_profiles` (limit bounds, sanitized handle); empty queries pass through and return all Active users. - Updates interface/types.md and architecture.md to reflect the actual filter semantics and error variants. - Tightens CLAUDE.md guidance to always update SUMMARY.md when adding/ removing docs pages. - Adds 23 unit tests + 12 pocket-ic integration tests covering exact/ prefix/middle substring, case-insensitivity, `@`-prefix sanitization, pagination, empty query, no-match, every excluded status, anonymous caller, and trap on invalid limits.
|
✔️ 85e313b - Conventional commits check succeeded. |
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.
Summary
Implements the
search_profilesDirectory query for user discovery (WI-1.5, closes #16).users.handle, paginated (limit capped at 50,0rejected)canister_status = ActiveANDcanister_id IS NOT NULL—CreationPending,CreationFailed,DeletionPending, and the newSuspendedstatus are excludedUserCanisterStatus::Suspended(encode/decode/order/display) for cross-ref with WI-1.9SearchProfilesError::UnauthorizedwithBadArgs+Internal(String)docs/src/SUMMARY.mdwhen docs pages are added/removedTest plan
just check_code— clippy + fmt cleanjust build_all— WASM build succeeds@-prefix, case)cargo test --test search_profiles(12 pocket-ic tests) — full Candid wire coverage including anonymous caller and trap onlimit=0/limit>50docs/src/interface/types.md,docs/src/architecture.md) updated to reflect filter semantics and error variants