Build out admin Pending Games page #71

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

The /admin/games/pending page should become the admin workflow for reviewing game submissions before they are added to the live games database. Staff need a queue where they can see submitted games, inspect the submitted metadata, edit or normalize the submission, approve it into the canonical games table, or reject/close it with an audit trail.

The current Laravel checkout already has an admin pending-games route, sidebar entry, and placeholder view. The active games table stores live game records with requested_by and added_by, while the legacy gamestmp migration appears to represent an older pending-submission table with submitted-by, added-to-db-by, metadata, active flag, timestamps, and submitter IP. The admin dashboard also references game requests waiting in forums and games added to the pending queue but not yet added to the live database. This issue tracks deciding and rebuilding the Laravel pending-game data source and replacing the placeholder with the actual review workflow.

Scope

  • Replace the current /admin/games/pending placeholder with a working pending games queue.
  • Confirm or rebuild the canonical Laravel data model for pending game submissions.
  • Show pending submissions in an admin table with enough metadata for triage.
  • Provide staff actions to review, edit/normalize, approve into the live games table, reject/dismiss, or otherwise process submissions.
  • Preserve submitter/request attribution where available.
  • Map legacy-style pending submission fields to the current games schema where appropriate.
  • Record staff processing actions in activity/audit logs.
  • Reuse existing admin layout, sidebar, card, table, platform badge, button, pagination, and feedback patterns.

Acceptance Criteria

  • Authorized admin game staff can visit /admin/games/pending and see a real queue instead of the placeholder.
  • The pending queue uses a clearly defined Laravel model/table or documented data source.
  • Pending submissions show key triage data such as title, platform, submitter, submitted date, source URL, website, and missing/invalid metadata where practical.
  • Each pending row has a way to review the full submission.
  • Staff can edit or normalize submitted metadata before approval.
  • Staff can approve a pending submission into the canonical games table.
  • Approved games receive the correct requested_by and added_by attribution.
  • Staff can reject or dismiss a pending submission without creating a live game record.
  • Approved/rejected submissions no longer appear in the pending queue.
  • Staff actions are logged with actor, submission ID, outcome, and resulting game ID when one is created.
  • The workflow handles incomplete submissions with clear validation feedback.
  • The queue paginates results and remains usable for large pending backlogs.
  • Non-game-admin users cannot access or mutate the pending queue.
  • The page follows existing admin dashboard styling and supports light/dark mode.

Test Coverage Required

  • Feature test confirming authorized game-admin users can render /admin/games/pending.
  • Authorization test confirming users without the admin games role cannot access or mutate pending submissions.
  • Feature test confirming pending submissions render in the queue with key metadata.
  • Feature test confirming the placeholder text is replaced when pending submissions exist.
  • Feature tests for review/edit or normalization behavior once the chosen workflow is implemented.
  • Feature test confirming approval creates a canonical games record with mapped metadata.
  • Feature test confirming approved games set requested_by and added_by correctly.
  • Feature test confirming rejected/dismissed submissions do not create games and leave the queue.
  • Validation tests for incomplete or invalid pending submission data.
  • Activity/audit logging assertions for approve and reject outcomes where practical.
  • Pagination test for more than one page of pending submissions.
  • Empty-state test when no pending submissions exist.
  • 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 games route exists
  • Admin sidebar links to Pending Games
  • Pending games placeholder view exists
  • Live games table exists with requested_by and added_by attribution
  • Legacy gamestmp migration exists and may represent historical pending submissions
  • Admin create/edit game workflows exist for canonical game records
  • Confirm the canonical Laravel data source for pending game submissions
  • Add or update the pending submission model/table if needed
  • Map pending submission fields to current game fields
  • Replace the placeholder with a paginated pending queue table
  • Add full submission review/edit UI
  • Add approve flow that creates or updates a live game record
  • Add reject/dismiss flow that removes submissions from the active queue
  • Preserve requester/staff attribution through approval
  • Add activity/audit logging for staff actions
  • Add tests for access control, queue rendering, approval, rejection, validation, attribution, logging, pagination, and empty state
  • Confirm staff can process pending games end to end without using legacy/forum-only workflows
