feat: add orphan mod cleanup tool with GUI integration and live-server tests

- Add arma_modlist_tools/cleaner.py: find_orphan_folders() detects @ModName
  folders no longer referenced in comparison.json; uses _normalize_name from
  fetcher for consistent three-level matching
- Add clean_orphans.py: CLI with --dry-run and --yes/-y flags; junction-safe
  deletion via _is_junction() guard before shutil.rmtree
- Add Clean Orphans tab to gui/views/tools.py: scrollable checkbox list,
  background scan/delete threads, pending-done-msg pattern for post-scan
  status, EN/VI localization strings in gui/locales.py
- Add 23 unit tests (section 12), 6 E2E subprocess tests (section 13),
  23 coverage-gap tests (section 14), 9 live-server fetcher tests (section 15)
- Fix leaked builtins.open mock in _test_read_os_release_parses_file
- Overall coverage: 84% → 93%; fetcher.py: 36% → 72%
This commit is contained in:
Tran G. (Revernomad) Khoa
2026-04-08 20:02:42 +07:00
parent 85bc406236
commit 90cc6c00ff
6 changed files with 1252 additions and 8 deletions

View File

@@ -11,6 +11,7 @@ from .linker import (
from .config import load_config, Config
from .compat import is_windows, is_linux, get_os_label, fix_console_encoding
from .reporter import build_missing_report, save_missing_report
from .cleaner import find_orphan_folders, folder_size
__all__ = [
# parser
@@ -29,4 +30,6 @@ __all__ = [
"is_windows", "is_linux", "get_os_label", "fix_console_encoding",
# reporter
"build_missing_report", "save_missing_report",
# cleaner
"find_orphan_folders", "folder_size",
]