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

1442 Commits

Author SHA1 Message Date
Andrei Murariu
89eb442866 bug-fix: add automatic trash emptying to clean command (#363)
- Empty trash using macOS Finder API (osascript) for proper permission handling
- Respects whitelist protection (skips if Trash is whitelisted)
- Shows item count when emptying trash
- Fallback to direct cleanup if Finder API fails
- Supports dry-run mode

Issue: #362
2026-01-26 10:28:03 +08:00
tw93
fb4cef5fa7 docs: add help text and test for 'mo update --force' 2026-01-26 10:10:46 +08:00
Andrei Murariu
670f970b4c feature: mo update --force flag implementation (#360) 2026-01-26 10:07:58 +08:00
Tw93
fbff0ec3bd fix: show spinner during cleanup phase
Add progress indicator when deleting files to prevent the terminal
from appearing frozen during long-running cleanup operations.

Closes #358
2026-01-24 08:31:04 +08:00
Tw93
c0596f51e3 Fix update output version parsing V1.23.2 2026-01-23 23:28:27 +08:00
Tw93
b0f9761458 test: add process_install_output test cases
- Test install.sh success message with version
- Test fallback version when no success message
- Test empty output handling
- Test avoiding wrong parentheses content extraction
2026-01-23 22:57:48 +08:00
Tw93
f9c33ac317 publish 1.23.1 2026-01-23 22:41:43 +08:00
Tw93
a4f1f49fab feat: improve version detection and error handling
- Add fallback to mo --version when brew list fails
- Add error handling for debug log write failures
- Improve version extraction with multiple fallback strategies
2026-01-23 22:25:35 +08:00
Tw93
a27caab2b6 update core 2026-01-23 20:45:21 +08:00
Tw93
3d985ebcb9 publish 1.23 2026-01-23 20:31:54 +08:00
Tw93
83166f2fe8 fix: avoid orphan service false positives and warm large file threshold 2026-01-23 20:16:06 +08:00
Tw93
500b6dc554 fix(clean): silence ShellCheck SC2053 2026-01-23 18:32:33 +08:00
Tw93
7e359c57d9 fix(analyze): correct top list and thresholds 2026-01-23 18:27:05 +08:00
Tw93
d7a0d480bc fix: improve dry-run mode and error handling
- Export MOLE_DRY_RUN env var for subprocess visibility
- Add || true to grep commands to prevent pipeline failures
- Add dry-run test for clean_orphaned_system_services
- Simplify clean_local_snapshots tests
2026-01-23 18:05:09 +08:00
github-actions[bot]
eb86a0ae37 chore: update contributors [skip ci] 2026-01-23 09:38:06 +00:00
Tw93
8c9cd1f90c feat(clean): add JetBrains Toolbox old IDE cleanup with whitelist-safe handling 2026-01-23 17:37:37 +08:00
github-actions[bot]
e48943cd0f chore: update contributors [skip ci] 2026-01-23 01:58:17 +00:00
Tw93
a24bed685b Merge branch 'main' of github.com:tw93/Mole 2026-01-23 09:57:54 +08:00
Tw93
1ad7d7e79b refactor: simplify Puppeteer cache cleanup to match browser cache pattern
- Replace 48-line custom function with one-line safe_clean call
- Remove unnecessary interactive confirmation (consistent with other browser caches)
- Simplify tests to verify Puppeteer cache is in clean_browsers output
- Net: -93 lines of code for same functionality
2026-01-23 09:56:14 +08:00
github-actions[bot]
0cebdea78e chore: update contributors [skip ci] 2026-01-23 01:55:21 +00:00
Shakeel Mohamed
5a8d766667 Add Puppeteer cache cleanup (#353) 2026-01-23 09:55:02 +08:00
Tw93
7e40824fa3 optimize code syntax 2026-01-23 09:43:04 +08:00
Andrei Murariu
340a71056c bug-fix: mo uninstall unbound variable on empty tuples (#352)
This happens when no third party app is available to be uninstalled; this triggers an `unbound variable` on the app_data_tuple causing the utility to fail.

This is caused mostly because the bash version is 3.2 on MacOS; it seems that since Bash 4 this unbound_variable is set to 0 and would have not went to that error.

Added an alternative value in case of error of 0 for this topic. This should handle this corner case
2026-01-23 09:40:13 +08:00
Tw93
be2e9ddeca change reminder icon to be more comfortable 2026-01-23 09:33:12 +08:00
Tw93
cde39aaeb2 feat(clean): add large file review and unify warnings 2026-01-22 20:15:13 +08:00
Tw93
9d824d0ad2 fix: restore uninstall traps and remove dead search key 2026-01-22 17:45:53 +08:00
Tw93
d862d58672 test: stabilize formatUnusedTime by using UTC baseline 2026-01-22 17:24:55 +08:00
Tw93
6be7f7d0f8 Merge branch 'pr-348' 2026-01-22 17:22:48 +08:00
Tw93
dad15a5dc6 clean: auto-enable system cleanup when sudo session is active 2026-01-22 17:10:18 +08:00
github-actions[bot]
507582c51d chore: update contributors [skip ci] 2026-01-22 08:20:05 +00:00
Tw93
8188f4b81b fix: clean update packages with SIP enabled 2026-01-22 16:16:50 +08:00
Dylan Joss
217eb986e2 test: add formatUnusedTime tests and fix duplicate comment
Add unit tests for formatUnusedTime in cmd/analyze/format_test.go:
- Zero time (time.Time{}) returns empty string
- Recent files (< 90 days) return empty string
- Boundary tests at 89/90 days threshold
- Month formatting (3mo, 4mo, 6mo, 11mo, 12mo)
- Year formatting (1yr, 2yr, 3yr)
- Boundary tests at year transitions

Also remove duplicate "Memory pressure penalty" comment in
cmd/status/metrics_health.go (line 72-73).
2026-01-21 22:42:13 -08:00
github-actions[bot]
cd367b67b9 chore: update contributors [skip ci] 2026-01-22 03:17:01 +00:00
Andrei Murariu
192ea08f8d bug-fix: mo analyze keybindings misalignment (#342)
* bug-fix: mo analyze keybindings misalignment

handle also uppercase R together with lowercase r

* bug-fix: mo analyze keybindings misalignment

Fix the logic also for:
- q with Q
- k with K
- j with J
- l with L
- b with B
- h with H
- o with O
2026-01-22 11:16:42 +08:00
github-actions[bot]
d675529052 chore: update contributors [skip ci] 2026-01-22 03:10:48 +00:00
Tw93
74c9b51cc9 Merge pull request #344 from dwjoss/dwjoss/add-ring-buffer-tests
test: add unit tests for RingBuffer in cmd/status
2026-01-22 11:10:30 +08:00
Dylan Joss
3c761865f8 Uses slices for equality comparison 2026-01-21 11:46:50 -08:00
Dylan Joss
046843a012 Add more tests 2026-01-21 11:29:37 -08:00
Dylan Joss
3148971506 test: add unit tests for RingBuffer in cmd/status
Add comprehensive test coverage for the RingBuffer circular buffer
data structure used in network history tracking.

Test cases:
- Constructor initialization (NewRingBuffer)
- Empty buffer returns nil slice
- Adding elements within capacity
- Exact capacity boundary
- Wrap-around behavior with chronological ordering
- Multiple wrap-arounds stress test
- Single-element buffer edge case
- Slice returns independent copy (not reference)
2026-01-21 00:15:35 -08:00
Tw93
6817f93075 Merge branch 'main' of github.com:tw93/Mole 2026-01-20 15:10:05 +08:00
Tw93
3f85c8238f Use gray color for warning icons to reduce visual noise 2026-01-20 15:07:37 +08:00
Tw93
58522b4f90 Fix undefined ICON_INFO variable 2026-01-20 15:03:08 +08:00
Tw93
a96e53d988 chore: auto format code 2026-01-20 06:46:06 +00:00
Tw93
acdf40dd2c Unify output format for multiple versions check 2026-01-20 14:44:11 +08:00
Tw93
b4b9b0c474 Add cleanup for orphaned system services
Detect and remove leftover LaunchDaemons, LaunchAgents, and
PrivilegedHelperTools from uninstalled apps like Sogou Input,
ClashX, ClashMac, and Nektony App Cleaner.
2026-01-20 14:25:32 +08:00
Tw93
d044b2876e Fix unable to uninstall data-protected apps like Clash Party
Previously, apps matching DATA_PROTECTED_BUNDLES patterns (VPNs, dev tools, etc.)
could not be uninstalled because should_protect_path blocked their deletion.
Now use MOLE_UNINSTALL_MODE to distinguish between cleanup and explicit uninstall,
allowing users to remove these apps when they choose to while still protecting
their data during normal cleanup operations.

Also allow deletion of installer receipts in /private/var/db/receipts/.
2026-01-20 11:54:17 +08:00
Tw93
6d041a22e1 Merge pull request #336 from tw93/dependabot/github_actions/actions/cache-5.0.2
chore(deps): bump actions/cache from 5.0.1 to 5.0.2
2026-01-20 10:26:48 +08:00
Tw93
e2b31b10d9 Merge pull request #337 from tw93/dependabot/github_actions/actions/setup-go-6.2.0
chore(deps): bump actions/setup-go from 6.1.0 to 6.2.0
2026-01-20 10:26:34 +08:00
Tw93
127e589291 Fix test error case 2026-01-20 10:26:13 +08:00
dependabot[bot]
802adfc4c7 chore(deps): bump actions/setup-go from 6.1.0 to 6.2.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](4dc6199c7b...7a3fe6cf4c)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-19 19:57:37 +00:00