The `/admin/games/pending` page should become the admin workflow for reviewing game submissions before they are added to the live games database. Staff need a queue where they can see submitted games, inspect the submitted metadata, edit or normalize the submission, approve it into the canonical `games` table, or reject/close it with an audit trail. The current Laravel checkout already has an admin pending-games route, sidebar entry, and placeholder view. The active `games` table stores live game records with `requested_by` and `added_by`, while the legacy `gamestmp` migration appears to represent an older pending-submission table with submitted-by, added-to-db-by, metadata, active flag, timestamps, and submitter IP. The admin dashboard also references game requests waiting in forums and games added to the pending queue but not yet added to the live database. This issue tracks deciding and rebuilding the Laravel pending-game data source and replacing the placeholder with the actual review workflow. ## Scope - Replace the current `/admin/games/pending` placeholder with a working pending games queue. - Confirm or rebuild the canonical Laravel data model for pending game submissions. - Show pending submissions in an admin table with enough metadata for triage. - Provide staff actions to review, edit/normalize, approve into the live `games` table, reject/dismiss, or otherwise process submissions. - Preserve submitter/request attribution where available. - Map legacy-style pending submission fields to the current `games` schema where appropriate. - Record staff processing actions in activity/audit logs. - Reuse existing admin layout, sidebar, card, table, platform badge, button, pagination, and feedback patterns. ## Acceptance Criteria - Authorized admin game staff can visit `/admin/games/pending` and see a real queue instead of the placeholder. - The pending queue uses a clearly defined Laravel model/table or documented data source. - Pending submissions show key triage data such as title, platform, submitter, submitted date, source URL, website, and missing/invalid metadata where practical. - Each pending row has a way to review the full submission. - Staff can edit or normalize submitted metadata before approval. - Staff can approve a pending submission into the canonical `games` table. - Approved games receive the correct `requested_by` and `added_by` attribution. - Staff can reject or dismiss a pending submission without creating a live game record. - Approved/rejected submissions no longer appear in the pending queue. - Staff actions are logged with actor, submission ID, outcome, and resulting game ID when one is created. - The workflow handles incomplete submissions with clear validation feedback. - The queue paginates results and remains usable for large pending backlogs. - Non-game-admin users cannot access or mutate the pending queue. - The page follows existing admin dashboard styling and supports light/dark mode. ## Test Coverage Required - Feature test confirming authorized game-admin users can render `/admin/games/pending`. - Authorization test confirming users without the admin games role cannot access or mutate pending submissions. - Feature test confirming pending submissions render in the queue with key metadata. - Feature test confirming the placeholder text is replaced when pending submissions exist. - Feature tests for review/edit or normalization behavior once the chosen workflow is implemented. - Feature test confirming approval creates a canonical `games` record with mapped metadata. - Feature test confirming approved games set `requested_by` and `added_by` correctly. - Feature test confirming rejected/dismissed submissions do not create games and leave the queue. - Validation tests for incomplete or invalid pending submission data. - Activity/audit logging assertions for approve and reject outcomes where practical. - Pagination test for more than one page of pending submissions. - Empty-state test when no pending submissions exist. - 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 games route exists - [x] Admin sidebar links to Pending Games - [x] Pending games placeholder view exists - [x] Live `games` table exists with `requested_by` and `added_by` attribution - [x] Legacy `gamestmp` migration exists and may represent historical pending submissions - [x] Admin create/edit game workflows exist for canonical game records - [ ] Confirm the canonical Laravel data source for pending game submissions - [ ] Add or update the pending submission model/table if needed - [ ] Map pending submission fields to current game fields - [ ] Replace the placeholder with a paginated pending queue table - [ ] Add full submission review/edit UI - [ ] Add approve flow that creates or updates a live game record - [ ] Add reject/dismiss flow that removes submissions from the active queue - [ ] Preserve requester/staff attribution through approval - [ ] Add activity/audit logging for staff actions - [ ] Add tests for access control, queue rendering, approval, rejection, validation, attribution, logging, pagination, and empty state - [ ] Confirm staff can process pending games end to end without using legacy/forum-only workflows
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#71
No description provided.