Add content flagging and moderation queue #16

Open
opened 2024-01-14 14:22:50 -06:00 by jimmyb · 0 comments
Owner

MyVideoGameList needs a flagging system so users can report inappropriate or problematic content and staff can review those reports from the admin dashboard.

The original issue listed many legacy surfaces, including forum posts, profiles, comments, reviews, chat, and blogs. In the current Laravel checkout, profile pages and profile comments exist, game comments have persistence/model stubs, and several other surfaces such as forums, news comments, review comments, chatroom entries, blog entries, and blog comments are not rebuilt yet. This issue tracks building a reusable Laravel flagging foundation that can support current content now and future content types as those features return.

Scope

  • Reusable flag/report persistence for polymorphic content.
  • User-facing flag controls on available reportable surfaces.
  • Admin moderation queue for reviewing flags.
  • Profile bios/content, profile comments, and game comments as initial Laravel targets.
  • Future integrations for forum posts, news comments, game review comments, chatroom entries, blog entries, and blog comments.
  • Staff review actions such as pending, reviewed, dismissed, and resolved.
  • Abuse prevention for duplicate, anonymous, or invalid reports.

Acceptance Criteria

  • Authenticated users can flag supported content with a reason and optional note.
  • Guests cannot submit flags and are prompted to log in.
  • Users cannot flag missing, deleted, soft-deleted, or unsupported content.
  • Users cannot create duplicate active flags for the same content item.
  • Flagged profile content, profile comments, and game comments appear in an admin moderation queue.
  • Admins can view flag details including reporter, content owner, content type, reason, note, status, and timestamps.
  • Admins can mark flags reviewed, dismissed, or resolved without deleting the audit record.
  • Flagging a profile bio/content works even though the profile itself is not a comment model.
  • Future reportable content types can plug into the same flagging model without a new table per content type.
  • Flag controls and moderation UI support light/dark mode and follow existing Laravel/Tailwind layout patterns.

Test Coverage Required

  • Feature tests for creating flags on profile content, profile comments, and game comments.
  • Feature tests confirming guests cannot create flags.
  • Validation tests for required reason, optional note length, unsupported content type, missing content, and deleted content.
  • Regression tests confirming duplicate active flags are blocked for the same reporter/content pair.
  • Admin feature tests for moderation queue rendering and flag status transitions.
  • Authorization tests confirming non-staff users cannot access the moderation queue or update flag status.
  • Regression tests confirming future unsupported surfaces do not expose broken flag links until implemented.
  • Tests should use Pest and focused feature coverage.
  • Run the focused affected tests, then run vendor/bin/pint --dirty before closing the issue.

Progress Checklist

  • Public profile pages exist
  • Profile comments exist
  • Game comment persistence/model exists
  • Admin dashboard layout exists
  • Pending review moderation placeholder exists
  • Add reusable flag/report persistence
  • Add flag model relationships and supported content type mapping
  • Add user-facing flag routes/actions for supported surfaces
  • Add flag controls to profile content, profile comments, and game comments where rendered
  • Add admin moderation queue routes, controller/actions, and views
  • Add status transitions for reviewed, dismissed, and resolved flags
  • Add duplicate prevention and deleted-content handling
  • Prepare integration points for forums, news comments, review comments, chatroom entries, blog entries, and blog comments
  • Add tests for flag creation, validation, authorization, queue rendering, status updates, and duplicate prevention
  • Confirm the flagging system is reusable across rebuilt content features
MyVideoGameList needs a flagging system so users can report inappropriate or problematic content and staff can review those reports from the admin dashboard. The original issue listed many legacy surfaces, including forum posts, profiles, comments, reviews, chat, and blogs. In the current Laravel checkout, profile pages and profile comments exist, game comments have persistence/model stubs, and several other surfaces such as forums, news comments, review comments, chatroom entries, blog entries, and blog comments are not rebuilt yet. This issue tracks building a reusable Laravel flagging foundation that can support current content now and future content types as those features return. ## Scope - Reusable flag/report persistence for polymorphic content. - User-facing flag controls on available reportable surfaces. - Admin moderation queue for reviewing flags. - Profile bios/content, profile comments, and game comments as initial Laravel targets. - Future integrations for forum posts, news comments, game review comments, chatroom entries, blog entries, and blog comments. - Staff review actions such as pending, reviewed, dismissed, and resolved. - Abuse prevention for duplicate, anonymous, or invalid reports. ## Acceptance Criteria - Authenticated users can flag supported content with a reason and optional note. - Guests cannot submit flags and are prompted to log in. - Users cannot flag missing, deleted, soft-deleted, or unsupported content. - Users cannot create duplicate active flags for the same content item. - Flagged profile content, profile comments, and game comments appear in an admin moderation queue. - Admins can view flag details including reporter, content owner, content type, reason, note, status, and timestamps. - Admins can mark flags reviewed, dismissed, or resolved without deleting the audit record. - Flagging a profile bio/content works even though the profile itself is not a comment model. - Future reportable content types can plug into the same flagging model without a new table per content type. - Flag controls and moderation UI support light/dark mode and follow existing Laravel/Tailwind layout patterns. ## Test Coverage Required - Feature tests for creating flags on profile content, profile comments, and game comments. - Feature tests confirming guests cannot create flags. - Validation tests for required reason, optional note length, unsupported content type, missing content, and deleted content. - Regression tests confirming duplicate active flags are blocked for the same reporter/content pair. - Admin feature tests for moderation queue rendering and flag status transitions. - Authorization tests confirming non-staff users cannot access the moderation queue or update flag status. - Regression tests confirming future unsupported surfaces do not expose broken flag links until implemented. - Tests should use Pest and focused feature coverage. - Run the focused affected tests, then run `vendor/bin/pint --dirty` before closing the issue. ## Progress Checklist - [x] Public profile pages exist - [x] Profile comments exist - [x] Game comment persistence/model exists - [x] Admin dashboard layout exists - [x] Pending review moderation placeholder exists - [ ] Add reusable flag/report persistence - [ ] Add flag model relationships and supported content type mapping - [ ] Add user-facing flag routes/actions for supported surfaces - [ ] Add flag controls to profile content, profile comments, and game comments where rendered - [ ] Add admin moderation queue routes, controller/actions, and views - [ ] Add status transitions for reviewed, dismissed, and resolved flags - [ ] Add duplicate prevention and deleted-content handling - [ ] Prepare integration points for forums, news comments, review comments, chatroom entries, blog entries, and blog comments - [ ] Add tests for flag creation, validation, authorization, queue rendering, status updates, and duplicate prevention - [ ] Confirm the flagging system is reusable across rebuilt content features
Codex changed title from Add Flagging System to Add content flagging and moderation queue 2026-05-26 00:17:48 -05:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MyVideoGameList/myvideogamelist.com#16
No description provided.