Repository navigation
feat: add queue remediation tool with bug fixes and documentation - #11
Closed
thesammykins wants to merge 10 commits into
Closed
thesammykins wants to merge 10 commits into
thesammykins wants to merge 10 commits into
Conversation
- Implement queue-remediation CLI tool for managing Sonarr/Radarr queue issues - Fix critical error handling in media-requests: 26+ readKeystroke() calls now properly checked - Fix Makefile shell syntax in build-all target (broken string concatenation, ternary operator) - Update build system to include queue-remediation tool compilation - Add comprehensive documentation and implementation guides - Update AGENTS.md with refined build/test/style guidelines for expanded toolkit - Include full test suite with table-driven tests for queue remediation functionality
Owner
|
Looks good to me, needs testing to make sure everything works but overall good additions. |
Add interactive TUI mode (via -manual flag) for queue remediation with proper user feedback and error handling during action execution. Bugs Fixed: - Bug #1: Add loading state when actions start (was silently executing) - Bug #2: Clear loading state when actions complete (UI wasn't responsive) - Bug #3: Clear error messages before each action (stale errors displayed) - Bug #4: Wire TUI entry point in main (users couldn't launch TUI mode) Changes: - queue-remediation-tui.go: Core TUI implementation with Bubble Tea * All action handlers now set loading state and clear old errors * Action completion clears loading state and updates status * Comprehensive keyboard shortcuts (m=manual, d=delete, s=skip, r=refresh) - queue-remediation-tui-main.go: Dedicated TUI binary entry point - queue-remediation-shared.go: Shared API functions (fetchAllQueues, triggerManualImport, deleteQueueItem, getTokenForInstance, etc.) - queue-remediation.go: Main entry with -manual flag to launch TUI - Updated queue-remediation_test.go with 120+ comprehensive tests Impact: - Users can now launch interactive TUI with: queue-remediation -manual - Full visual feedback during action execution (no more silent failures) - Proper error handling and display - All test suites passing (100% success rate)
…with proper request structure Fixes critical API mismatch discovered through live testing - manual imports now correctly use POST /api/v3/command endpoint with ManualImportCommand wrapper structure instead of nonexistent endpoint. Adds mandatory folder parameter to scan requests and implements comprehensive debug logging (3-step API call tracking) to validate import workflow. Key Improvements: - Changed from non-existent POST /api/v3/manualimport to correct POST /api/v3/command endpoint - Added ManualImportCommand struct wrapping individual import requests with proper API contract - Fixed API parameter requirements: folder parameter is mandatory for scan operations - Added DownloadID mapping from queue items to import requests for download tracking - Enhanced logging with 3-phase API call tracking (scan → filter → import) for debugging - Corrected Radarr handling to use MovieID appropriately without episode-specific fields Testing: - Added 800+ lines of comprehensive test coverage validating Command API structure - Tests cover both Sonarr and Radarr scenarios with proper quality/language/downloadId mapping - Validates error handling and fallback mechanisms - All builds successful, full test suite passing
- Document API structure fixes based on live Sonarr testing - Add proper ManualImportCommand format and endpoint corrections - Highlight downloadId support and Radarr improvements - Include recent improvements section with all fixes implemented - Update examples with debug mode and multi-instance support - Add reference to MANUAL_IMPORT_API_RESEARCH.md for technical details README now accurately reflects current implementation with corrected API behavior matching Sonarr's actual contract.
Replace broken folder+seriesId approach with downloadId parameter per HAR investigation
…e validation Add comprehensive quality comparison engine to prevent accidental downgrades: - Smart quality scoring combining resolution, version, REAL tag, and REPACK bonus - Fuzzy title matching using Levenshtein distance (85% threshold) for series/movie validation - API integration to fetch existing file quality from Sonarr/Radarr - Enhanced decision logic in mapStatusToAction() to override risky deletions New data structures for quality metadata and validation results support: - EpisodeFileResource, MovieFileResource for API responses - QualityComparison and TitleMatchResult for decision tracking Comprehensive test coverage: - 254 test cases total (added 44 new test functions) - Quality scoring, comparison, and validation scenarios - API mocking with edge case coverage - Hybrid workflow validation with Command API fallback All tests passing. No breaking changes - enhancements are fully additive.
…actor matching Implement intelligent title matching that prevents false positives while correctly handling legitimate variations (hyphenation, articles, punctuation). - Add multi-factor scoring: character (60%) + token (30%) + length (10%) - Add stop word filtering for token comparison (the, a, an) - Implement hybrid logic: high char match OR high token match OR weighted score - Add 6 comprehensive edge case tests (Cruel Summer, The Office, Avatar) - All 254+ tests passing Results: ✓ Spider-Man vs Spiderman: 90%+ character similarity → MATCH ✓ The Matrix vs Matrix: 100% token similarity → MATCH ✓ Cruel Summer vs Last Summer: 54% weighted score → REJECT ✓ The Office vs Office Space: 38% weighted score → REJECT
calmcacil
marked this pull request as draft
January 27, 2026 00:46
Owner
|
Converted to draft as its still being enhanced and worked on. |
thesammykins
marked this pull request as ready for review
January 27, 2026 02:49
Owner
|
This PR needs to be updated to match the current repo structure. Changes on
|
Owner
|
This PR's rendering should conform to the project's terminal UX conventions documented in
See |
calmcacil
marked this pull request as draft
July 15, 2026 14:47
Owner
|
Superseded by the unified CLI architecture in #37; closing before the public-history sanitization. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
New Tool Implementation
Quality Improvements
Testing & Documentation
Features
Testing
✓ All existing tests pass: make test
✓ New queue-remediation tests fully implemented
✓ Manual testing of error handling paths
✓ Build verification for all target platforms