Add favorite and wishlist activity to Recent Gamer Updates #357

Closed
opened 2026-06-03 16:27:19 -05:00 by Veilor · 1 comment
Member

Adding or removing favorites and wishlist entries should create public Recent Gamer Updates activity, but the current favorite and wishlist action flows only update their own tables and return action feedback.

The affected routes are the authenticated favorite and wishlist actions:

  • /favorites/add/{gameId}
  • /favorites/remove/{gameId}
  • /wishlist/add/{gameId}
  • /wishlist/remove/{gameId}

In the current Laravel checkout, FavoriteController::store(), FavoriteController::destroy(), WishlistController::store(), and WishlistController::destroy() create, restore, or soft-delete the favorites and wishlists rows, but they do not write to the gamer_updates activity log. App\Support\RecentGamerUpdates also does not have dedicated display copy for favorite or wishlist activity types, so these actions cannot currently appear with clear feed messages.

Related but separate:

  • #346 tracks comment activity in Recent Gamer Updates.
  • #352 tracks deleted game-list entries rendering as misleading active status updates.
  • #3 tracks long-term Recent Gamer Updates storage/indexing strategy.

Scope

  • Authenticated favorite add/remove flows.
  • Authenticated wishlist add/remove flows.
  • FavoriteController, WishlistController, and any shared helper/service needed to avoid duplicate activity logging code.
  • App\Support\RecentGamerUpdates message mapping for favorite and wishlist activity types.
  • Homepage/sidebar Recent Gamer Updates card and /recent-gamer-updates page.
  • Existing favorite/wishlist table behavior, JSON responses, redirects, restore behavior, soft-delete behavior, and owner authorization should remain intact.

Acceptance Criteria

  • Adding a favorite creates a gamer_updates activity item for the acting user and game.
  • Removing a favorite creates a gamer_updates activity item for the acting user and game.
  • Adding a wishlist entry creates a gamer_updates activity item for the acting user and game.
  • Removing a wishlist entry creates a gamer_updates activity item for the acting user and game.
  • Restoring a previously soft-deleted favorite or wishlist row is treated as an add action in the feed.
  • Feed items include enough game metadata to link to the game page and show readable copy.
  • Feed copy uses dedicated favorite/wishlist wording instead of falling back to the generic "updated" message.
  • Existing banned/deleted user and hide_public_feed_entries filtering continues to apply.
  • Existing favorite and wishlist action responses still work for both normal redirects and JSON game-card actions.
  • Existing favorite and wishlist duplicate prevention and soft-delete restore behavior remains intact.

Test Coverage Required

  • Feature test proving adding a favorite writes and renders the expected Recent Gamer Updates item.
  • Feature test proving removing a favorite writes and renders the expected Recent Gamer Updates item.
  • Feature test proving adding a wishlist entry writes and renders the expected Recent Gamer Updates item.
  • Feature test proving removing a wishlist entry writes and renders the expected Recent Gamer Updates item.
  • Regression test proving restoring a soft-deleted favorite or wishlist row produces the add-style feed item without creating duplicate active rows.
  • Regression test proving existing redirect and JSON responses for favorite/wishlist actions are unchanged.
  • Regression test confirming RecentGamerUpdates still filters banned, deleted, soft-deleted, and feed-hidden users.
  • Run focused affected tests with php artisan test --compact.
  • Run vendor/bin/pint --dirty --format agent before closing the issue if PHP files are changed.

Progress Checklist

  • Favorite add/remove routes exist
  • Wishlist add/remove routes exist
  • Favorite actions currently create/restore/delete rows
  • Wishlist actions currently create/restore/delete rows
  • Favorite and wishlist actions currently do not write gamer_updates activity
  • RecentGamerUpdates currently lacks dedicated favorite/wishlist message branches
  • Add favorite-added activity logging
  • Add favorite-removed activity logging
  • Add wishlist-added activity logging
  • Add wishlist-removed activity logging
  • Add Recent Gamer Updates display copy for favorite and wishlist activity types
  • Preserve existing favorite/wishlist redirect and JSON behavior
  • Add focused feature and regression coverage
