Stream sync improvements:
- Server now sends changed_at timestamp + raw remaining seconds
- Client schedules UI updates based on changed_at + measured buffer lag
- Removed server-side delay logic entirely
- Poll interval set to 10s (was 15s, briefly 5s which caused issues)
Connection exhaustion fix:
- Added in-flight guards to update-mini-now-playing and poll-now-playing
- Prevents fetch pileup when server is slow or stalled
- Each poller skips if previous request hasn't completed
Other:
- Include changed_at in now-playing JSON API response
- Replace em dashes with hyphens throughout
- Update cl-streamer submodule (get-metadata-changed-at export)
Multi-pronged attempt to fix cumulative lag between audio playback,
now-playing display, and browser notifications:
== Synchronization (work in progress) ==
- Server-side time-based metadata delay via get-listener-now-playing
with configurable *browser-buffer-seconds* parameter
- First track after restart syncs perfectly; subsequent tracks drift
due to browser audio buffer bloat (buffer grows unbounded over time)
- Added client-side buffer bloat detection: monitors audio.buffered
vs audio.currentTime and auto-reconnects when buffer exceeds 15s
- Added [STREAM-SYNC], [NOTIFY], [BUFFER] diagnostic logging to
browser console for ongoing diagnosis
== Countdown timer ==
- Server exposes remaining seconds via pipeline-track-remaining
- now-playing JSON API includes 'remaining' field adjusted for
browser buffer delay
- Player frame shows [mm:ss] countdown next to track title
- Main page now-playing area also shows countdown with its own
polling (15s interval) and local 1-second ticker
- LASS styles for .track-countdown and .track-countdown-mini
== Playback state fix ==
- Fixed save-playback-state saving one track ahead of what was
actually playing (was saving the track loading during crossfade)
- Uses *pending-save-file* with one-track delay so the saved state
reflects the track that was actually heard
== Notifications ==
- All notification conditions working correctly per diagnostic logs
- show-track-notification logs supported/permission/enabled/last/title
- Notifications fire consistently on track changes