Build out admin Pending Game Reviews page #72

Open
opened 2026-05-07 20:44:55 -05:00 by jimmyb · 0 comments
Owner

The /admin/reviews/pending page should become the admin moderation queue for game reviews that need staff approval before they are visible as approved/published content. Staff need a focused place to inspect pending reviews, open the related game/user context, approve valid reviews, reject or return problematic reviews, and keep an audit trail of moderation decisions.

The current Laravel checkout has an admin pending-review route and sidebar link, but the view is still a placeholder. Public game pages already show Write a Review / Edit Game Review links using either game_reviews or reviews table detection when those tables exist, and the profile settings UI has a Game Reviews tab placeholder with an Approved? column. There is no current migration for a rebuilt game reviews table in this checkout, so this issue should confirm or rebuild the canonical review data model before the admin queue is implemented.

Scope

  • Replace the current /admin/reviews/pending placeholder with a working pending game reviews queue.
  • Confirm or rebuild the Laravel data model/table for game reviews and approval status.
  • Show pending reviews in an admin table with reviewer, game, submitted/updated date, title/summary, and status context.
  • Provide staff actions to view the full review, approve it, reject/dismiss it, or send it back for edits if that workflow exists.
  • Preserve reviewer/game attribution and links to relevant user and game pages.
  • Record moderation decisions in activity/audit logs.
  • Reuse existing admin layout, sidebar, card, table, button, pagination, and feedback patterns.
  • Keep the public review creation/editing workflows separate unless they are required to support pending review moderation.

Acceptance Criteria

  • Authorized content/game-review staff can visit /admin/reviews/pending and see a real queue instead of the placeholder.
  • The queue uses a clearly defined review table/model and approval status field.
  • Only reviews needing staff review appear in the pending queue.
  • Approved, rejected, deleted, or already-processed reviews do not appear in the pending queue.
  • Each row shows enough context to triage the review, including game, author, submitted date, and review title or excerpt.
  • Each row links to the full review detail or edit/review screen.
  • Staff can approve a pending review and remove it from the pending queue.
  • Staff can reject or dismiss a pending review without publishing it.
  • Staff decisions are logged with actor, review ID, outcome, and timestamp.
  • Non-staff users and staff without the required moderation role cannot access or mutate pending review records.
  • The queue paginates results and has a clear empty state.
  • The page follows existing admin dashboard styling and supports light/dark mode.

Test Coverage Required

  • Feature test confirming authorized staff can render /admin/reviews/pending.
  • Authorization tests confirming insufficient-role users cannot access or process pending reviews.
  • Feature test confirming pending reviews render in the queue with game and author context.
  • Feature test confirming non-pending reviews are excluded.
  • Feature test confirming approval updates the review state and removes it from the pending queue.
  • Feature test confirming rejection/dismissal updates the review state without publishing it.
  • Validation tests for invalid review moderation actions.
  • Activity/audit logging assertions for approve and reject outcomes where practical.
  • Pagination and empty-state tests.
  • Regression tests confirming public review links or profile review placeholders are not broken by the admin queue work.
  • Tests should use Pest and focused feature coverage.
  • Run the focused affected tests, then run vendor/bin/pint --dirty --format agent before closing the issue.

Progress Checklist

  • Admin pending game reviews route exists
  • Admin sidebar links to Pending Game Reviews
  • Pending game reviews placeholder view exists
  • Game profile actions reserve review add/edit URLs
  • Profile settings Game Reviews tab reserves an Approved? column
  • Confirm or create the canonical game review model/table
  • Define review approval/moderation states
  • Replace the placeholder with a paginated pending review table
  • Add full review inspection UI
  • Add approve and reject/dismiss moderation actions
  • Preserve links to the related game and reviewer
  • Add activity/audit logging for moderation actions
  • Add tests for access control, queue rendering, approval, rejection, exclusion rules, logging, pagination, and empty state
  • Confirm pending review moderation works without breaking public review entry points
The `/admin/reviews/pending` page should become the admin moderation queue for game reviews that need staff approval before they are visible as approved/published content. Staff need a focused place to inspect pending reviews, open the related game/user context, approve valid reviews, reject or return problematic reviews, and keep an audit trail of moderation decisions. The current Laravel checkout has an admin pending-review route and sidebar link, but the view is still a placeholder. Public game pages already show `Write a Review` / `Edit Game Review` links using either `game_reviews` or `reviews` table detection when those tables exist, and the profile settings UI has a Game Reviews tab placeholder with an Approved? column. There is no current migration for a rebuilt game reviews table in this checkout, so this issue should confirm or rebuild the canonical review data model before the admin queue is implemented. ## Scope - Replace the current `/admin/reviews/pending` placeholder with a working pending game reviews queue. - Confirm or rebuild the Laravel data model/table for game reviews and approval status. - Show pending reviews in an admin table with reviewer, game, submitted/updated date, title/summary, and status context. - Provide staff actions to view the full review, approve it, reject/dismiss it, or send it back for edits if that workflow exists. - Preserve reviewer/game attribution and links to relevant user and game pages. - Record moderation decisions in activity/audit logs. - Reuse existing admin layout, sidebar, card, table, button, pagination, and feedback patterns. - Keep the public review creation/editing workflows separate unless they are required to support pending review moderation. ## Acceptance Criteria - Authorized content/game-review staff can visit `/admin/reviews/pending` and see a real queue instead of the placeholder. - The queue uses a clearly defined review table/model and approval status field. - Only reviews needing staff review appear in the pending queue. - Approved, rejected, deleted, or already-processed reviews do not appear in the pending queue. - Each row shows enough context to triage the review, including game, author, submitted date, and review title or excerpt. - Each row links to the full review detail or edit/review screen. - Staff can approve a pending review and remove it from the pending queue. - Staff can reject or dismiss a pending review without publishing it. - Staff decisions are logged with actor, review ID, outcome, and timestamp. - Non-staff users and staff without the required moderation role cannot access or mutate pending review records. - The queue paginates results and has a clear empty state. - The page follows existing admin dashboard styling and supports light/dark mode. ## Test Coverage Required - Feature test confirming authorized staff can render `/admin/reviews/pending`. - Authorization tests confirming insufficient-role users cannot access or process pending reviews. - Feature test confirming pending reviews render in the queue with game and author context. - Feature test confirming non-pending reviews are excluded. - Feature test confirming approval updates the review state and removes it from the pending queue. - Feature test confirming rejection/dismissal updates the review state without publishing it. - Validation tests for invalid review moderation actions. - Activity/audit logging assertions for approve and reject outcomes where practical. - Pagination and empty-state tests. - Regression tests confirming public review links or profile review placeholders are not broken by the admin queue work. - Tests should use Pest and focused feature coverage. - Run the focused affected tests, then run `vendor/bin/pint --dirty --format agent` before closing the issue. ## Progress Checklist - [x] Admin pending game reviews route exists - [x] Admin sidebar links to Pending Game Reviews - [x] Pending game reviews placeholder view exists - [x] Game profile actions reserve review add/edit URLs - [x] Profile settings Game Reviews tab reserves an Approved? column - [ ] Confirm or create the canonical game review model/table - [ ] Define review approval/moderation states - [ ] Replace the placeholder with a paginated pending review table - [ ] Add full review inspection UI - [ ] Add approve and reject/dismiss moderation actions - [ ] Preserve links to the related game and reviewer - [ ] Add activity/audit logging for moderation actions - [ ] Add tests for access control, queue rendering, approval, rejection, exclusion rules, logging, pagination, and empty state - [ ] Confirm pending review moderation works without breaking public review entry points
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#72
No description provided.