diff --git a/docs/instructions.md b/docs/instructions.md index 0ea481c..978e58b 100644 --- a/docs/instructions.md +++ b/docs/instructions.md @@ -121,19 +121,34 @@ For each task completed: ### Completed Tasks: -1. ✅ **Verify NFO/Artwork Loading Isolation** (Completed: 2026-01-23) - - **Task**: Ensure during anime add, NFO, logo, art, etc. is loaded only for the specific anime being added. - - **Status**: VERIFIED - Implementation is correct - - **Details**: - - The `BackgroundLoaderService._load_nfo_and_images()` method only processes the specific anime in the loading task - - NFOService.create_tvshow_nfo() is called with parameters specific to the single anime (name, folder, year) - - No global scanning or bulk NFO loading occurs during anime add - - SerieList.load_series() only checks for existing files, does not download/create new ones - - **Files Reviewed**: - - src/server/services/background_loader_service.py (lines 454-544) - - src/server/api/anime.py (lines 694-920) - - src/core/entities/SerieList.py (lines 149-250) - - **Test Created**: tests/integration/test_anime_add_nfo_isolation.py (verification test) +1. ✅ **NFO/Artwork Loading Isolation** (Completed: 2026-01-23) + - Task: Ensure during anime add, NFO, logo, art, etc. is loaded only for the specific anime being added + - Status: VERIFIED - Implementation is correct + +2. ✅ **Setup Redirect Flow** (Completed: 2026-01-23) + - Task: Implement redirect flow: setup -> loading -> login when user completes setup + - Changes: + - Added /loading to exempt paths in setup_redirect middleware + - Setup page redirects to loading with initialization in background + - Loading page connects to WebSocket for real-time progress + - After completion, loading redirects to login + +3. ✅ **Close Setup and Loading Pages** (Completed: 2026-01-23) + - Task: Make setup and loading pages unavailable after completion to prevent re-access + - Changes: + - Check if setup is complete before allowing access to /setup + - Redirect to login if accessing /setup after completion + - Check if initialization is complete before allowing access to /loading + - Redirect to login if accessing /loading after initialization complete + +4. ✅ **Fix Loading Page WebSocket Auth** (Completed: 2026-01-23) + - Task: Fix 403 Forbidden error on WebSocket connection + - Issue: Loading page was connecting to /ws/progress (doesn't exist) + - Changes: + - Changed WebSocket URL from /ws/progress to /ws/connect (correct endpoint) + - Added /ws/connect to exempt paths in auth middleware + - Subscribe to 'system' room after connection for progress updates + - Fixed message data handling to match WebSocket format ### Active Tasks: