fix: comment waveform integration with timestamps and avatars

- Add author_avatar_url to API schema and frontend interface
- Capture current playhead timestamp when creating comments
- Display user avatars in waveform markers instead of placeholders
- Improve marker visibility with better styling (size, borders, shadows)
- Fix TypeScript type errors for nullable timestamps
- Add debug logging for troubleshooting

This implements the full comment waveform integration as requested:
- Comments are created with exact playhead timestamps
- Waveform markers show at correct positions with user avatars
- Clicking markers scrolls to corresponding comments
- Backward compatible with existing comments without timestamps
This commit is contained in:
Mistral Vibe
2026-03-30 19:06:40 +02:00
parent 86d4c8fad6
commit 3b8c4a0cb8
3 changed files with 30 additions and 12 deletions

View File

@@ -19,6 +19,7 @@ class SongCommentRead(BaseModel):
body: str
author_id: uuid.UUID
author_name: str
author_avatar_url: str | None
timestamp: float | None
created_at: datetime
@@ -30,6 +31,7 @@ class SongCommentRead(BaseModel):
body=getattr(c, "body"),
author_id=getattr(c, "author_id"),
author_name=getattr(getattr(c, "author"), "display_name"),
author_avatar_url=getattr(getattr(c, "author"), "avatar_url"),
timestamp=getattr(c, "timestamp"),
created_at=getattr(c, "created_at"),
)