Add track filtering, WS keepalive, and improve error handling

- Add track filtering by uploader (my tracks / all tracks) with UI tabs
- Add WebSocket ping/pong keepalive (30s interval) to prevent disconnects
- Add auto-reconnect on WebSocket close (3s delay)
- Add request logging middleware with DATABASE_URL output on startup
- Handle missing S3 files gracefully (return 404 instead of 500)
- Add debug logging for audio ended event

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-12 18:10:25 +03:00
parent 3dd10d6dab
commit fdc854256c
7 changed files with 144 additions and 11 deletions

View File

@@ -58,6 +58,11 @@ async def room_websocket(websocket: WebSocket, room_id: UUID):
data = await websocket.receive_text()
message = json.loads(data)
# Handle ping/pong for keepalive
if message.get("type") == "ping":
await websocket.send_json({"type": "pong"})
continue
async with async_session() as db:
if message["type"] == "player_action":
await handle_player_action(db, room_id, user, message)