Timothy Pomeroy pomeroyt

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

2 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • d27a8f7744 Refactor settings page layout and add graceful shutdown - Move ShutdownButton to settings page header for better UX - Remove redundant Server Management section - Add graceful shutdown implementation in AppService - Fix code formatting (whitespace) in controller and service files - Improve shutdown flow: stop task queue, watcher, then close database

2 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 407308c60a Add graceful shutdown system and improve watcher reliability Backend Improvements: - Added POST /shutdown endpoint for graceful server shutdown - Implemented gracefulShutdown() method that properly closes all services - Added closeDatabase() method to DbService with WAL checkpoint - Stops task queue gracefully (waits for current task) - Stops file watcher and clears all resources - Ensures SQLite database integrity with proper WAL checkpoint Watcher Reliability Fixes: - Enabled polling mode for better network filesystem support - Added awaitWriteFinish to handle incomplete file writes (5s threshold) - Implemented callback timeout cleanup (5min) to prevent memory leaks - Added activity monitoring every 5 minutes with health checks - Enhanced error handling with detailed logging and recovery attempts - Track event count and last activity time - Log watcher health status periodically - Cleanup all resources and timeouts on shutdown UI Features: - Created ShutdownButton component with confirmation dialog - Added shutdown button to settings page - Shows countdown timer when shutdown initiated - Displays detailed list of services that will be stopped - Confirmation dialog prevents accidental shutdowns Benefits: - Prevents SQLite database corruption on shutdown - Ensures all file descriptors are properly closed - Watcher is more stable for long-running operations - Memory leaks prevented with timeout cleanup - Better error recovery and logging - Easy server shutdown via web UI

