feat: add hover tooltip to show who liked a track (#233)
* docs: add frontend data loading patterns and architecture
Documents the shift from client-side onMount to server-side load functions:
- server-side loading (+page.server.ts) for SEO/performance
- client-side loading (+page.ts) for auth-dependent data
- layout loading (+layout.ts) for shared state
- when to use each pattern
- anti-patterns to avoid
- migration history from PRs #210, #227
References issue #225 (auto-play investigation) as example of
understanding client vs server state boundaries.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add hover tooltip to show who liked a track
adds delightful UX feature - hover over like count to see who liked it
backend:
- add GET /tracks/{track_id}/likes endpoint
- returns list of users with display info (handle, display_name, avatar_url)
- ordered by most recent likes first
frontend:
- create LikersTooltip component with lazy loading on hover
- 500ms hover delay prevents accidental tooltips
- shows up to 10 likers with avatars and relative timestamps
- client-side caching to avoid redundant fetches
- smooth hover interactions with visual feedback
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: remove 'no likes yet' text and add debug logging
* fix: use API_URL config for likers endpoint
* fix: fetch likers when tooltip mounts instead of on hover
* fix: use $effect to fetch likers properly instead of calling in template
* fix: update like count immediately when liking/unliking track
---------
Co-authored-by: Claude <noreply@anthropic.com>
authored by