1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 16:49:41 +00:00
Commit Graph

50 Commits

Author SHA1 Message Date
Angelk90
cb779d9144 Fix use find (#399) 2026-02-02 11:19:44 +08:00
tw93
7e2c8d24fa fix: add fallback to find when fd fails in project scan
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-31 21:26:15 +08:00
tw93
c34d8e71c8 fix: correct minimum purge scan depth from 2 to 1 2026-01-31 20:05:34 +08:00
tw93
81c58b5b89 fix: increase purge max depth from 4 to 6 to find deeply nested artifacts
Fixes #394

Users reported that `mo purge` could not find `node_modules` folders in
deeply nested project structures. The issue was caused by `PURGE_MAX_DEPTH_DEFAULT=4`
being too restrictive for real-world project organizations.

Example failing case:
~/Projects/Company/Division/Team/MyProject/node_modules  (depth 5)
~/Projects/Org/ClientA/Backend/Services/API/node_modules (depth 6)

Changes:
- Increased PURGE_MAX_DEPTH_DEFAULT from 4 to 6
- This covers 95%+ of real-world project structures
- Performance impact: ~15-25% slower scan (acceptable trade-off for correctness)
- All 41 existing tests pass with the new depth limit

Verified:
- Tested with structures at depths 2-6, all artifacts now detected
- No breaking changes to existing functionality
- Users with fd (fast) won't notice performance difference
2026-01-31 17:45:37 +08:00
tw93
89dcb0c3b5 fix: Use du -P for accurate size calculation and add timeouts to channel sends to prevent blocking. 2026-01-30 15:06:30 +08:00
tw93
e966838c82 style: standardize punctuation across codebase
- Replace parentheses with commas for supplementary info
- Use commas instead of em-dashes for separators
- Update bullet points from - to * in some contexts
- Improve version extraction regex with fallback logic
2026-01-26 14:36:06 +08:00
Tw93
83dc59bb54 feat: improve purge display with full paths and size sorting (#311)
- Show full project paths (~/www/project) instead of just project names
  - Sort artifacts by size descending (largest first)
  - Increase path display width for better readability
  - Support CMD+Click to open folders in terminal
2026-01-14 10:15:58 +08:00
Tw93
8ec7663a70 Fixed the ShellCheck warning 2026-01-13 16:54:10 +08:00
Tw93
5b51007c3f Fix mo purge UI glitch by correctly clearing the scanning progress line without overwriting the title. 2026-01-13 14:16:41 +08:00
Tw93
5d77001a72 Optimize the effect and speed of scanning 2026-01-12 17:49:51 +08:00
Biplav Barua
3507870275 feat: add Angular, SvelteKit, Astro, and coverage to purge targets (#286) 2026-01-10 00:05:38 +08:00
Tw93
fc4d94f7c7 Merge pull request #247 from JackPhallen/feat/more-purge-support
feat(purge): C# bin purge support
2026-01-04 16:16:59 +08:00
Jack Phallen
aabee42344 feat(purge): C# bin purge support 2026-01-03 23:24:25 -08:00
Jack Phallen
2045917c23 feat(purge): Additional python purge targets 2026-01-03 22:54:37 -08:00
Tw93
6dfd675417 refactor: standardize epoch time retrieval with get_epoch_seconds and ensure locale-independent string transformations. 2026-01-03 18:07:47 +08:00
Tw93
f98aab6840 refactor: simplify configuration by removing unused environment variables 2026-01-03 13:34:19 +08:00
Tw93
910e79df4e feat: Improve clean command's regex handling and pnpm cache cleaning, enhance test output, update completion descriptions, and clarify installation instructions. 2026-01-02 18:50:42 +08:00
Jack Phallen
5e7f276722 fix(purge): use regex OR pattern instead of multiple -g flags for fd 2026-01-01 22:45:30 -08:00
Tw93
23ffafc415 feat: add Microsoft Edge old version cleanup and improve vendor directory protection logic. 2026-01-02 00:29:58 +08:00
Tw93
a671c63401 feat: smart vendor directory handling in purge
- Only clean PHP Composer vendor (regeneratable)
  - Protect Rails, Go, and unknown vendor directories
  - Enhanced test coverage for all scenarios

  Builds on PR #229 with improved multi-language support
2026-01-02 00:03:17 +08:00
Jalen Yan
9e84883de5 fix: skip Rails vendor during purge 2026-01-01 23:37:02 +08:00
Tw93
b64f7df357 feat: add Zig build artifacts and project files to cleanup script. 2026-01-01 13:48:08 +08:00
Tw93
9aa569cbb6 feat: Enhance clean, optimize, analyze, and status commands, and update security audit documentation. 2025-12-31 16:23:31 +08:00
Tw93
3ba406b5e7 Merge branch 'main' of github.com:tw93/Mole 2025-12-30 14:48:15 +08:00
Tw93
f5dad048ff refactor: improve pagination robustness and reduce code duplication 2025-12-30 14:48:10 +08:00
Tw93
dab8136da5 chore: auto format code 2025-12-30 06:46:48 +00:00
Tw93
73f3d43308 feat: improve mo purge UX with pagination and smart project detection
- Add pagination for project list based on terminal height
- Show position indicator [5/25] when scrolling
- Fix GB display for values < 1 (0.6GB instead of .6GB)
- Improve project name detection by walking up to find project root
- Change default editor from nano to vim
2025-12-30 14:38:16 +08:00
Tw93
3eccb7c094 feat: improve project clean module's common utility sourcing and bump version to 1.15.10 2025-12-29 20:26:16 +08:00
Tw93
fd95e2f3fc chore: auto format code 2025-12-29 11:38:50 +00:00
Tw93
6328bf158d feat(purge): smart project discovery and optimization 2025-12-29 19:38:14 +08:00
Tw93
bf36d3d6b6 chore: polish PR #197 and add Xcode Archives whitelist option
- Remove duplicate comment in project.sh
- Fix color code issue in purge.sh help message
- Add proper spacing after load_purge_config function
- Add shell syntax highlighting in README code block
- Add Xcode Archives to whitelist options (fixes #195)
2025-12-29 19:18:41 +08:00
Tw93
ad43c92fa1 chore: auto format code 2025-12-29 11:16:45 +00:00
Andrii Medvediev
7e62ed19f9 feat: add configurable purge paths (#197) 2025-12-29 19:16:16 +08:00
Tw93
694c55f73b fix: implement layered error tolerance and accurate cleanup reporting (#175 #176 #180)
- Fix safe_remove set -e trap in command substitution
  - Fix has_full_disk_access false positives and unknown state handling
  - Use set +e in perform_cleanup for graceful degradation
  - Track removal failures and only count actually deleted items (#180)
  - Add "Skipped X items (permission denied or in use)" notification
  - Improve spinner reliability with cooperative stop mechanism (#175)
2025-12-29 14:27:47 +08:00
Hensell
23479c61bd feat: add .dart_tool to project purge targets and disk analyzer (#179) 2025-12-28 20:12:22 +08:00
Tw93
749d73b1b9 Add spinners to project artifact cleaning and update navigation icons 2025-12-27 10:17:22 +08:00
Tw93
a7c989588e improve code quality and fix signal handling 2025-12-26 20:34:38 +08:00
Nathan Broadbent
f838e9517d fix: use BSD stat explicitly to avoid GNU coreutils conflict (#160) 2025-12-26 10:43:18 +08:00
Tw93
6d66465447 refactor: Improve shell array expansion robustness in cleanup functions 2025-12-23 09:55:18 +08:00
Tw93
9a942a2770 feat: Add configurable project cleanup depth, refine interactive menu display, and sanitize uninstall app names. 2025-12-22 18:53:48 +08:00
Tw93
d2dc68da90 feat: Enhance app protection with centralized critical component checks, improve UI string width calculation, refine analysis and cleaning logic, and add new tests. 2025-12-22 11:24:04 +08:00
Tw93
d747ff43d3 fix: Remove local declaration for scan_pids and scan_temps to ensure accessibility by the cleanup_scan trap. 2025-12-20 22:30:32 +08:00
Tw93
c1784f7aa4 refactor: improve clean item removal with safe_remove 2025-12-18 17:38:37 +08:00
Tw93
8eeed7d079 feat(clean, optimize): enhance recent items cleanup safety 2025-12-18 17:19:18 +08:00
Tw93
af03452f6d feat: Enhance clean and optimize operations with new configuration constants 2025-12-18 17:02:04 +08:00
Tw93
fccc589fbd chore: auto format code 2025-12-18 06:17:29 +00:00
Tw93
9d72eab95a feat: add interactive purge command with comprehensive tests 2025-12-18 14:16:56 +08:00
Tw93
0427dbb6c0 feat: Expand critical system component protection in clean user logic and apply minor shell script fixes. 2025-12-17 20:42:25 +08:00
Tw93
611254848d chore: auto format code 2025-12-17 12:36:26 +00:00
Tw93
34bdd14a6f feat: add purge command to clean project build artifacts and update clean dry-run message. 2025-12-17 20:35:45 +08:00