mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
1.8 KiB
1.8 KiB
id, title, status, assignee, created_date, updated_date, labels, dependencies, priority
| id | title | status | assignee | created_date | updated_date | labels | dependencies | priority | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-81 | Refactor launcher into command modules and process adapters | To Do | 2026-02-18 11:43 | 2026-02-18 11:43 |
|
|
medium |
Description
Launcher code is still large and process-control heavy (launcher/main.ts, launcher/mpv.ts, launcher/config.ts). This task refactors launcher flows into command modules plus explicit process adapters to reduce branching complexity and improve testability.
Suggestions
- Split by command domain (
doctor,config,mpv,jellyfin,play). - Isolate shell/process invocations behind adapter interfaces.
- Keep argv parsing independent from command execution side effects.
Action Steps
- Define launcher command dispatcher and command handler interfaces.
- Extract command handlers from
launcher/main.ts. - Move spawn/fs/net operations into process + platform adapter modules.
- Keep CLI UX and exit-code behavior stable.
- Add unit tests per command module with mocked adapters.
- Update launcher docs for module structure and extension guidance.
Acceptance Criteria
- #1 Launcher commands are implemented as focused modules
- #2 Process side effects are isolated behind adapter interfaces
- #3 Existing CLI behavior and exit codes remain compatible
- #4 Launcher testability improves via mocked adapter tests
Definition of Done
- #1 Launcher tests and core test gate pass
- #2 No regression in wrapper command behavior