Skip to content

chore(site): replace inline add member form with dialog on <OrganizationMembersPage />#24429

Merged
jakehwll merged 5 commits into
mainfrom
jakehwll/DEVEX-112-organization-add-users-modal
Apr 21, 2026
Merged

chore(site): replace inline add member form with dialog on <OrganizationMembersPage />#24429
jakehwll merged 5 commits into
mainfrom
jakehwll/DEVEX-112-organization-add-users-modal

Conversation

@jakehwll

Copy link
Copy Markdown
Contributor

🤖 This PR was written by Coder Agent on behalf of Jake Howell

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

…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.
@jakehwll jakehwll requested a review from jeremyruppel April 17, 2026 04:26
@jakehwll jakehwll marked this pull request as ready for review April 17, 2026 04:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +120 to +122
await Promise.all(
users.map((user) => addMemberMutation.mutateAsync(user.id)),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in follow-up PR #24456

@jakehwll jakehwll merged commit e186dc3 into main Apr 21, 2026
32 checks passed
@jakehwll jakehwll deleted the jakehwll/DEVEX-112-organization-add-users-modal branch April 21, 2026 03:43
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants