Files
music_library/backlog/completed/ml-52 - Collection-Wishlist-Show-LiveViews-duplication.md
T
Claudio Ortolina 2a688e2309 Cleanup old tasks
2026-04-24 09:58:09 +01:00

1.0 KiB

id, title, status, assignee, created_date, labels, dependencies, references, priority
id title status assignee created_date labels dependencies references priority
ML-52 Collection/Wishlist Show LiveViews duplication Done
2026-04-20 08:53
https://github.com/cloud8421/music_library/issues/123
medium

Description

GitHub: created 2026-03-22 · updated 2026-03-22 · closed 2026-03-22

Description

CollectionLive.Show (611 lines) and WishlistLive.Show (462 lines) have near-identical handle_event implementations for shared operations: refresh_musicbrainz_data, refresh_cover, populate_genres. The error handling, success messaging, and state management patterns are functionally identical, meeting the project's 3+ duplication extraction threshold.

Files

  • lib/music_library_web/live/collection_live/show.ex
  • lib/music_library_web/live/wishlist_live/show.ex

Suggested approach

Extract shared record action handlers into a helper module that both LiveViews can delegate to.