feat: timed comments on tracks (#359)
* feat: add timed comments on tracks
- add TrackComment model with timestamp_ms for positioning
- add allow_comments toggle to UserPreferences (off by default)
- add ATProto fm.plyr.comment record support
- add GET/POST/DELETE endpoints for comments API
- add frontend UI for viewing comments on track page
- add toggle in portal settings for artists
- limit to 20 comments per track
- comments ordered by timestamp for playback sync
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: play button resume and clickable comment timestamps
- fix play button not resuming after pause (check if track is loaded, not playing state)
- make comment timestamps clickable to seek to that point in the song
- fix layout overlap with share button (add flex-direction: column to main)
- make comments section more compact with scroll overflow
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: extract _make_pds_request utility for ATProto record operations
consolidates duplicated OAuth session handling and token refresh logic
from 5 separate functions into a single private utility:
- create_track_record
- update_record
- create_like_record
- delete_record_by_uri
- create_comment_record
also adds _parse_at_uri helper for AT URI parsing.
net reduction of ~147 lines.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: address PR review feedback
- add db.rollback() before cleanup on comment creation failure
- add aria-label for accessibility on comment input and toggle
- fix seekToTimestamp race condition by waiting for loadedmetadata
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: address copilot review feedback
- fix Index syntax in track_comment.py (can't use .desc() in constructor)
- make migration idempotent for allow_comments column
- add console.error for failed comment loads
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
authored by
zzstoatzz.io
Claude
and committed by
GitHub
7ece78a8
d45bdd28