1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 18:34:46 +00:00
Commit Graph

1314 Commits

Author SHA1 Message Date
Jack Phallen
9f441eea86 Fix unrelated test failures
Fixed WHITELIST_PATTERNS unbound variable error in lib/core/app_protection.sh
Updated clean_empty_library_items to match current behavior
2026-01-14 09:29:05 -05:00
Jack Phallen
d884a268e8 fix(uninstall): Harden brew uninstall 2026-01-14 09:17:41 -05:00
Tw93
7089ce69d1 Merge branch 'dev' of github.com:tw93/Mole into dev 2026-01-14 11:57:46 +08:00
Tw93
facaf5b34c fix: precision issue in battery metrics and adaptive purge UI
- cmd/status: use ParseUint to handle negative battery power values correctly
- bin/purge: make path truncation adaptive to terminal width
2026-01-14 11:57:10 +08:00
Tw93
ef6336ab74 fix: precision issue in battery metrics and adaptive purge UI
- cmd/status: use ParseUint to handle negative battery power values correctly
- bin/purge: make path truncation adaptive to terminal width
2026-01-14 11:55:24 +08:00
Tw93
9c996e944e update agents 2026-01-14 11:34:42 +08:00
Tw93
9b3220bfe4 fix: handle uint64 overflow in battery power metrics
- Fix display of invalid large values like 18446744073709544W
- macOS ioreg returns negative values as uint64 (two's complement)
- Detect overflow pattern (value > 2^63) and convert to signed
- Validate reasonable power range (-200W to 200W) for battery
- Add range validation for SystemPower (0 to 1000W)

Root cause: During charging, battery power is negative but ioreg
formats it as unsigned uint64, causing overflow. This fix properly
converts these values back to signed integers.
2026-01-14 11:26:37 +08:00
Tw93
0a632c0a22 fix: protect Firefox browser data from cleaning
Fixes #307

- Add Firefox to DATA_PROTECTED_BUNDLES to prevent cleaning
- Protects IndexedDB, localStorage, and other complex storage
- Prevents Gmail and other web apps from breaking after clean
2026-01-14 11:26:24 +08:00
Tw93
c8eae1d085 Merge branches 'dev' and 'dev' of github.com:tw93/Mole into dev 2026-01-14 10:47:00 +08:00
Tw93
9108b0f85d update the windows user use 2026-01-14 10:46:55 +08:00
Tw93
5afd602027 refactor: optimize CPU temp feature with tests and performance fix
- Restore performance test threshold to 200ms (from 500ms)
  User caching is highly effective (~8ms for 100 calls)
- Add unit tests for colorizeTemp() covering thresholds and edge cases
2026-01-14 10:31:01 +08:00
github-actions[bot]
081ec0b2be chore: update contributors [skip ci] 2026-01-14 02:24:04 +00:00
Tw93
55b61eeb09 Merge pull request #312 from Copper-Eye/dev
Feature: Add cpu temp, top consumers, and visual improvements
2026-01-14 10:23:47 +08:00
Tw93
c210aad3a3 Merge branch 'dev' into dev 2026-01-14 10:18:21 +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
7360f0a59e feat: Implement empty file cleanup in ~/Library root (#234)
- Add logic to remove 0-byte files in ~/Library (maxdepth 1)
- Explicitly protect .localized files to preserve Finder localization
- Respect global whitelist patterns
2026-01-14 09:49:47 +08:00
Copper-Eye
fae1c88fa2 add cpu temp display and optimize user check 2026-01-13 17:21:03 -04:00
github-actions[bot]
68708484e3 chore: update contributors [skip ci] 2026-01-13 21:06:42 +00:00
Tw93
acac949bc7 update agents.md 2026-01-13 19:48:08 +08:00
Tw93
421cdd09dc feat: enhance safe cache cleaning for Electron apps and VS Code
- Add safe cleanup for Antigravity, Filo, and Claude caches in Application Support (Cache, GPUCache, Code Cache only).
- Enhance VS Code cleanup to include deep rendering caches (GPU, Dawn) and extension installers.
- Validated to ensure no user data or pnpm/yarn executables are touched.
2026-01-13 19:04:54 +08:00
Tw93
8ec7663a70 Fixed the ShellCheck warning 2026-01-13 16:54:10 +08:00
Tw93
3a05db5e1d Merge branch 'main' of github.com:tw93/Mole 2026-01-13 15:59:51 +08:00
Tw93
0bd30955a2 feat: detect multiple NDK and Rust toolchain versions (#234)
Add report-only detection for multiple Android NDK and Rust toolchain
installations. Users receive helpful guidance for manual cleanup via
Android Studio SDK Manager or rustup commands.

- Add check_android_ndk() and check_rust_toolchains()
- Extract check_multiple_versions() helper (DRY)
- Add 4 test cases, optimize test performance
- Fix shellcheck warnings

All 393 tests passing.
2026-01-13 15:59:43 +08:00
Tw93
4d3a97903a chore: auto format code 2026-01-13 06:17:41 +00: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
3c8c2b3b98 chore: auto format code 2026-01-13 02:45:33 +00:00
Tw93
6b594c7d69 feat: add Homebrew integration and optimize UI performance
- Add Homebrew cask detection and use 'brew uninstall --cask' for proper cleanup
  - Add real-time progress feedback during uninstallation
  - Optimize scroll performance by only redrawing visible items
  - Replace Python-based Dock removal with PlistBuddy for better compatibility
  - Add comprehensive tests for Homebrew functionality

  Fixes #306
2026-01-13 10:44:48 +08:00
github-actions[bot]
4d210913d8 chore: update contributors [skip ci] 2026-01-12 09:50:33 +00:00
Tw93
8bd2bac580 Merge branch 'dev' 2026-01-12 17:50:07 +08:00
Tw93
5d77001a72 Optimize the effect and speed of scanning 2026-01-12 17:49:51 +08:00
Tw93
ffea36e868 fix the touchid tests 2026-01-12 16:20:37 +08:00
Tw93
93dee7b94d Implemented safer temp cleanup and error reporting while fixing folded-directory size fallback to prevent double counting and aligning Homebrew cleanup traps with safe removal. 2026-01-12 15:45:31 +08:00
Tw93
5d5056fc9e fix: address mo update hanging and imporve temporary file reliability 2026-01-12 14:55:42 +08:00
Tw93
add3cca6ef fix mo update hanging by adding a timeout 2026-01-12 14:46:15 +08:00
Tw93
3bae4f356a Merge branch 'dev' into pr-300 2026-01-12 14:20:24 +08:00
Tw93
f3e61c36bc Merge pull request #301 from JackPhallen/fix/scanner-race-condition
fix(analyze): Fix race condition in currentPath
2026-01-12 14:13:32 +08:00
Jack Phallen
47ce1cb75b fix(analyze): Fix race condition in currentPath 2026-01-11 23:44:55 -05:00
Jack Phallen
1e2cf97b47 fix(analyze): Additional improvements to limit sem blocking 2026-01-11 23:28:44 -05:00
Tw93
91fcbb925b Merge pull request #294 from JackPhallen/fix/remove-tm-mount-check
fix: remove Time Machine mount check
2026-01-12 11:56:33 +08:00
Tw93
df2f00c92f Merge branch 'pr-296' into dev 2026-01-12 11:52:19 +08:00
Tw93
f21fc833b5 Merge pull request #295 from JackPhallen/fix/cap-scanner-buffer-size
fix: cap entryChan buffer to prevent memory spikes
2026-01-12 11:46:00 +08:00
Tw93
08a32ff413 Merge branch 'dev' of github.com:tw93/Mole into dev 2026-01-12 11:42:21 +08:00
Tw93
8aee56b7fa fix: enhance overview scan UI and invalidate cache on refresh
- Invalidate disk cache for overview entries on refresh to ensure fresh data.

- Show dynamic status messages (e.g., 'Scanning Applications...') instead of static text in Overview.

- Adjust spinner animation speed to 100ms for smoother visual experience.
2026-01-12 11:42:07 +08:00
github-actions[bot]
832722d882 chore: update contributors [skip ci] 2026-01-12 02:27:21 +00:00
Tw93
67e2d2e86d Merge pull request #297 from frozturk/fix/refresh-in-overview-mode
fix: refresh not working in overview mode
2026-01-12 10:27:02 +08:00
github-actions[bot]
7163dd2b1c chore: update contributors [skip ci] 2026-01-12 02:11:25 +00:00
Tw93
1a40875b80 refactor: improve code quality and test coverage
This commit addresses several code quality issues identified in the
recent bash 3.2 compatibility fixes:

1. Remove redundant array length check in is_whitelisted()
   - The second check for array length > 0 is unnecessary after
     already checking for length == 0

2. Clean up commented dangerous cleanup code in dev.sh
   - Replace commented-out code with clear documentation
   - Add explicit notes explaining why certain paths are excluded
   - Improves maintainability by preventing confusion

3. Enhance test coverage for excluded paths
   - Add tests to verify Mix archives are NOT cleaned
   - Add tests to verify Stack programs are NOT cleaned
   - Add tests to verify VS Code workspace storage is NOT cleaned
   - These tests ensure critical data remains protected

All changes pass ShellCheck, syntax validation, and formatting checks.
2026-01-12 10:09:02 +08:00
frozturk
08c577d24a fix: refresh not working in overview mode 2026-01-11 19:38:56 +01:00
Jack Phallen
8870141923 Cap entryChan buffer to prevent memory spikes
Cap buffer at 4096. All entries still process normally—producers just briefly block if
the buffer fills, which is negligible since the collector drains it quickly.
2026-01-11 11:06:00 -05:00
Jack Phallen
b8ab9511fd Create separate limiter for du subprocesses
Introduce duSem to cap concurrent du subprocess spawns while keeping
the existing sem to limit overall scan fan-out (dir recursion/task concurrency).
This prevents du from monopolizing scan concurrency and reduces resource
spikes during folded-dir sizing.
2026-01-11 10:58:45 -05:00