Repository navigation
Hear a scanned record before adding it: tracks play from the scan sheet - #67
Open
titomazzetta wants to merge 1 commit into
Open
titomazzetta wants to merge 1 commit into
titomazzetta wants to merge 1 commit into
Conversation
Tito's note after the first stack he scanned: "when I have all the pictures there, I should be able to press play to preview those tracks." The rows had a play icon on them and only ticked. Each track with a clip is now a play button — the record plays from there as a detour, the search column's play (playFromSearch), so Back to shuffle returns you — and the card has Play the record. The tick box is its own 44px target at the left, so ticking and playing never cross. The sheet stays open while it plays: the row that's playing says so, pauses on a second tap (api.toggle), and the chip reads Pause / Resume while its record is in the player. Record-only tracks stay plain rows. No new route, no new data: the detour and the external-details list are the ones a search result already uses. flows11: 32 checks (8 new — play, pause, resume, a second track, the ticks untouched). README and Help say so. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017abo1WFB5W1nAccTKsjJo3
This branch has not been deployed
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.
Why
Tito's note after the first stack he scanned on the live site: "when I have all the pictures there, I should be able to press play to preview those tracks, if possible, from that record." The rows on a scan card had a play icon on them and only ticked — a promise the sheet didn't keep. The search column already plays a result's tracks; the scan sheet is the same moment (record in hand, deciding) and should play the same way.
What changed
playFromSearch): the release joins the previews if it isn't yours, the record plays in running order, and Back to shuffle in the player returns you where you were. Play the record on the card starts it from the top.api.toggle), and the card's chip reads Pause / Resume while its record is in the player. Tap another track and it plays from there.role="checkbox", named for the track); the title is the play button. Record-only tracks are plain rows, marked record only, still tickable.components/ScanSheet.tsx(new propsplayingKey,playing,onPlay,onToggle),components/CrateApp.tsx(the wiring:current?.key,api.status,playFromSearch,api.toggle).Security
Nothing new crosses a boundary. No new route, no new request, no new data: the detour and the external-details list (in memory, capped at 60) are the ones a search result's play already uses, and the adds still go through the same
PATCH /api/playlists/[id],POST /api/collectionandPUT /api/wantlistwith every rule they have. The photo path is untouched. THREAT_MODEL unchanged.Tests
flows11.mjs): 32 checks, 8 new, Chromium against the fake Discogs with YouTube stubbed and the reader stubbed at the browser. A card has Play the record; each track with a clip is a play button and a record-only track isn't; tapping a track plays it (the row says playing, the chip offers Pause, Back to shuffle is there underneath, the stub player holds that clip); playing didn't touch the ticks; a second tap pauses (paused, Resume); another track plays from there and the first is a plain row again. Then the existing checks: untick one, add six in photo order, the wantlist path, the phone layout.lib/change).How to check
No database step, no environment change.
🤖 Generated with Claude Code
https://claude.ai/code/session_017abo1WFB5W1nAccTKsjJo3