Commit Graph

8288 Commits

Author SHA1 Message Date
Nuwan 51f7cb105a docs(v1.6): descope Phase 28 - metronome responsiveness satisfactory
Removed Phase 28 (Metronome Responsiveness) from v1.6 milestone.
Metronome responsiveness is satisfactory after Phase 26-27 improvements.

MET-01, MET-02 requirements moved to Out of Scope.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 16:31:17 +05:30
Nuwan 388dfe16f8 fix: prevent opening multiple media players simultaneously
- Add media state tracking to JKSessionOpenMenu component
- Disable menu items when any media (JamTrack, Backing Track, Metronome) is open
- Show warning toast when user attempts to open another media type
- Update backing track and metronome track styling and icons
- Adjust close button styling in session screen media sections
- Handle cancelled file selection dialog for backing tracks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 16:08:41 +05:30
Nuwan fd8900c15b media players related updates 2026-03-03 09:47:59 +05:30
Nuwan eb65785e3d fix(27): restore stylesheet copying to popup windows
The stylesheet copying code was accidentally removed in aa731c96d,
causing popup windows (metronome, backing track) to render without
CSS styles. This restores the code that copies all <link> and <style>
elements from the parent window to the popup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 19:17:26 +05:30
Nuwan 3da5f8938e docs(27): add debug notes and verification documentation
- Add jamtrack stems debug notes
- Add phase 26 verification v2 documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 19:04:42 +05:30
Nuwan b674a7e1b8 style(27): update media player icons and popup dimensions
- Change play/stop icon colors from black (#000000) to blue (#2c7be5)
- Adjust JamTrack player dimensions to 420x220px
- Reduce backing track popup height from 400 to 250px

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 19:03:31 +05:30
Nuwan 5349dc0d63 fix(27): fix backing track player end detection, loop, and close
- Detect track end via position reset (>80% to <20%) since native client
  auto-loops without updating isSessionTrackPlaying state
- Implement manual looping: Stop → Seek to 0 → Play when loop enabled
- Fix Close button to use onClose callback for proper WindowPortal cleanup
- Add boolean conversion for isSessionTrackPlaying (handles string/number)
- Clean up debug console.log statements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 19:01:47 +05:30
Nuwan 79ddf613f9 fix(27): do full reset sequence when playing from beginning
Native client needs Stop -> Seek(0) -> Play sequence to reliably
start playback after track has finished. Previously we only did
this when "atEnd", but after track finishes and resets to 0, the
"atEnd" check is false.

Fix: Also do the full reset sequence when position is at the
beginning (< 100ms). This ensures native client is in the right
state whether starting fresh or restarting after track finished.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 13:39:15 +05:30
Nuwan fe589f4ac2 fix(27): seek native client to start when backing track ends
When track reaches end:
- UI was reset to position 0
- Native client was NOT seeked to position 0

Result: First play click failed because native client was still at end,
but UI showed position 0 so atEnd check was false and no seek was done.

Fix: Call SessionTrackSeekMs(0) when track ends, so native client
position matches UI state and next play works immediately.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-02 13:28:58 +05:30
Nuwan d59fdae944 fix(27): prevent session refresh from clearing local backing tracks
Race condition: when opening backing track, the sequence was:
1. Local state set from native client (my previous fix)
2. Native callback triggers refreshCurrentSession
3. Server hasn't received sync yet, returns empty backing_tracks
4. dispatch(setBackingTracks([])) clears local data
5. Track disappears

Fix: Only dispatch setBackingTracks if server has data. When user
closes backing track, closeMedia action clears the state directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-01 23:53:45 +05:30
Nuwan c0c6e33863 fix(27): correct MediaTrackGroup ID from 8 to 6
MediaTrackGroup is 6 (not 8) per globals.js ChannelGroupIds.
8 is StreamOutChatGroup, which is why no backing tracks were found.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-01 20:15:26 +05:30
Nuwan 2ea18d59ea fix(27): populate backing track Redux state from native client
After opening a backing track file via native client:
1. Call SessionGetAllControlState(true) to get track info
2. Extract backing track data (id, rid, filename, shortFilename)
3. Dispatch to both Redux slices:
   - activeSessionSlice.addBackingTrack (for track sync)
   - mediaSlice.setBackingTracks (for session screen UI)

Also fixes syncTracksToServer calls that incorrectly passed jamClient
object instead of server.clientId.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 01:00:54 +05:30
Nuwan e35163ec84 docs(27): complete Backing Track Sync phase
- Phase 27 verified: 2/2 must-haves confirmed
- BT-01: openBackingTrack action enables session screen sync
- BT-02: ignore flag prevents unmount warnings
- ROADMAP.md, STATE.md, REQUIREMENTS.md updated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 17:25:08 +05:30
Nuwan 748e01f60a docs(27-01): complete backing track sync plan
Tasks completed: 2/2
- Use openBackingTrack action in handleBackingTrackSelected
- Add ignore flag to duration fetch useEffect

SUMMARY: .planning/phases/27-backing-track-sync/27-01-SUMMARY.md
2026-02-26 17:21:22 +05:30
Nuwan bba12ac905 fix(27-01): add ignore flag to prevent unmount state updates
- Add let ignore = false at start of duration fetch useEffect
- Check ignore flag after async jamClient call
- Add cleanup function that sets ignore = true
- Prevents 'state update on unmounted component' React warnings
  when closing backing track popup quickly
2026-02-26 17:20:35 +05:30
Nuwan d958b26008 feat(27-01): use openBackingTrack action for session screen sync
- Replace direct jamClient.SessionOpenBackingTrackFile() call with
  openBackingTrack() action from useMediaActions
- This enables backing track sync to session screen via:
  1. jamClient call (via thunk)
  2. Redux mediaSummary.backingTrackOpen state update
  3. syncTracksToServer call for server-side sync
2026-02-26 17:20:28 +05:30
Nuwan c7f6480137 docs(27): create phase plan for backing track sync
Phase 27: Backing Track Sync
- 1 plan in 1 wave
- 2 tasks (both auto)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 16:55:35 +05:30
Nuwan 12ce12420f docs(27): research backing track sync domain
Phase 27: Backing Track Sync
- Standard stack identified (existing React/Redux patterns)
- Architecture patterns documented (openBackingTrack action, ignore flag)
- Pitfalls catalogued (bypassing Redux, race conditions)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 16:53:05 +05:30
Nuwan 3d847ece7f fix(26): pass jamServer to loadJamTrack and improve error handling
- Add jamServer to useMediaActions by creating object from subscribe/unsubscribe
- Pass jamServer to loadJamTrackThunk so it can subscribe to packaging progress
- Improve error handling to extract message from Response objects (not just Error)
- Fixes "Failed to start packaging: undefined" error

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 11:52:53 +05:30
Nuwan e4300aecb4 docs(26): complete JamTrack Polish phase with gap closure round 2 2026-02-25 23:51:01 +05:30
Nuwan 5a7f29e3e6 fix(26): orchestrator corrections - update planning docs 2026-02-25 23:47:07 +05:30
Nuwan 38aacb49a5 docs(26-04): complete trigger download flow plan
Tasks completed: 2/2
- Task 1: Call loadJamTrack when track is not synchronized
- Task 2: Build verification (syntax validated via Babel parser)

SUMMARY: .planning/phases/26-jamtrack-polish/26-04-SUMMARY.md
2026-02-25 23:46:46 +05:30
Nuwan 6d92e93a63 feat(26-04): call loadJamTrack when track is not synchronized
- Added loadJamTrack call in handleJamTrackSelect else branch
- When syncResult.isSynchronized is false, triggers download flow
- This transitions state through checking → packaging → downloading → keying → synchronized
- Fixes empty JamTrack player for non-synchronized tracks
2026-02-25 23:44:45 +05:30
Nuwan 6423df4b7b docs(26): complete JamTrack Polish phase with gap closure 2026-02-25 23:24:34 +05:30
Nuwan b52e822bf7 fix(26-03): restore JamTrack popup window dimensions to 460x350 2026-02-25 23:21:15 +05:30
Nuwan 4e5192d52f docs(26-03): complete JamTrack stems/controls render timing fix
Tasks completed: 4/4
- Task 1: Call checkJamTrackSync in handleJamTrackSelect
- Task 2: Remove 'idle' from stems render condition
- Task 3: Remove 'idle' from controls render condition
- Task 4: Build verification

SUMMARY: .planning/phases/26-jamtrack-polish/26-03-SUMMARY.md
2026-02-25 23:17:32 +05:30
Nuwan d529c6c7e4 fix(26-03): remove 'idle' from controls render condition in JKSessionJamTrackPlayer
- Change condition from 'idle' OR 'synchronized' to only 'synchronized'
- Controls only appear after JamTrack is synchronized with backend
- Download progress UI handles loading states appropriately
2026-02-25 23:14:17 +05:30
Nuwan d11ce7189d fix(26-03): remove 'idle' from stems render condition in JKSessionScreen
- Change condition from 'synchronized' OR 'idle' to only 'synchronized'
- Stems only appear after JamTrack is synchronized with backend
- Already-synchronized tracks show stems immediately (checkJamTrackSync returns synchronized)
2026-02-25 23:13:24 +05:30
Nuwan 407b2f1410 feat(26-03): call checkJamTrackSync before dispatching UI state in handleJamTrackSelect
- Import checkJamTrackSync from mediaSlice
- Call checkJamTrackSync BEFORE setSelectedJamTrack/setJamTrackStems
- Show different toast messages based on sync state
- This ensures downloadState transitions from 'idle' appropriately
2026-02-25 23:12:37 +05:30
Nuwan 41463c9863 docs(26): create gap closure plan for stems/controls render timing
Phase 26: JamTrack Polish
- Plan 26-03 removes 'idle' from valid render states
- Closes UAT gap: stems/controls appearing before sync
- 1 plan in wave 3, depends on 26-02

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 22:59:46 +05:30
Nuwan 156b1039e8 test(26): complete UAT - 3 passed, 1 issue
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 22:53:41 +05:30
Nuwan 634d86f43b docs(26): complete JamTrack Polish phase
- Phase 26 verified: 4/4 must-haves passed
- Requirements JT-01 through JT-04 complete
- Ready for Phase 27 (Backing Track Sync)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 19:18:41 +05:30
Nuwan f46c0ebc01 docs(26): update PROJECT.md for v1.6 milestone
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 19:15:42 +05:30
Nuwan 00b912f801 docs(26-02): complete JamTrack callback cleanup plan
Tasks completed: 3/3
- Add callback cleanup action to mediaSlice
- Call cleanup on unmount and defer controls rendering
- Build verification

SUMMARY: .planning/phases/26-jamtrack-polish/26-02-SUMMARY.md
2026-02-25 19:15:12 +05:30
Nuwan dbaaba82f9 feat(26-02): cleanup callbacks on unmount and defer controls rendering
- Import and call cleanupJamTrackCallbacks in cleanup useEffect
- Wrap controls section in condition: only render when downloadState
  is 'idle' or 'synchronized' and not in initial loading
- Fixes memory leak from orphaned window.jamTrackDownload* globals
- Fixes UX issue where controls appeared before track ready
2026-02-25 19:13:42 +05:30
Nuwan 90d3fd29dd feat(26-02): add cleanupJamTrackCallbacks to mediaSlice
- Add cleanup function for window.jamTrackDownload* globals
- Prevents memory leaks from orphaned callbacks when closing JamTrack
- Pattern matches useRecordingHelpers.js cleanup approach
2026-02-25 19:12:34 +05:30
Nuwan 2314c29b9e docs(26-01): complete JamTrack player fixes plan
Tasks completed: 2/2
- Fix WindowPortal sizing for JamTrack player
- Implement create custom mix navigation

SUMMARY: .planning/phases/26-jamtrack-polish/26-01-SUMMARY.md
2026-02-25 19:11:29 +05:30
Nuwan 7038f617cf feat(26-01): implement create custom mix navigation
- Replace TODO console.log with actual navigation
- Open JamTrack editor at /jamtracks/{id} in new tab
- Use noopener,noreferrer for security best practices
2026-02-25 19:10:19 +05:30
Nuwan d79911caa8 fix(26-01): correct WindowPortal sizing for JamTrack player
- Change window dimensions from 600x500 to 460x350
- Disable scrollbars since content now fits properly
- Player content is 420px wide + 20px padding on each side
2026-02-25 19:10:01 +05:30
Nuwan 48c9bf8313 docs(26): create phase plan for JamTrack Polish
Phase 26: JamTrack Polish
- 2 plan(s) in 2 wave(s)
- Wave 1: 26-01 (UI fixes - sizing, navigation)
- Wave 2: 26-02 (state/callback fixes - cleanup, deferred rendering)
- Ready for execution

Requirements covered:
- JT-01: Defer UI rendering until track ready
- JT-02: Fix WindowPortal sizing (460x350)
- JT-03: Implement create custom mix navigation
- JT-04: Add callback cleanup for jamTrackDownload* globals

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 19:05:14 +05:30
Nuwan eab0b0d19a docs(v1.6): create roadmap for Media Features Polish
- 3 phases: JamTrack Polish, Backing Track Sync, Metronome Responsiveness
- 8 requirements mapped to phases
- Research complete for all features

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 18:51:18 +05:30
Nuwan daaa37a84e chore: complete v1.5 milestone
Archived:
- milestones/v1.5-ROADMAP.md
- milestones/v1.5-REQUIREMENTS.md
- milestones/v1.5-MILESTONE-AUDIT.md

Deleted (fresh for next milestone):
- ROADMAP.md
- REQUIREMENTS.md

Updated:
- MILESTONES.md (new entry)
- PROJECT.md (requirements → Validated)
- STATE.md (reset for next milestone)

v1.5 Fix Session Recording shipped:
- Fixed C++ client crash on Start Recording (JSON parsing)
- Fixed memory leaks in recording modal
- User verified 15+ minute recording stability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 11:56:26 +05:30
Nuwan 2292cb4fd6 docs: audit v1.5 milestone before completion
Findings:
- Recording crash fixed (JSON parsing, not method names)
- Memory leaks fixed (timer/callback/async cleanup)
- Tech debt: 24-VERIFICATION.md describes reverted code
- Tech debt: CTRL requirements unmapped in roadmap

Status: tech_debt (shippable, documentation inconsistencies)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 00:31:58 +05:30
Nuwan 585b7f9cc1 docs(25): complete Memory Leak Audit phase
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 00:03:41 +05:30
Nuwan af71f8e500 docs(25-01): complete memory leak audit plan
Tasks completed: 4/4
- Fix timer and callback cleanup in useRecordingHelpers
- Fix async cleanup in JKSessionRecordingModal
- Create UAT checklist for memory verification
- Verify memory stability with UAT checklist (user approved)

SUMMARY: .planning/phases/25-memory-leak-audit/25-01-SUMMARY.md
2026-02-24 23:59:52 +05:30
Nuwan 32ee0e8b10 docs(25-01): create UAT checklist for recording memory verification
- 5 comprehensive test sections covering all memory leak scenarios
- Timer cleanup verification test
- Callback accumulation verification test
- Async operation cleanup verification test
- 15-minute modal idle stability test
- 15-minute active recording stability test
- Troubleshooting guide for each failure type
2026-02-24 23:20:38 +05:30
Nuwan 1c1e7e4a3f fix(25-01): add async cleanup in JKSessionRecordingModal
- Add ignore flag pattern to audio preference useEffect
- Add ignore flag pattern to video sources useEffect
- Guard state updates with !ignore check
- Prevents "state update on unmounted component" warnings
2026-02-24 23:19:31 +05:30
Nuwan ef3d7a630e fix(25-01): add timer and callback cleanup in useRecordingHelpers
- Add useEffect cleanup for waitingOnStopTimer on unmount
- Add conditional cleanup for window.JK callbacks
- Track callback references to avoid deleting shared callbacks
- Prevents memory leaks from accumulated timers and callbacks
2026-02-24 23:19:00 +05:30
Nuwan 445e4834a6 fix(25): revise plan based on checker feedback
- Added Task 3 to create 25-UAT.md (requirement_coverage blocker)
- Renumbered checkpoint task from 3 to 4
- Simplified key_links[0] pattern to 'delete window\.JK' (warning fix)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 22:51:29 +05:30
Nuwan 5f7f0fda76 docs(25): create phase plan for memory leak audit
Phase 25: Memory Leak Audit
- 1 plan in 1 wave
- 2 auto tasks + 1 human-verify checkpoint
- Fixes timer cleanup, callback cleanup, async cleanup
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 22:48:03 +05:30