fix(ui): confirm before deleting a track + artwork fallback on load error - #32
Merged
Merged
Conversation
…rror #7: "Delete from library" permanently removed the track and its audio bytes on a single tap, sitting right below benign actions in the ⋯ sheet — a mis-tap was irreversible. Route it through ConfirmModal (as delete-playlist already does): the track is only removed after an explicit confirm; Cancel leaves the sheet open and the track intact. #13: Artwork rendered a present thumbnail URL with no onError handler, so an expired/offline/deleted YouTube thumbnail showed the browser's broken-image glyph. Add onError to fall back to the existing deterministic gradient tile, resetting the failure flag when the URL changes (the component is reused across rows). Verified in-browser: a broken thumbnail renders the gradient placeholder (no img); delete shows a confirm dialog and only removes the track on confirm, not on Cancel. Fixes #7. Fixes #13. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkDKh1Uo1a4D7n5wCKdcKF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7. Fixes #13.
#7 — one-tap destructive delete
"Delete from library" permanently removed the track and its audio bytes on a single tap, sitting right below benign actions (Play next / Add to queue / Favorite) in the ⋯ sheet — a mis-tap was irreversible. Now routed through
ConfirmModal(like delete-playlist already is): the track is only removed after an explicit confirm; Cancel leaves the sheet open and the track intact.#13 — broken-image glyph on thumbnails
Artworkrendered a present thumbnail URL with noonError, so an expired/offline/deleted YouTube thumbnail showed the browser's broken-image glyph. AddedonErrorto fall back to the existing deterministic gradient tile, resetting the flag when the URL changes (the component is reused across rows).Verification
Built clean; behavioral test:
<img>.artwork--ph=1,img=0 ✅🤖 Generated with Claude Code
Generated by Claude Code