feat(moderation): add abuse-reporting, moderation queue, and takedown… - #553
Merged
barry01-hash merged 1 commit intoAug 31, 2026
Merged
Conversation
… flow (PromptMintLabs#501) - POST /api/moderation/report: signed abuse reports for listings/reviews/users - GET /api/moderation/queue: paginated, filterable report queue for moderators - POST /api/moderation/actions: resolve/dismiss reports and take down/reinstate listings - GET /api/moderation/status: public takedown flag for a listing - Frontend: Report dialog, moderation queue UI, takedown banner, API client - Backend + frontend tests; changeset entry
|
@Escelit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
Implements roadmap item #501: let users report listings and add a moderation queue + takedown process.
Backend
POST /api/moderation/report— signed abuse-report submission (wallet signature verified, reason validation, dedupe of open reports) for listings/reviews/users.GET /api/moderation/queue— paginated, filterable report queue for moderators (signature-gated).POST /api/moderation/actions— resolve/dismiss reports and take down/reinstate listings (extends existing bulk-action endpoint).GET /api/moderation/status— public, unauthenticated takedown flag for a listing.api/moderation/data.ts— report store + prompt moderation state store;src/lib/auth/challenge.ts— report-signing helpers.Frontend
src/lib/moderation.ts— typed API client +signReportAuth.ReportListingDialog— report dialog on the listing page.ModerationQueue— moderator queue with resolve/dismiss/takedown/reinstate actions.Moderation.tsx— tabs for Queue + Audit Log.pages/prompt/page.tsx— "Report" button + takedown banner.All moderator actions require a scoped wallet signature and are written to the existing audit log.
Test plan
api/moderation/{report,queue,status,actions}.test.ts(19 tests).src/lib/moderation.test.tsx(6 tests).tsc -bclean on changed files;eslintpasses.Related issue
Closes #501