feat: add suspend/unsuspend user actions and clarify ban destructiveness#83
Merged
Conversation
a21b95e to
e57c717
Compare
Wire up suspendpubkey/unsuspendpubkey/listsuspendedpubkeys NIP-86 RPC methods as general-purpose moderation actions. Previously suspension was only available through the age review flow. - Add suspendPubkey, unsuspendPubkey, listSuspendedPubkeys to adminApi - Add Suspend/Unsuspend buttons to UserActions (amber/green styling) - Add Suspended Users tab to UserManagement page - Track isSuspended state in useModerationStatus hook - Put Ban User behind a confirmation dialog with honest destructive language (was "Can be reversed" — ban purges content from 16+ tables) - Update Unban tooltip to note purged content is not restored - Extract ConfirmDialog from DeleteConfirmDialog with configurable pendingLabel prop - Document suspend_user exclusion from Zendesk resolutionActions (suspension is a holding action, not a final resolution)
e57c717 to
8476b30
Compare
dcadenas
approved these changes
May 21, 2026
dcadenas
left a comment
There was a problem hiding this comment.
✅ safer moderation controls, ship it
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
suspendpubkey/unsuspendpubkey/listsuspendedpubkeysNIP-86 RPC methods (from funnelcake PR #434) as general-purpose moderation actions, available from reports, user detail, and user management viewsMotivation
Suspension was previously only available through the age review flow (PR #80). Moderators need it as a general tool — it hides content without purging, and unsuspend restores visibility. Ban triggers a purge cascade across 16+ funnelcake tables, and unban doesn't restore purged content. The UI should make this distinction clear.
Changes
src/lib/adminApi.tssuspendPubkey,unsuspendPubkey,listSuspendedPubkeyssrc/hooks/useAdminApi.tssrc/hooks/useModerationStatus.tsisUserSuspendedwith suspended-pubkeys querysrc/components/ConfirmDialog.tsxsrc/components/DeleteConfirmDialog.tsxsrc/components/UserActions.tsxsrc/components/UserManagement.tsxisSuspendedpropsrc/components/ReportDetail.tsxisSuspendedto UserActionsValidation
npx tsc --noEmit— cleannpx vitest run— 99 passed, 1 skipped, 0 failed (frontend)npx vite build— cleanRelates to divinevideo/support-trust-safety#146