The web app had four near-identical track row components (songs, playlist, album, queue), each re-implementing the cover, favorite star and explicit badge, plus five copies of the handleMediaAction switch. Searching a playlist also renumbered tracks from 1 instead of showing their playlist position.
components/track-row.tsx: one memoized TrackRow with a variant (library, album, playlist, queue). Callbacks take the row index or song id, so views pass one stable handler for every row (works for the virtualized SongsView).
hooks/use-media-actions.ts: useMediaActions (song and artist actions) and useTrackListMediaAction (targets the selection or the row's song, resolves the station artist).
selection-range-styles.tsx: the songs/queue highlight copies collapse into a flush prop.
Playlist rows show their real position while filtering; drag to reorder stays disabled while filtering.
Small differences: playlist rows now show the explicit badge like the other lists. track-row.tsx keeps a local formatDuration, which #94 can fold into the shared helper.
Verified in headless Chrome against the test server: songs (range select, multi-select menu counts, double-click play), album, playlist (search keeps track number 41, rows not draggable while filtered), artist pages and the queue panel. Web typecheck and lint pass.
The web app had four near-identical track row components (songs, playlist, album, queue), each re-implementing the cover, favorite star and explicit badge, plus five copies of the `handleMediaAction` switch. Searching a playlist also renumbered tracks from 1 instead of showing their playlist position.
- `components/track-row.tsx`: one memoized `TrackRow` with a `variant` (`library`, `album`, `playlist`, `queue`). Callbacks take the row index or song id, so views pass one stable handler for every row (works for the virtualized `SongsView`).
- `hooks/use-media-actions.ts`: `useMediaActions` (song and artist actions) and `useTrackListMediaAction` (targets the selection or the row's song, resolves the station artist).
- `selection-range-styles.tsx`: the songs/queue highlight copies collapse into a `flush` prop.
- Playlist rows show their real position while filtering; drag to reorder stays disabled while filtering.
Small differences: playlist rows now show the explicit badge like the other lists. `track-row.tsx` keeps a local `formatDuration`, which #94 can fold into the shared helper.
Verified in headless Chrome against the test server: songs (range select, multi-select menu counts, double-click play), album, playlist (search keeps track number 41, rows not draggable while filtered), artist pages and the queue panel. Web typecheck and lint pass.
Made by Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Replace SongRow, PlaylistSongRow, album TrackRow and QueueSongRow with a
memoized TrackRow that takes a variant, and replace the five
handleMediaAction switches with useMediaActions/useTrackListMediaAction.
Playlist rows now show each song's real playlist position while filtering
instead of renumbering from 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The web app had four near-identical track row components (songs, playlist, album, queue), each re-implementing the cover, favorite star and explicit badge, plus five copies of the
handleMediaActionswitch. Searching a playlist also renumbered tracks from 1 instead of showing their playlist position.components/track-row.tsx: one memoizedTrackRowwith avariant(library,album,playlist,queue). Callbacks take the row index or song id, so views pass one stable handler for every row (works for the virtualizedSongsView).hooks/use-media-actions.ts:useMediaActions(song and artist actions) anduseTrackListMediaAction(targets the selection or the row's song, resolves the station artist).selection-range-styles.tsx: the songs/queue highlight copies collapse into aflushprop.Small differences: playlist rows now show the explicit badge like the other lists.
track-row.tsxkeeps a localformatDuration, which #94 can fold into the shared helper.Verified in headless Chrome against the test server: songs (range select, multi-select menu counts, double-click play), album, playlist (search keeps track number 41, rows not draggable while filtered), artist pages and the queue panel. Web typecheck and lint pass.
Made by Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code