1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-12 13:26:18 +00:00
Commit Graph

1599 Commits

Author SHA1 Message Date
tw93
b605dde450 refactor: simplify analyze volumes behavior 2026-02-10 15:32:13 +08:00
github-actions[bot]
5aa02b0af0 chore: update contributors [skip ci] 2026-02-10 07:28:52 +00:00
Andrei Murariu
37bdc6edf7 feat: Exclude External Disks from Analyze (#428)
Created optional flag `--exclude-volumes` for `mo analyze` to consent the users to analyze the filesystem without taking in consideration attached Volumes.
Normal behaviour (with volumes included) is left untouched.
2026-02-10 15:28:33 +08:00
Tw93
9aa5a0a69d chore: auto format code 2026-02-10 07:07:52 +00:00
tw93
172afa83af refactor: centralize subcommand help handlers 2026-02-10 15:06:14 +08:00
Michael Wang 汪東陽
3820bf2be7 feat: add commands help flag (#429) 2026-02-10 15:02:57 +08:00
tw93
e65b73eb64 Merge branch 'main' into dev 2026-02-10 14:27:26 +08:00
github-actions[bot]
3e61b659e6 chore: update contributors [skip ci] 2026-02-10 06:27:19 +00:00
Oleksandr Redko
599b39a3fb refactor: use builtin max instead of maxInt (#430) 2026-02-10 14:27:00 +08:00
tw93
7813124f33 refactor: Extract com.clash.app pattern to avoid ShellCheck redundancy warning 2026-02-09 20:25:10 +08:00
tw93
c8b4b085c6 feat: Add com.clash.app to the list of recognized proxy application patterns. 2026-02-09 20:13:59 +08:00
tw93
b2987b0bb9 feat: add VS Code ShipIt cache directories to cleanup list #427 2026-02-09 19:47:50 +08:00
tw93
f8ff6d54cd fix(purge): dynamically limit path display width to 70% of terminal, fixing issue #433 2026-02-09 19:34:15 +08:00
tw93
f5cbbce0b2 Merge branch 'main' of https://github.com/tw93/Mole V1.25.0 2026-02-07 17:50:07 +08:00
tw93
e6829b9a5d fix: improve cache freshness fallback and proxy detection 2026-02-07 17:48:55 +08:00
tw93
f0c320e714 fix(uninstall): warm inline metadata and harden sudo remove 2026-02-07 17:44:23 +08:00
tw93
425f23a739 fix(status): improve proxy detection and add parser tests 2026-02-07 17:43:59 +08:00
tw93
9ec0db9245 fix(analyze): reuse recent cache and refresh stale results 2026-02-07 17:43:43 +08:00
tw93
9b25260efe test(uninstall): fix regex assertions for shellcheck SC2076 2026-02-07 12:32:02 +08:00
tw93
ce65d95522 Merge branch 'main' of https://github.com/tw93/Mole 2026-02-07 11:21:57 +08:00
tw93
361d0dda05 fix: P1/P2 issues in file ops, menu state, and logging
- Fix safe_sudo_remove early exit on error (P1)
- Fix menu filter state leakage in paginated menu (P2)
- Fix cleanup of MOLE_MENU_FILTER_NAMES in app selector (P2)
- Correct log_operation signature for memory dumps (P2)
- Apply minor formatting fixes to dev cleanup module
2026-02-07 11:21:37 +08:00
Tw93
fa8f7a80d9 chore: auto format code 2026-02-07 03:18:32 +00:00
tw93
6f8f16ce48 optimize Xcode simulator cleanup feedback/count (#418) 2026-02-07 11:17:07 +08:00
tw93
95b3818da8 fix(analyze): fix scan deadlock with non-blocking fallback and add regression test (#419) 2026-02-07 11:01:00 +08:00
tw93
5cdfcf2479 fix(uninstall): detect Maestro Studio .mobiledev and add regression test (#421) 2026-02-07 10:44:10 +08:00
tw93
500ab2f568 fix(uninstall): detect Zed HTTPStorages channel variants (#422) 2026-02-07 10:38:17 +08:00
tw93
1990b42524 Merge branch 'main' of https://github.com/tw93/Mole 2026-02-07 10:31:18 +08:00
tw93
a2afb786af fix(ui): standardize spacing in terminal control functions and improve readability 2026-02-07 10:31:15 +08:00
Tw93
0ac3d6cfbb chore: auto format code 2026-02-07 02:30:43 +00:00
tw93
02843dee74 feat(ui): add Ctrl+U support and optimize paginated menu performance 2026-02-07 10:28:41 +08:00
tw93
f3b288a21b feat(uninstall): implement metadata caching for faster app scanning 2026-02-07 10:26:53 +08:00
tw93
337f526021 fix(uninstall): fix error in batch uninstallation logic 2026-02-07 10:26:53 +08:00
Tw93
d2de32f2fe chore: auto format code 2026-02-05 11:52:43 +00:00
tw93
30777dafa3 fix(ui): stop treating space as search filter in paginated menu 2026-02-05 19:50:16 +08:00
tw93
a0d5b476d3 fix(analyze): skip virtualization/container mounts to prevent NFS hangs
- Add OrbStack, Colima, Parallels, VMware Fusion, VirtualBox, Rancher Desktop to skip list
- Prevent infinite NFS timeout loops when scanning VM/container mount points
- Fixes #416
2026-02-05 11:40:00 +08:00
tw93
dfa586d951 fix(raycast): use correct macOS launch method for Ghostty (#415)
Ghostty CLI on macOS cannot launch terminal windows, causing cli:N field parse errors. Use `open -na Ghostty --args -e` instead.
2026-02-05 11:33:19 +08:00
tw93
c5073ec6c8 fix(setup): improve command escaping for Raycast scripts 2026-02-04 20:46:28 +08:00
tw93
382729070d Merge branch 'main' of https://github.com/tw93/Mole 2026-02-04 20:06:59 +08:00
tw93
7f787b5c04 fix: implement MO_USE_FIND and improve fd fallback logic
Fixes the issue reported in PR #410 where mo purge fails to find
artifacts when fd returns empty results.

Changes:
- Implement MO_USE_FIND environment variable to force using find
- Improve fd fallback: check if fd output is empty (-s test)
- Add debug logging to show which tool is being used
- If fd returns no results, fallback to find automatically

This fixes the root cause where fd successfully runs (exit 0) but
finds nothing, preventing the find fallback from being triggered.
2026-02-04 20:05:09 +08:00
tw93
dc2f061d69 fix(raycast): quote raw command safely 2026-02-04 20:01:35 +08:00
tw93
d8b396533d fix: implement MO_USE_FIND and improve fd fallback logic
Fixes the issue reported in PR #410 where `mo purge` fails to find
artifacts when `fd` returns empty results.

Changes:
- Implement MO_USE_FIND environment variable to force using find
- Improve fd fallback: check if fd output is empty (-s test)
- Add debug logging to show which tool is being used
- If fd returns no results, fallback to find automatically

This fixes the root cause where fd successfully runs (exit 0) but
finds nothing, preventing the find fallback from being triggered.
2026-02-04 19:57:44 +08:00
Andrei Murariu
257c639541 bug-fix: add hardcoded directories for raycast removal (#414)
* bug-fix: uninstall raycast leftovers

* bug-fix: add hardcoded directories for raycast removal

---------

Co-authored-by: tw93 <tw93@qq.com>
2026-02-04 19:08:54 +08:00
tw93
cb19899eaa fix(apps): correct array initialization for matches in clean_orphaned_app_data 2026-02-04 17:34:04 +08:00
tw93
8861fe6b5f chore(raycast): prompt before continuing 2026-02-04 16:58:39 +08:00
tw93
ba1a21f8e7 chore(raycast): add explicit script dir steps 2026-02-04 16:54:59 +08:00
tw93
9a6427408e chore(raycast): make setup manual 2026-02-04 16:48:15 +08:00
tw93
5edddb616b chore(raycast): clarify settings open fallback 2026-02-04 16:43:07 +08:00
tw93
8bf3d419f5 fix(raycast): defer command interpolation 2026-02-04 16:39:02 +08:00
tw93
41a26204fb perf: skip redundant -name parameter when pattern is wildcard
Optimization:
- Skip -name "*" in safe_sudo_find_delete when pattern matches everything
- Reduces unnecessary parameter passing to find command
- Improves performance for operations that scan all files

Rationale:
- find -name "*" is redundant as it matches everything by default
- Removing it reduces command overhead without changing behavior
2026-02-04 16:18:13 +08:00
tw93
0fbf2661c8 perf: optimize system cleanup by merging find operations
Performance improvements:
- Merge 3 separate find operations into 1 for /Library/Caches
  - Combine *.cache, *.tmp, *.log patterns in single scan
  - Reduces filesystem traversal overhead
- Merge 2 find operations into 1 for /private/var/log
  - Combine *.log and *.gz patterns
- Optimize diagnostics cleanup with single combined scan
  - Merge Special, Persist, and tracev3 patterns
  - Reduces redundant directory traversal
- Use find -delete for batch removal of memory exception reports
  - More efficient than iterative removal for large file counts
  - Add summary logging to operations.log

UI improvements:
- Add granular spinner messages for each cleanup stage
- Separate diagnostic logs and power logs output for clarity
- Add progress feedback during Time Machine status check

Tests:
- Update sudo mock functions to support new combined find patterns
- Verify find -delete usage for memory exception cleanup
- Update assertions to match optimized implementation
2026-02-04 16:18:06 +08:00