Add “Pick For Me” random game chooser for user lists #48

Open
opened 2024-01-14 14:45:47 -06:00 by jimmyb · 0 comments
Owner

Users should be able to ask MyVideoGameList to pick a random game from their own list when they are not sure what to play next.

The current Laravel checkout has game_lists persistence, list-entry create/update/delete controller logic, profile/header links reserving /list/{username}, and status values for playing, completed, on hold, dropped, plan to play, and continuously playing. The public/user list surface is not fully rebuilt yet, and no random picker route or UI exists. This issue tracks adding an authenticated “Pick For Me” action that selects from the current user’s available list entries and presents a clear recommendation.

Scope

  • Authenticated current-user game-list picker.
  • Active, non-deleted game_lists rows only.
  • Available games on the user’s own list.
  • Optional status filters, especially Plan to Play and Backlog-style statuses.
  • Result display with canonical game links and useful metadata.
  • Existing Laravel/Tailwind list/profile layout patterns.

Acceptance Criteria

  • Signed-in users can trigger a “Pick For Me” action from their own list page or related list controls.
  • Guests are redirected to login and cannot use the picker.
  • Users cannot pick from another user’s private list data.
  • The picker only considers active, non-deleted game-list entries.
  • Deleted, disabled, or soft-deleted games are excluded or handled with a safe fallback.
  • The default picker avoids obviously unavailable choices such as completed, dropped, or currently playing games unless filters explicitly include them.
  • Users can narrow the pick by status where practical, such as Plan to Play, On Hold, or all eligible statuses.
  • The selected game displays title, platform, status, rating where available, box art or fallback, and a link to the canonical game profile.
  • Empty eligible pools show a clear empty state instead of failing.
  • Re-running the picker can produce a new random result.
  • User-facing UI supports light/dark mode and follows existing Laravel/Tailwind list patterns.

Test Coverage Required

  • Feature test confirming an authenticated user can receive a random game from their own list.
  • Feature test confirming guests cannot use the picker.
  • Authorization test confirming users cannot pick from another user’s list.
  • Feature tests confirming soft-deleted list rows and unavailable games are excluded.
  • Feature tests confirming default eligibility excludes completed/dropped/currently playing entries unless explicitly included.
  • Feature tests for status filters and empty eligible pools.
  • Regression test confirming the result includes canonical game link, platform, status, rating, and box art fallback.
  • Tests should use Pest and focused list/picker coverage.
  • Run the focused picker tests, then run vendor/bin/pint --dirty before closing the issue.

Progress Checklist

  • game_lists table exists
  • GameList model exists
  • Game-list rows store status, rating, platform, and game IDs
  • Profile/header links reserve user list pages
  • Public game profile route exists
  • Add authenticated Pick For Me route/action
  • Authorize picker access for the current user only
  • Build eligible-list query with active list rows and available games
  • Add default status eligibility and optional status filters
  • Render random pick result with game metadata, canonical link, and empty state
  • Add Pick For Me control to the owner’s list page when rebuilt
  • Add tests for authorization, random selection, filtering, exclusions, result rendering, and empty states
  • Confirm picker behavior fits the rebuilt list-page workflow
Users should be able to ask MyVideoGameList to pick a random game from their own list when they are not sure what to play next. The current Laravel checkout has `game_lists` persistence, list-entry create/update/delete controller logic, profile/header links reserving `/list/{username}`, and status values for playing, completed, on hold, dropped, plan to play, and continuously playing. The public/user list surface is not fully rebuilt yet, and no random picker route or UI exists. This issue tracks adding an authenticated “Pick For Me” action that selects from the current user’s available list entries and presents a clear recommendation. ## Scope - Authenticated current-user game-list picker. - Active, non-deleted `game_lists` rows only. - Available games on the user’s own list. - Optional status filters, especially Plan to Play and Backlog-style statuses. - Result display with canonical game links and useful metadata. - Existing Laravel/Tailwind list/profile layout patterns. ## Acceptance Criteria - Signed-in users can trigger a “Pick For Me” action from their own list page or related list controls. - Guests are redirected to login and cannot use the picker. - Users cannot pick from another user’s private list data. - The picker only considers active, non-deleted game-list entries. - Deleted, disabled, or soft-deleted games are excluded or handled with a safe fallback. - The default picker avoids obviously unavailable choices such as completed, dropped, or currently playing games unless filters explicitly include them. - Users can narrow the pick by status where practical, such as Plan to Play, On Hold, or all eligible statuses. - The selected game displays title, platform, status, rating where available, box art or fallback, and a link to the canonical game profile. - Empty eligible pools show a clear empty state instead of failing. - Re-running the picker can produce a new random result. - User-facing UI supports light/dark mode and follows existing Laravel/Tailwind list patterns. ## Test Coverage Required - Feature test confirming an authenticated user can receive a random game from their own list. - Feature test confirming guests cannot use the picker. - Authorization test confirming users cannot pick from another user’s list. - Feature tests confirming soft-deleted list rows and unavailable games are excluded. - Feature tests confirming default eligibility excludes completed/dropped/currently playing entries unless explicitly included. - Feature tests for status filters and empty eligible pools. - Regression test confirming the result includes canonical game link, platform, status, rating, and box art fallback. - Tests should use Pest and focused list/picker coverage. - Run the focused picker tests, then run `vendor/bin/pint --dirty` before closing the issue. ## Progress Checklist - [x] `game_lists` table exists - [x] `GameList` model exists - [x] Game-list rows store status, rating, platform, and game IDs - [x] Profile/header links reserve user list pages - [x] Public game profile route exists - [ ] Add authenticated Pick For Me route/action - [ ] Authorize picker access for the current user only - [ ] Build eligible-list query with active list rows and available games - [ ] Add default status eligibility and optional status filters - [ ] Render random pick result with game metadata, canonical link, and empty state - [ ] Add Pick For Me control to the owner’s list page when rebuilt - [ ] Add tests for authorization, random selection, filtering, exclusions, result rendering, and empty states - [ ] Confirm picker behavior fits the rebuilt list-page workflow
Codex changed title from Create a 'Pick For Me' Feature - Shows Random Game to User to Add “Pick For Me” random game chooser for user lists 2026-05-26 01:06:07 -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#48
No description provided.