fix(invitations): report every reason a batch of invites failed - #6093
fix(invitations): report every reason a batch of invites failed#6093icecrasher321 wants to merge 1 commit into
Conversation
The invite modal collapsed a multi-failure batch to `N invitations
failed.` plus the first reason and discarded the rest. The batch endpoint
rejects per email and each reason names its own address, so inviting
several people who are all ineligible for the chosen membership — the
common multi-failure case, since External requires every invitee to
already be on a paid plan — named one of them and hid the others. The
failed addresses are reseeded into the field as ordinary chips carrying
no error state, so nothing else on screen identified them either.
`buildInviteFailureMessage` now lists the distinct reasons, collapses
identical ones, and reports the denominator ("2 of 5 invitations could
not be sent") the way add-people-modal already did for the same partial
-failure shape. Past three reasons the tail is counted rather than
listed, so a large batch cannot bury the modal in near-identical
sentences.
Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview For a single failure it still shows that reason alone. For multiple failures it adds a headline (none sent vs N of M could not be sent), lists up to three distinct reasons (deduped), and appends "And X more." when there are additional unique reasons so large batches stay readable. The modal wires this in via Unit tests cover single failure, full-batch rejection, partial batch, deduplication, and the capped list tail. Reviewed by Cursor Bugbot for commit 13ee6a9. Configure here. |
Greptile SummaryImproves invite-modal batch failure copy so multi-invite failures list distinct server reasons (with a cap) instead of only the first reason.
Confidence Score: 5/5Safe to merge; the change is limited to clearer multi-failure error messaging with matching tests. No behavioral contract beyond UI copy is altered, the helper handles single/partial/full batches and reason truncation as intended, and security surface is unchanged.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/components/invite-modal/invite-modal.tsx | Pure presentation helper plus call-site swap; attempted count still comes from the submitted emails closure, matching prior batch size semantics. |
| apps/sim/app/workspace/[workspaceId]/components/invite-modal/invite-modal.test.tsx | Focused unit tests exercise the new message builder edge cases without changing modal behavior tests. |
Reviews (1): Last reviewed commit: "fix(invitations): report every reason a ..." | Re-trigger Greptile
Summary
The invite modal collapsed a multi-failure batch to
N invitations failed.plus the first reason and discarded the rest. The batch endpoint rejects per email and each reason names its own address, so inviting several people who are all ineligible for the chosen membership — the common multi-failure case, since External requires every invitee to already be on a paid plan — named one of them and hid the others. The failed addresses are reseeded into the field as ordinary chips carrying no error state, so nothing else on screen identified them either.buildInviteFailureMessagenow lists the distinct reasons, collapses identical ones, and reports the denominator ("2 of 5 invitations could not be sent") the way add-people-modal already did for the same partial -failure shape. Past three reasons the tail is counted rather than listed, so a large batch cannot bury the modal in near-identical sentences.Type of Change
Testing
N/A
Checklist