2 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 401551d3a0 Add watcher health monitoring and auto-recovery system - Added WatcherHealthService for continuous monitoring every 30s - Implemented automatic recovery with configurable limits (5 attempts/hour) - Created comprehensive error logging to database (last 100 errors) - Added 5 new API endpoints for health status, error logs, and auto-recovery - Built WatcherHealthStatus UI component with real-time updates - Integrated health monitoring into dashboard with full-width card - Added WebSocket events for health alerts and recovery notifications - Created detailed documentation in docs/WATCHER_HEALTH_MONITORING.md - Added implementation summary in WATCHER_HEALTH_IMPLEMENTATION.md

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • dded92b4c2 Update dependencies and add nodemon configurations

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 6bc6353ecb Fix watcher stop failing when watcher object is null but isWatching is true - Backend was checking 'this.watcher && this.isWatching' causing stop to fail - When watcher object was null but status showed isWatching=true, stop returned error - Now checks isWatching first and handles missing watcher object gracefully - Always sets isWatching=false and clears watcher reference when stopping - Prevents inconsistent state between watcher object and isWatching flag

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • bbb8241194 Add 200ms delay before refetching status after start/stop - Backend may need time to update state before status endpoint reflects changes - Wait 200ms before refetching to ensure backend has updated - Move toast after refetch so user sees updated status before success message - Applies to both FileWatcherCard and TaskProcessingCard

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 026fa16b96 Fix File Watcher and Task Processing status not updating after start/stop - Set staleTime and gcTime to 0 to prevent caching issues - Use direct refetch() instead of invalidateQueries for immediate updates - Await refetch in onSuccess to ensure UI updates before showing toast - Applies to both FileWatcherCard and TaskProcessingCard - Fixes issue where status showed success toast but UI didn't change

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 853cba4cd1 Add restarting state to prevent network errors during API restart - Cancel all in-flight queries when restart is initiated - Pause health checks during restart period - Implement smart reconnection with exponential backoff (up to 10 attempts) - Show 'Restarting...' status during reconnection phase - Disable restart button while restart is in progress - No longer throws NetworkError in console during expected downtime - Automatically invalidates and refreshes all queries once reconnected

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • d11e2aadc1 Fix API Health restart to handle connection loss gracefully - Add retry logic with exponential backoff to health query - Invalidate all queries when restart is triggered - Multiple refetch attempts (3s, 5s, 8s) to reconnect after restart - Handle onError case as success since server restart is expected to fail - Prevents site from showing errors during API restart - Improves reconnection reliability after service restart

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 687756bab3 Update modified components with formatting changes
  • 946004eddb Refactor StatsSection into smaller maintainable components - Create reusable Card component to abstract common card styling - Extract FileWatcherCard into separate component with own data/mutations - Extract TaskProcessingCard with task processing logic and queue display - Extract FilesProcessedCard with file processing stats and progress - Simplify StatsSection to just compose the new components - Remove duplicate card styling code (DRY principle) - StatsSection now maintains only WebSocket listeners for data invalidation - Each card is independently testable and maintainable - ApiHealth integrated as first grid item alongside other stats cards - Reduces StatsSection from 528 lines to 74 lines
  • a6755975c7 Integrate ApiHealth component into stats grid as first item - Move ApiHealth from separate widget above grid into the main grid layout - ApiHealth now displays alongside File Watcher, Task Processing, and Files Processed - Maintains consistent card styling with other stats widgets - Uses same grid responsiveness (lg:grid-cols-4) so ApiHealth takes one column - Remove unused space-y-6 wrapper div, consolidate to single grid layout - Build successfully passes with Turbopack
  • مشاهده مقایسه برای کامیت 3 »

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 99758c1818 Fix API restart button visibility and watcher status update delays - Add ApiHealth component import to StatsSection so restart button appears on dashboard - Wrap stats grid with space-y-6 container for proper spacing between widgets - Fix watcher start/stop status updates by adding explicit refetch with 100ms delay - Apply fix across all watcher control components (StatsSection, WatcherControls, WatcherStatus) - Fix TypeScript type checking issues in DuplicateList.tsx and indexing/page.tsx for object property access

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 6608bcb8bb Add remote API restart capability with UI button and confirmation dialog - Add POST /restart endpoint to app.controller for graceful service shutdown - Pass NestJS app instance from main.ts to controller for restart functionality - Add restart button to ApiHealth widget in dashboard with ArrowPathIcon - Implement confirmation dialog with guarded restart action - Toast notifications for restart success/failure - Auto-refetch health status after restart to detect when service is back online

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 1f041d6460 Optimize indexing and add post-processing hashing - Skip already-indexed files in batch mode; allow reindex override for manual indexing - Switch to streaming file hash calculation (64KB chunks) for memory efficiency - Add updateFileHash() method to db.service for tracking processed files - Implement automatic output file hashing in handbrake service after encoding completes - Pass dataset to handbrake processor so encoded files are hashed and stored in database - Refactor maintenance button UI from dropdowns to icon buttons across /files, /tasks, /duplicates, /settings pages - Add FileMaintenanceButtons and TaskMaintenanceButtons components for better UX - Add WebSocket event listeners for indexing progress notifications - Enhance duplicate detection and removal logic

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • f6454faf8c fix: add proper cleanup for watcher service on application shutdown - Implement OnModuleDestroy lifecycle hook in WatcherService - Properly close chokidar watcher and terminate validation worker on shutdown - Clear validation callbacks map to prevent memory leaks - Add error handling for cleanup operations - Improves application stability during restarts

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 820c88b989 feat: improve files list UI with better display and index action - Display only filename (not full path) in the files list table - Add collapsible details showing input, output, hash, and file size - Add copy buttons for easy copying of input, output, and hash values - Add "Index File" action to index individual files on demand - Create new API endpoint POST /files/:dataset/:file/index for single file indexing - Add indexSingleFile method to compute hash and store in database - Improve expanded row with better formatting and organized fields - Display file size in human-readable format (MB) plus bytes

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 576c90682e feat: add directory indexing with autocomplete, fix indexing worker database insertion - Add /directories API endpoint to list subdirectories for autocomplete - Create PathAutocomplete component with typeahead support for directory paths - Update indexing page with improved destination path selection - Defaults to dataset configured destination - Allows editing to add deeper paths - Provides autocomplete suggestions as user types - Fix indexing worker database insertion logic to properly handle destination files - Added INSERT OR IGNORE fallback for new destination files - Improved error handling for database operations - Better logging for batch processing progress

3 هفته پیش

pomeroyt پوش کردن به main در pomeroyt/watch-finished-turbo

  • 807bb01193 fix: add isRequeue parameter to AppService createTask method signature

4 هفته پیش