feat(groups): pick members while creating a group#766
Merged
1 commit merged intoJul 23, 2026
Merged
Conversation
Creating a group only took a name, so members and Agents could only be
added after the group already existed. The invite API accepts a
participant_id, and the only endpoint exposing those ids required an
existing group, so the create flow had no way to resolve them.
Backend:
- POST /api/groups accepts an optional member_participant_ids list and
stages the group with its initial members in one transaction, so an
invalid member rolls the whole group back instead of leaving an
empty group behind.
- Add GET /api/groups/member-candidates, a tenant-scoped listing for
the create flow, registered before /{group_id} so the literal path is
not parsed as a group id. It excludes the creator, who joins as
manager on create.
- Extract _invitable_participant so create and invite share the same
validation, including Agent visibility for the inviter.
Frontend:
- Replace the name-only prompt with CreateGroupModal: name, Agent and
member tabs, search, multi-select and a live selection count.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Y1fe1Zh0u
added a commit
that referenced
this pull request
Jul 22, 2026
The integration branch needs this pull request alongside the other v1.11.2 candidates without changing the original PR state. Constraint: Preserve the source PR commit and merge in numeric order. Confidence: high Scope-risk: moderate Related: #766 Tested: Git merge completed without unresolved conflicts Not-tested: Combined backend and frontend suites pending
40c1f6b
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
Creating a group only accepted a name, so members and Agents could only be pulled in after the group already existed. This adds member selection to the create flow itself.
The invite API takes a
participant_id, and the only endpoint exposing those ids (GET /{group_id}/member-candidates) requires an existing group — so the create dialog had no way to resolve them. That is why this touches the backend as well as the UI.Backend
POST /api/groupsaccepts an optionalmember_participant_ids. The group and every initial member are staged in one transaction, so an invalid member rolls the whole thing back rather than leaving an empty group behind.GET /api/groups/member-candidates— tenant-scoped, for use before a group exists. Registered before/{group_id}so the literal path is not parsed as a group id. Excludes the creator, who joins as manager on create._invitable_participant, shared by the create and invite paths, so Agent visibility for the inviter is enforced identically in both.Fully backward compatible: omitting
member_participant_idsreproduces the previous behaviour, and the existing per-group candidates and invite endpoints are unchanged.Frontend
CreateGroupModalreplaces the name-only prompt: group name, Agent/member tabs, search, multi-select with a live selection count. Selection survives tab switches; the confirm button is disabled while the request is in flight.Testing
pytest -k group— 207 passed, including 4 new cases: create-with-members, rollback on an invalid member, audit details recording the invited ids, and a regression guard that/member-candidatesstays registered ahead of/{group_id}.ruff checkclean on the changed backend files.npm run build(tsc strict) passes.participant_idreturns 400 with no group persisted; the UI flow creates the group and navigates into it with all members present.Checklist