Notifications on CUD #2630 - #2658
Conversation
Notify the deletions: the one principal or provider by name, several as a count — raised before the per-target refusals, which live longer and would queue the confirmation out of its moment Notify created and updated from the four editor dialogs, named from the mutation's answer where it gives one Register the notification phrases, including the `deleteFailed` keys the delete commands already resolved — a refusal used to render as the raw key Rewrite the test pinning silence on success: the silence is what this issue removes Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codacy's Analysis Summary0 new issue (≤ 0 issue)
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## extensions #2658 +/- ##
=============================================
Coverage 82.14% 82.14%
Complexity 89 89
=============================================
Files 17 17
Lines 252 252
Branches 24 24
=============================================
Hits 207 207
Misses 35 35
Partials 10 10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds user-facing success notifications for create/update/delete operations across principals (users/groups/roles) and ID providers, wiring them into dialogs and bulk delete commands and backing them with new i18n phrase keys.
Changes:
- Add new
*.notify.*i18n keys for CUD success/failure notifications. - Emit success toasts after successful create/update in the four editor dialogs.
- Emit success toasts for bulk deletions (single-item by name, multi-item by count) and update command tests accordingly.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/i18n/phrases.properties | Adds new notification phrase keys for principal and section CUD operations. |
| assets/js/features/user-editor/UserEditorDialog.tsx | Shows success toast after user create/update. |
| assets/js/features/role-editor/RoleEditorDialog.tsx | Shows success toast after role create/update. |
| assets/js/features/idprovider-editor/IdProviderEditorDialog.tsx | Shows success toast after ID provider create/update. |
| assets/js/features/group-editor/GroupEditorDialog.tsx | Shows success toast after group create/update. |
| assets/js/entities/principal/model/principal-commands.ts | Adds success notifications for principal bulk deletion outcomes (single vs many). |
| assets/js/entities/principal/model/principal-commands.test.ts | Updates tests to expect success notifications for deletions. |
| assets/js/entities/principal/model/id-provider-commands.ts | Adds success notifications for ID provider bulk deletion outcomes (single vs many). |
| assets/js/entities/principal/model/id-provider-commands.test.ts | Adds phrase setup + test coverage for ID provider deletion success notification. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| principal.notify.deleted = "{0}" deleted | ||
| principal.notify.deletedMany = {0} items deleted | ||
| principal.notify.deleteFailed = Could not delete "{0}" | ||
| principal.notify.deleteFailedReason = Could not delete "{0}": {1} | ||
| users.notify.created = User "{0}" created |
Success notifications on principal CUD, which were absent entirely. Deletions notify by name for a single target and as a count for several (
"Editors" deleted,2 items deleted), from both bulk commands — raised before the per-target refusal toasts, whose longer lifetime and the three-slot stack would otherwise queue the confirmation for half a minute on a mixed outcome. The four editor dialogs notify created and updated (Role "X" created,User "Y" updated), named from the mutation's answer where it returns the principal. Failure reporting stays as it was: inline in the open dialog for create/update, per-target toasts for refused deletions — the latter now actually rendering words, since thedeleteFailedphrase keys the commands resolved were never registered and produced raw#key#text. Phrases follow the new<section>.notify.*scheme; the legacynotify.*keys and their translations are untouched.Closes #2630
Drafted with AI assistance