chore(site): replace inline add member form with dialog on <OrganizationMembersPage />#24429
Conversation
…on members page Replace the single-select inline UserAutocomplete form with a multi-select Dialog (matching the GroupMembersPage pattern from #24287). Changes: - Replace AddOrganizationMember inline form with AddUsersDialog using MultiUserSelect for multi-user selection in a modal - Batch-add multiple users via Promise.all in the page callback - Remove isAddingMember prop (dialog manages its own loading state) - Update stories to match new interface
The paginatedOrganizationMembers query was only passing limit and offset to the API, dropping the filter param. The backend already supports q-based filtering on the paginated-members endpoint.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a053ff8345
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await Promise.all( | ||
| users.map((user) => addMemberMutation.mutateAsync(user.id)), | ||
| ); |
There was a problem hiding this comment.
Wait for all add-member requests before ending submit
Using Promise.all here makes the batch fail fast on the first rejected mutateAsync call (for example, when one selected user is already a member), while the other add requests continue running in the background. That means the dialog can clear its submitting state and allow another click before the first batch finishes, which can trigger duplicate adds and confusing partial-success behavior. Collect all results with Promise.allSettled (or equivalent) before returning so submit state reflects real completion.
Useful? React with 👍 / 👎.
Replace the single-select inline UserAutocomplete form with a multi-select Dialog (matching the GroupMembersPage pattern from #24287).
Changes: