3 Commits

Author SHA1 Message Date
a24f07a36e Add MP4 scan progress visibility in UI
- Add broadcast_scan_started, broadcast_scan_progress, broadcast_scan_completed to WebSocketService
- Inject WebSocketService into AnimeService for real-time scan progress broadcasts
- Add CSS styles for scan progress overlay with spinner, stats, and completion state
- Update app.js to handle scan events and display progress overlay
- Add unit tests for new WebSocket broadcast methods
- All 1022 tests passing
2025-12-23 18:24:32 +01:00
a833077f97 Phase 5: Frontend - Use key as primary series identifier
- Updated app.js to use 'key' as primary series identifier
  - selectedSeries Set now uses key instead of folder
  - createSerieCard() uses data-key attribute for identification
  - toggleSerieSelection() uses key for lookups
  - downloadSelected() iterates with key values
  - updateSelectionUI() and toggleSelectAll() use key

- Updated WebSocket service tests
  - Tests now include key and folder in broadcast data
  - Verified both fields are included in messages

- No changes needed for queue.js and other JS files
  - They use download item IDs correctly, not series identifiers

- No template changes needed
  - Series cards rendered dynamically in app.js

All 996 tests passing
2025-11-28 16:18:33 +01:00
42a07be4cb feat: implement WebSocket real-time communication infrastructure
- Add WebSocketService with ConnectionManager for connection lifecycle
- Implement room-based messaging for topic subscriptions (e.g., downloads)
- Create WebSocket message Pydantic models for type safety
- Add /ws/connect endpoint for client connections
- Integrate WebSocket broadcasts with download service
- Add comprehensive unit tests (19/26 passing, core functionality verified)
- Update infrastructure.md with WebSocket architecture documentation
- Mark WebSocket task as completed in instructions.md

Files added:
- src/server/services/websocket_service.py
- src/server/models/websocket.py
- src/server/api/websocket.py
- tests/unit/test_websocket_service.py

Files modified:
- src/server/fastapi_app.py (add websocket router)
- src/server/utils/dependencies.py (integrate websocket with download service)
- infrastructure.md (add WebSocket documentation)
- instructions.md (mark task completed)
2025-10-17 10:59:53 +02:00