useWaveform.ts: - Remove requestAnimationFrame polling loop that was re-running after every re-initialization and leaking across renders when cleanup didn't fire - Remove local useState for isPlaying/currentTime/duration; these now come directly from usePlayerStore selectors — WaveSurfer event handlers in AudioService already write to the store, so no intermediate sync needed - The useEffect is now a clean async init only; no cleanup needed (AudioService persists intentionally across page navigations) tests/: - Delete 3 obsolete test files that tested removed APIs (logging system, setupAudioContext, ensureAudioContext, initializeAudioContext) - Add tests/audioService.test.ts: 25 tests covering initialize(), play(), pause(), seekTo(), cleanup(), and all WaveSurfer event→store mappings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 KiB
11 KiB