feat(FR-3357): surface failed users via bulk-error modal in RBAC user assignment#8363
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Improves RBAC bulk user assignment by preserving failed users for retry and displaying per-user errors.
Changes:
- Moves assignment mutation handling into
AssignRoleModal. - Adds retry-preserving partial-failure UX and shared error formatting.
- Adds localized partial-failure descriptions across 21 locales.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
react/src/components/AssignRoleModal.tsx |
Implements assignment and partial-failure handling. |
react/src/components/RoleAssignmentTab.tsx |
Delegates assignment ownership to the modal. |
react/src/components/RoleScopePermissionEditModal.tsx |
Uses the shared mutation error helper. |
react/src/helper/mutationError.ts |
Extracts mutation rejection message formatting. |
react/src/__generated__/AssignRoleModalBulkAssignMutation.graphql.ts |
Renames the generated Relay mutation artifact. |
resources/i18n/de.json |
Adds German failure guidance. |
resources/i18n/el.json |
Adds Greek failure guidance. |
resources/i18n/en.json |
Adds English failure guidance. |
resources/i18n/es.json |
Adds Spanish failure guidance. |
resources/i18n/fi.json |
Adds Finnish failure guidance. |
resources/i18n/fr.json |
Adds French failure guidance. |
resources/i18n/id.json |
Adds Indonesian failure guidance. |
resources/i18n/it.json |
Adds Italian failure guidance. |
resources/i18n/ja.json |
Adds Japanese failure guidance. |
resources/i18n/ko.json |
Adds Korean failure guidance. |
resources/i18n/mn.json |
Adds Mongolian failure guidance. |
resources/i18n/ms.json |
Adds Malay failure guidance. |
resources/i18n/pl.json |
Adds Polish failure guidance. |
resources/i18n/pt-BR.json |
Adds Brazilian Portuguese failure guidance. |
resources/i18n/pt.json |
Adds Portuguese failure guidance. |
resources/i18n/ru.json |
Adds Russian failure guidance. |
resources/i18n/th.json |
Adds Thai failure guidance. |
resources/i18n/tr.json |
Adds Turkish failure guidance. |
resources/i18n/vi.json |
Adds Vietnamese failure guidance. |
resources/i18n/zh-CN.json |
Adds Simplified Chinese failure guidance. |
resources/i18n/zh-TW.json |
Adds Traditional Chinese failure guidance. |
… assignment Move the bulk-assign mutation into AssignRoleModal: on partial failure the modal stays open, successfully assigned users are deselected so only the failed users remain (select marked with an error border via a field error), and the shared BAIBulkErrorModal lists each failure for retry. Cancel after a partial success still reports success=true so the parent refetches. reasonMessage moves to helper/mutationError for reuse. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
43810b3 to
032bb76
Compare
0220dbd to
2880152
Compare

Resolves #8362 (FR-3357)
Stacked on #8360 (FR-3355) → #8302 (FR-3334).
Summary
RBAC role user assignment reported partial failures of
adminBulkAssignRoleas a warning toast plus one persistent notification per failed user, and closed the assign modal unconditionally — the user lost the context of which users failed. This aligns the assignment flow with FR-3334's partial-failure UX.AssignRoleModalRoleAssignmentTab), reporting back viaonRequestClose(success)— the same contract asRoleScopePermissionEditModal. The parent only opens/closes the modal and refetches on success.form.setFieldswitherrors: ['']) — error status without a printed message. Changing the selection revalidates therequiredrule and clears the border.BAIBulkErrorModallists each failure (user email + server error message) on top of the assign modal. A wholly-rejected request counts every requested user as failed, with the message unwrapped by the sharedreasonMessagehelper.success=trueso the parent still refetches — some assignments reached the backend.Supporting changes
reasonMessagemoved fromRoleScopePermissionEditModaltoreact/src/helper/mutationError.tsand is now shared by both modals.handleBulkAssign, and its per-userupsertNotificationfallout removed fromRoleAssignmentTab(the revoke flow is unchanged and out of scope).rbac.UserAssignmentsPartialFailureDescription("Some user assignments failed. Please check the items.") added to all 21 languages, mirroring FR-3334'sPermissionsPartialFailureDescriptioncopy.rbac.BulkAssignPartialFailureis kept — still used byProjectAdminSettingModal.How to test
The test server
10.82.0.151is configured so that bulk RBAC requests always fail — use it to reproduce the partial-failure UX:10.82.0.151, open RBAC management → a role's detail drawer → Assignments tab → Assign User.Verification
🤖 Generated with Claude Code