diff --git a/.planning/phases/02-backing-track-seek-controls/02-01-ISSUES.md b/.planning/phases/02-backing-track-seek-controls/02-01-ISSUES.md new file mode 100644 index 000000000..0b9327fe8 --- /dev/null +++ b/.planning/phases/02-backing-track-seek-controls/02-01-ISSUES.md @@ -0,0 +1,116 @@ +# UAT Issues: Phase 2 Plan 1 + +**Tested:** 2026-01-13 +**Source:** .planning/phases/02-backing-track-seek-controls/02-01-SUMMARY.md +**Tester:** User via /gsd:verify-work + +## Open Issues + +### UAT-001: Backing track player fails to open - Redux immutability violation + +**Discovered:** 2026-01-13 +**Phase/Plan:** 02-01 +**Severity:** Blocker +**Feature:** Backing track player opening +**Description:** When selecting an audio file from the file browser, the backing track player does not open. Console shows Redux state mutation error preventing the player from launching. +**Expected:** After selecting an audio file, the backing track player should open with the file loaded and ready to play +**Actual:** File browser closes, but player doesn't open. Redux throws immutability violation error +**Error Message:** +``` +JKSessionScreen: Error opening backing track: Error: Invariant failed: A state mutation was detected between dispatches, in the path 'activeSession.backingTrackData.jamClient.app'. This may cause incorrect behavior. +``` +**Repro:** +1. Launch jam-ui application +2. Navigate to session screen +3. Click "Open" menu → "Backing Track" +4. Select any audio file from file browser +5. Observe error in console, player does not open + +**Impact:** Cannot test any seek functionality since player cannot be opened. This blocks all Phase 2 testing. + +**Root Cause:** Code in `JKSessionScreen.js:830` (handleBackingTrackSelected) is mutating Redux state at path `activeSession.backingTrackData.jamClient.app` instead of creating a new immutable state object. + +**Resolution:** Fixed in commit `94d43fe9c` - Removed jamClient from Redux state, pass as prop instead. + +### UAT-002: NaN values displayed, slider positioning incorrectly + +**Discovered:** 2026-01-13 +**Phase/Plan:** 02-01 +**Severity:** Blocker +**Feature:** Playback monitoring and seek controls +**Description:** When playing backing track, time displays showed "NaN:NaN" and slider jumped to incorrect position. No audio was heard. +**Expected:** Time displays show actual values (e.g., "0:00", "3:49"), slider reflects current position, audio plays +**Actual:** "NaN:NaN" displayed, slider at middle position, no audio +**Root Cause:** +1. jamClient methods return Promises but code called them synchronously without await +2. jamClient returns string values ('0', '228818') not numbers +3. SessionStartPlay() missing required playback mode parameter (1) +**Repro:** +1. Open backing track player +2. Click play button +3. Observe NaN values and incorrect slider + +**Resolution:** Fixed in commits `0561c8988`, `2a435806e`, `2c5ba2f4b`: +- Added await for async jamClient calls +- Added parseInt() to convert string returns to numbers +- Added playback mode parameter 1 to SessionStartPlay() + +### UAT-003: Seek while paused doesn't take effect until next play + +**Discovered:** 2026-01-13 +**Phase/Plan:** 02-01 +**Severity:** Minor +**Feature:** Seek controls while paused +**Description:** When track is paused and user drags slider to new position, the seek doesn't take effect immediately. On resume, audio plays from old position to end, then on next play it starts from the seeked position. +**Expected:** +1. Pause at position A +2. Drag slider to position B +3. Resume play → audio should play from position B +**Actual:** +1. Pause at position A +2. Drag slider to position B (slider visually moves) +3. Resume play → audio plays from position A to end +4. Slider resets to 0:00 +5. Play again → slider jumps to position B and plays from there +**Impact:** Confusing UX when seeking while paused. Seek during playback works correctly. +**Possible Cause:** jamClient.SessionTrackSeekMs() may not register when track is paused, or needs explicit state sync. + +### UAT-004: Seek to end while paused breaks player + +**Discovered:** 2026-01-14 +**Phase/Plan:** 02-01 +**Severity:** Blocker +**Feature:** Seek controls edge case +**Description:** When paused and seeking to the very end of the track, then clicking play, the player enters a broken state where it won't play audio anymore. +**Expected:** +1. Pause audio +2. Drag slider to end +3. Click play → should play briefly from near end or restart from beginning +**Actual:** +1. Pause audio +2. Drag slider to end (slider stays at end visually) +3. Click play → slider jumps to 0:00, no audio plays +4. Subsequent play button clicks do nothing - player is broken +**Impact:** Player becomes non-functional, requires closing and reopening. +**Root Cause:** When position >= duration, jamClient enters end-of-track state. Calling SessionStartPlay() without resetting causes undefined behavior and breaks the player. +**Resolution:** Fixed in commit `ba93f1a27` - Added logic to detect when position is at/near end (within 100ms), calls SessionStopPlay() to reset state, seeks to 0, then starts playback normally. + +## Resolved Issues + +### UAT-001: Backing track player fails to open - Redux immutability violation +**Resolved:** 2026-01-13 - Fixed in commit `94d43fe9c` +**Solution:** Removed jamClient from Redux state, now passed as direct prop + +### UAT-002: NaN values displayed, slider positioning incorrectly +**Resolved:** 2026-01-13 - Fixed in commits `0561c8988`, `2a435806e`, `2c5ba2f4b` +**Solution:** Added await for async calls, parseInt for string values, playback mode parameter + +### UAT-004: Seek to end while paused breaks player +**Resolved:** 2026-01-14 - Fixed in commit `ba93f1a27` +**Solution:** Detect end-of-track position (within 100ms of duration), call SessionStopPlay() to reset, seek to 0, then start playback + +--- + +*Phase: 02-backing-track-seek-controls* +*Plan: 01* +*Tested: 2026-01-13*