Adding or removing favorites and wishlist entries should create public Recent Gamer Updates activity, but the current favorite and wishlist action flows only update their own tables and return action feedback. The affected routes are the authenticated favorite and wishlist actions: - `/favorites/add/{gameId}` - `/favorites/remove/{gameId}` - `/wishlist/add/{gameId}` - `/wishlist/remove/{gameId}` In the current Laravel checkout, `FavoriteController::store()`, `FavoriteController::destroy()`, `WishlistController::store()`, and `WishlistController::destroy()` create, restore, or soft-delete the `favorites` and `wishlists` rows, but they do not write to the `gamer_updates` activity log. `App\Support\RecentGamerUpdates` also does not have dedicated display copy for favorite or wishlist activity types, so these actions cannot currently appear with clear feed messages. Related but separate: - #346 tracks comment activity in Recent Gamer Updates. - #352 tracks deleted game-list entries rendering as misleading active status updates. - #3 tracks long-term Recent Gamer Updates storage/indexing strategy. ## Scope - Authenticated favorite add/remove flows. - Authenticated wishlist add/remove flows. - `FavoriteController`, `WishlistController`, and any shared helper/service needed to avoid duplicate activity logging code. - `App\Support\RecentGamerUpdates` message mapping for favorite and wishlist activity types. - Homepage/sidebar Recent Gamer Updates card and `/recent-gamer-updates` page. - Existing favorite/wishlist table behavior, JSON responses, redirects, restore behavior, soft-delete behavior, and owner authorization should remain intact. ## Acceptance Criteria - Adding a favorite creates a `gamer_updates` activity item for the acting user and game. - Removing a favorite creates a `gamer_updates` activity item for the acting user and game. - Adding a wishlist entry creates a `gamer_updates` activity item for the acting user and game. - Removing a wishlist entry creates a `gamer_updates` activity item for the acting user and game. - Restoring a previously soft-deleted favorite or wishlist row is treated as an add action in the feed. - Feed items include enough game metadata to link to the game page and show readable copy. - Feed copy uses dedicated favorite/wishlist wording instead of falling back to the generic "updated" message. - Existing banned/deleted user and `hide_public_feed_entries` filtering continues to apply. - Existing favorite and wishlist action responses still work for both normal redirects and JSON game-card actions. - Existing favorite and wishlist duplicate prevention and soft-delete restore behavior remains intact. ## Test Coverage Required - Feature test proving adding a favorite writes and renders the expected Recent Gamer Updates item. - Feature test proving removing a favorite writes and renders the expected Recent Gamer Updates item. - Feature test proving adding a wishlist entry writes and renders the expected Recent Gamer Updates item. - Feature test proving removing a wishlist entry writes and renders the expected Recent Gamer Updates item. - Regression test proving restoring a soft-deleted favorite or wishlist row produces the add-style feed item without creating duplicate active rows. - Regression test proving existing redirect and JSON responses for favorite/wishlist actions are unchanged. - Regression test confirming `RecentGamerUpdates` still filters banned, deleted, soft-deleted, and feed-hidden users. - Run focused affected tests with `php artisan test --compact`. - Run `vendor/bin/pint --dirty --format agent` before closing the issue if PHP files are changed. ## Progress Checklist - [x] Favorite add/remove routes exist - [x] Wishlist add/remove routes exist - [x] Favorite actions currently create/restore/delete rows - [x] Wishlist actions currently create/restore/delete rows - [x] Favorite and wishlist actions currently do not write `gamer_updates` activity - [x] `RecentGamerUpdates` currently lacks dedicated favorite/wishlist message branches - [x] Add favorite-added activity logging - [x] Add favorite-removed activity logging - [x] Add wishlist-added activity logging - [x] Add wishlist-removed activity logging - [x] Add Recent Gamer Updates display copy for favorite and wishlist activity types - [x] Preserve existing favorite/wishlist redirect and JSON behavior - [x] Add focused feature and regression coverage
Codex changed title from Fix wishlist and favorite actions not producing entries in recent gamer updates page to Add favorite and wishlist activity to Recent Gamer Updates 2026-06-03 17:13:25 -05:00
jimmyb self-assigned this 2026-06-03 19:29:22 -05:00
Member

Implemented in c69934d (Add favorite and wishlist gamer updates).

Notes:

  • Favorite and wishlist add/remove routes now write gamer_updates activity only when the underlying row state changes.
  • Restoring a soft-deleted favorite or wishlist row logs the add-style feed event; repeated add requests against already-active rows stay idempotent and do not create duplicate feed items.
  • Activity payloads include game id/name/url and platform id/name so Recent Gamer Updates can link to the game and render dedicated copy.
  • Focused verification passed: php artisan test --compact tests/Feature/FavoriteTest.php tests/Feature/WishlistTest.php tests/Feature/RecentGamerUpdatesPageTest.php (57 tests, 368 assertions) and vendor/bin/pint --dirty --format agent.
Implemented in c69934d (`Add favorite and wishlist gamer updates`). Notes: - Favorite and wishlist add/remove routes now write `gamer_updates` activity only when the underlying row state changes. - Restoring a soft-deleted favorite or wishlist row logs the add-style feed event; repeated add requests against already-active rows stay idempotent and do not create duplicate feed items. - Activity payloads include game id/name/url and platform id/name so Recent Gamer Updates can link to the game and render dedicated copy. - Focused verification passed: `php artisan test --compact tests/Feature/FavoriteTest.php tests/Feature/WishlistTest.php tests/Feature/RecentGamerUpdatesPageTest.php` (57 tests, 368 assertions) and `vendor/bin/pint --dirty --format agent`.
Codex closed this issue 2026-06-03 20:23:28 -05:00
Sign in to join this conversation.
No milestone
No assignees
2 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#357
No description provided.