-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: remove maintenance feature entirely #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Code Review - PR #204: Remove Maintenance FeatureSummaryThis PR removes ~24,000 lines of maintenance-related code (90 files) including rules, candidates, scanning, and deletion history. The scope is massive but the approach is clean - a complete feature removal rather than partial deprecation. Critical Issues Found🔴 1. Orphaned Test File (Must Fix)
🔴 2. Orphaned Helper File (Must Fix)
🔴 3. Broken Re-export File (Must Fix)
Issues IdentifiedDatabase Migration (✅ Looks Good)
Preserved Functionality (✅ Looks Good)
Positive Observations
RecommendationsMust Fix Before Merge
Build Verification Needed
Test Coverage
Security & Performance
Code Quality
Final VerdictCannot approve until orphaned files are removed. The concept is sound and the migration is clean, but the PR is incomplete. The 3 remaining files will cause immediate build failures. Suggested Next Steps
📋 Reviewed by Claude Code following CLAUDE.md guidelines |
Remove all maintenance rule management, candidate scanning, and deletion history functionality. This simplifies the codebase by removing features that need a rethought architecture. Changes: - Remove all maintenance admin pages (rules, candidates, history, user-feedback) - Remove all maintenance components (rule builder, candidate list, etc.) - Remove maintenance lib code (scanner, evaluator, deleter, field registry) - Remove maintenance actions and validations - Remove maintenance API routes - Create database migration to drop maintenance tables - Update admin navigation to remove maintenance section Preserved: - User media marks functionality (moved to actions/user-marks.ts) - User media validation schemas (lib/validations/user-media.ts) - Discord bot media marking integration remains functional Database migration drops: - MaintenanceRule, MaintenanceScan, MaintenanceCandidate, MaintenanceDeletionLog tables - ScanStatus, ReviewStatus, ActionType enums 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Delete e2e/admin-maintenance.spec.ts (485 lines) - Delete e2e/helpers/maintenance-seed.ts (277 lines) - Delete actions/maintenance.ts (broken re-export) - Delete scripts/performance/profile-maintenance-query.ts (661 lines) - Clean up IMPROVEMENTS.md to remove maintenance-related items These files were missed in the initial maintenance feature removal and would cause build failures. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
9797c99 to
476ca1e
Compare
Code Review - PR #204: Remove Maintenance FeatureI've reviewed this PR which removes the entire maintenance feature from the codebase. Overall, this is a massive cleanup (26,027 deletions!) that simplifies the codebase significantly. However, there are several issues that need to be addressed before merging. 🐛 Issues Found1. CRITICAL: Failing Test References ❌The test file Lines 321, 408, 564-566, 678, 784:
Impact: These tests will fail when run, breaking the CI pipeline. Fix Required: Update or remove these test assertions to match the new navigation structure without maintenance sections. 2. Outdated API Route Comments
|
- Update admin-shared.test.tsx to match new navigation structure - Remove maintenance nav item references - Update section divider count from 3 to 2 - Fix More menu item expectations (7 items instead of 12) - Update first menu item from share-analytics to llm-usage - Update API route comments (radarr/sonarr) to remove maintenance references All tests now pass (2838 tests). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
PR Review - Maintenance Feature RemovalI've completed a comprehensive review of this PR. Overall, this is a well-executed large-scale refactoring that successfully removes a complex feature while preserving necessary functionality. ✅ Strengths
|
Summary
This PR removes the entire maintenance feature from the codebase, including:
Motivation
The maintenance feature had broken task scheduling architecture that needs to be rethought. Rather than maintaining complex code that isn't working correctly, this removes it entirely to simplify the codebase.
Preserved Functionality
actions/user-marks.ts- Moved fromactions/maintenance/user-marks.tslib/validations/user-media.ts- Extracted only the needed schemasDatabase Changes
Migration
20251206172926_remove_maintenance_tablesdrops:MaintenanceRuletableMaintenanceScantableMaintenanceCandidatetableMaintenanceDeletionLogtableScanStatus,ReviewStatus,ActionTypeenumsImpact
Test Plan
🤖 Generated with Claude Code