Show game usage counts on the admin edit screen #937

Closed
opened 2026-08-27 03:31:27 -05:00 by Veilor · 3 comments
Member

Administrators need a quick summary of whether a game is used by lists, wishlists, or favorites before disabling or replacing it.

The requested data is aggregate usage information; individual user names are out of scope.

Scope

  • Add aggregate counts for users who have each game in lists, wishlists, and favorites.
  • Display the three counts in the existing admin game-edit view.
  • Load counts through the existing game/admin application patterns and preserve current authorization behavior.

Acceptance Criteria

  • The admin game-edit screen shows separate counts for Lists, Wishlists, and Favorites.
  • Each count represents the number of users associated with the game in that category, with zero displayed when there are no associations.
  • The summary is visible without navigating to the public game page.
  • No user names or other personally identifying details are shown.
  • Existing game-edit behavior, validation, authorization, and disable/replace workflows remain unchanged.

Test Coverage Required

  • Feature coverage verifies an authorized administrator can see all three counts on the game-edit screen.
  • Feature coverage verifies nonzero counts are rendered for list, wishlist, and favorite associations.
  • Feature coverage verifies zero counts are rendered when the game has no associations.
  • Feature coverage verifies unauthorized users cannot use the admin game-edit surface to access the summary.

Progress Checklist

  • Identify the existing admin game-edit controller/action and view.
  • Use the existing game, list, wishlist, and favorite relationships or query patterns to calculate user counts.
  • Render a compact three-category summary at the bottom of the edit form.
  • Add focused feature tests for populated, empty, and unauthorized cases.
  • Run the affected PHP formatting and focused test checks before review.
Administrators need a quick summary of whether a game is used by lists, wishlists, or favorites before disabling or replacing it. The requested data is aggregate usage information; individual user names are out of scope. ## Scope - Add aggregate counts for users who have each game in lists, wishlists, and favorites. - Display the three counts in the existing admin game-edit view. - Load counts through the existing game/admin application patterns and preserve current authorization behavior. ## Acceptance Criteria - The admin game-edit screen shows separate counts for Lists, Wishlists, and Favorites. - Each count represents the number of users associated with the game in that category, with zero displayed when there are no associations. - The summary is visible without navigating to the public game page. - No user names or other personally identifying details are shown. - Existing game-edit behavior, validation, authorization, and disable/replace workflows remain unchanged. ## Test Coverage Required - Feature coverage verifies an authorized administrator can see all three counts on the game-edit screen. - Feature coverage verifies nonzero counts are rendered for list, wishlist, and favorite associations. - Feature coverage verifies zero counts are rendered when the game has no associations. - Feature coverage verifies unauthorized users cannot use the admin game-edit surface to access the summary. ## Progress Checklist - [x] Identify the existing admin game-edit controller/action and view. - [x] Use the existing game, list, wishlist, and favorite relationships or query patterns to calculate user counts. - [x] Render a compact three-category summary at the bottom of the edit form. - [x] Add focused feature tests for populated, empty, and unauthorized cases. - [x] Run the affected PHP formatting and focused test checks before review.
Codex changed title from The ability to see if a game is on someones list, wishlist or favorites when we edit games. to Show game usage counts on the admin edit screen 2026-08-27 03:32:01 -05:00
Codex self-assigned this 2026-10-19 10:52:23 -05:00
jimmyb 2026-10-19 12:37:45 -05:00
Member

Implemented in merged PR #989 (merge commit 7cdee59c).

The admin game-edit form now shows Lists, Wishlists, and Favorites totals immediately above the Save/Disable/Restore controls. Totals count distinct users per category, exclude soft-deleted associations, and display zero for unused games. The summary contains no associated user names, identifiers, or links. Existing staff permissions, validation, and disable/merge/restore behavior are preserved; disabled games remain editable.

Verification: 26 focused and admin-game regression tests passed (266 assertions), including duplicates, deleted associations, other games, disabled games, privacy, and access restrictions. Pint, PHPStan, frontend build, and diff checks passed. All five progress checklist items are complete. No database migrations or dependency changes are required.

Implemented in merged PR #989 (merge commit 7cdee59c). The admin game-edit form now shows Lists, Wishlists, and Favorites totals immediately above the Save/Disable/Restore controls. Totals count distinct users per category, exclude soft-deleted associations, and display zero for unused games. The summary contains no associated user names, identifiers, or links. Existing staff permissions, validation, and disable/merge/restore behavior are preserved; disabled games remain editable. Verification: 26 focused and admin-game regression tests passed (266 assertions), including duplicates, deleted associations, other games, disabled games, privacy, and access restrictions. Pint, PHPStan, frontend build, and diff checks passed. All five progress checklist items are complete. No database migrations or dependency changes are required.
Member

Deployment complete: merge revision 7cdee59c639a795b7d79ff3b951fec72b308e303 is deployed to development and production.

Both hosts passed PHP syntax checks, Blade compilation, deployed-file checksum verification, and release-manifest verification. Existing development overlays were preserved. Development HTTP and served-asset checks passed. Production loaded normally in the browser and redirected the protected admin edit URL to login; the generic scripted HTTP probe received 403. No database migrations or dependency installs were needed.

Rollback backups:

  • Development: /home/mvgldev/deploy-backups/issue937-7cdee59c-fhvulpcm
  • Production: /home/mvgl/deploy-backups/issue937-7cdee59c-3ocdwtd8

All progress checklist items remain checked; the issue is closed with status/done.

Deployment complete: merge revision `7cdee59c639a795b7d79ff3b951fec72b308e303` is deployed to development and production. Both hosts passed PHP syntax checks, Blade compilation, deployed-file checksum verification, and release-manifest verification. Existing development overlays were preserved. Development HTTP and served-asset checks passed. Production loaded normally in the browser and redirected the protected admin edit URL to login; the generic scripted HTTP probe received 403. No database migrations or dependency installs were needed. Rollback backups: - Development: `/home/mvgldev/deploy-backups/issue937-7cdee59c-fhvulpcm` - Production: `/home/mvgl/deploy-backups/issue937-7cdee59c-3ocdwtd8` All progress checklist items remain checked; the issue is closed with `status/done`.
Owner

Screenshot.

Screenshot.
Sign in to join this conversation.
No milestone
No assignees
3 participants
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#937
No description provided.