What's Changed
Comprehensive code quality overhaul across both the Rust backend and Vue frontend, focusing on modularity, testability, and industrial-grade test coverage.
🛠 Improvements
Rust Backend
- Engine module split —
engine.rsdecomposed intoengine/{mod, args, lifecycle, state, cleanup}.rsfor better maintainability - Error handling — Integrated
thiserrorfor structured error types across all commands - Tracker protocol classification — New
classify_tracker_protocolfunction replaces inline matching - CI hardening — Added
cargo fmt --checkandcargo clippyto CI pipeline - Sidecar rename —
aria2c→motrixnext-aria2cto avoid system binary conflicts on Linux
Vue Frontend
- Store decomposition —
task.ts(465→288L): extracted 13 CRUD operations totaskOperations.tswith DI pattern - Event handler cleanup —
useAppEvents.ts: decomposed 235-line god function into 7 focused sub-functions - AddTask refactoring — Extracted animation hooks (
useAddTaskAnimations.ts) and file operations (useAddTaskFileOps.ts) - New composables —
useTaskActions,useAdvancedActions,useMagnetFlow,useTaskLifecycle,useAddTaskSubmit - Task restart — Robust restart with automatic rollback on failure (
taskRestart.ts) - Notification system — Dedicated task notification module (
taskNotifications.ts)
✅ Testing
- Frontend — 79 test files, 2573 tests (up from ~1800)
- Backend — 79 Rust tests covering engine args, state machine, error handling, tray, UPnP
- New behavioral tests —
taskOperations.test.ts(43 tests),useAddTaskFileOps.test.ts(22 tests) - Structural guards — Architecture tests prevent file bloat and god function regression