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:
@@ -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"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user