Skip to content

feat: add toast notifications to policy mutation handlers (Closes #240) - #377

Merged
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
waterWang:feat/toast-notifications-for-policy-mutations
Jul 29, 2026
Merged

feat: add toast notifications to policy mutation handlers (Closes #240)#377
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
waterWang:feat/toast-notifications-for-policy-mutations

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Adds success/error/warning toast notifications to the policies page's mutation handlers, ensuring every admin mutation (create/update policy) provides clear, consistent feedback.

Changes

  • onSuccess (pending/approval): Warning toast informing the admin that the change requires approval
  • onSuccess (executed): Success toast confirming the policy was saved
  • onError (non-auth, non-conflict): Error toast with actionable message, distinct from the 401 re-auth banner

Background

The shared toast system (useToasts + ToastViewport) was already imported and wired into the JSX (line 528) but never called from the mutation handlers. This completes the integration for the policies page, providing the same level of feedback as the members page already has.

Acceptance Criteria

  • Successful policy saves show a success toast
  • Approval-pending saves show a warning toast
  • Failures (validation, network) show an error toast without duplicating the 401 banner behavior
  • Toasts are dismissible and auto-expire (existing behavior)

Closes #240

…mantine-guild#240)

Add success/error/warning toast notifications to the policies page's
mutation handlers, ensuring every admin mutation (create/update policy)
provides clear and consistent feedback:

- onSuccess (pending/approval): warning toast with approval message
- onSuccess (executed): success toast with policy name
- onError (non-auth, non-conflict): error toast with actionable message

The existing toast system (useToasts + ToastViewport) was already
imported and wired into the JSX but never called from the mutation
handlers. This completes the integration for the policies page.
@Lakes41
Lakes41 merged commit 3e9ed3d into Adamantine-guild:main Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a toast notification system for admin mutations

2 participants