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

469 Commits

Author SHA1 Message Date
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
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
cde39aaeb2 feat(clean): add large file review and unify warnings 2026-01-22 20:15:13 +08:00
Tw93
dad15a5dc6 clean: auto-enable system cleanup when sudo session is active 2026-01-22 17:10:18 +08:00
Tw93
3f85c8238f Use gray color for warning icons to reduce visual noise 2026-01-20 15:07:37 +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
46472bc86e chore: auto format code 2026-01-17 02:13:54 +00:00
Tw93
e6fc0613d5 perf: improve cleanup UI responsiveness and reduce visual flicker
- Speed up spinner animation from 100ms to 50ms for smoother visuals
- Fix spinner flicker by deferring stop until output is ready
- Remove unnecessary 'Preparing...' spinner at section start
- Hide whitelist-protected items from output (Trash, Finder metadata)
- Add spinner feedback for system diagnostic log cleanup
- Remove redundant stop_section_spinner calls in cleanup modules

The cleanup process now feels significantly faster and more polished,
with continuous visual feedback and no jarring gaps between operations.
2026-01-17 10:12:23 +08:00
Tw93
00a712711e chore: auto format code 2026-01-14 03:59:21 +00: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
c210aad3a3 Merge branch 'dev' into dev 2026-01-14 10:18:21 +08:00
Copper-Eye
fae1c88fa2 add cpu temp display and optimize user check 2026-01-13 17:21:03 -04: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
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
5d5056fc9e fix: address mo update hanging and imporve temporary file reliability 2026-01-12 14:55:42 +08:00
Tw93
e58c7128b0 fix: resolve unbound variable error in safe_clean (bash 3.2 compatibility) 2026-01-11 09:58:37 +08:00
Tw93
54be4e30a2 fix: global optimization for safe_clean and doc update 2026-01-11 09:55:18 +08:00
Tw93
2b5dd3f44c feat: show scanning progress as percentage in disk analyzer
- Implemented progress percentage display (e.g., `(45%)`) in `cmd/analyze` to show scanning status based on cached total files.
- Kept the UI clean by avoiding a full progress bar.
- fix: formatting improvements in `bin/touchid.sh`.
2026-01-09 14:16:29 +08:00
Tw93
2394c5d768 feat(touchid): add sudo_local support with silent migration 2026-01-09 11:02:10 +08:00
Tw93
5eb2edf1cd fix: resolve spinner display and Ctrl+C handling issues
- fix(clean): stop spinner before safe_clean outputs results
- fix(uninstall): handle Ctrl+C during application scanning
2026-01-08 16:17:39 +08:00
Tw93
9e7f2a87cf Repair output 2026-01-08 16:12:39 +08:00
Tw93
3ef44efcf9 feat: Add debug logging for installer collection and improve Homebrew installer display names by stripping hash prefixes. 2026-01-05 18:55:04 +08:00
Tw93
62ef283943 feat: refine ZIP installer detection to handle many entries and app bundles, and update AI agent development guide 2026-01-05 10:30:45 +08:00
Tw93
07ea303105 feat: enhance optimization summary with specific metrics for cleaned cache, repaired configs, and optimized databases 2026-01-05 00:26:08 +08:00
Tw93
2fac1e1dea Merge branch 'main' of github.com:tw93/Mole 2026-01-04 23:21:37 +08:00
Tw93
8a0b98525c fix(install): implement atomic update to prevent binary corruption
- Use temporary files (*.new) during installation process
- Perform atomic 'mv -f' operation to replace binaries
- Prevent partial updates if process is interrupted/fails
- Fixes critical issue where failed update deleted existing app
2026-01-04 23:17:42 +08:00
Tw93
b044fa3e60 chore: auto format code 2026-01-04 09:52:09 +00:00
Tw93
3906c020fe fix: improve cleanup by exiting alt screen and refine whitelisting for directory paths and R renv cache. 2026-01-04 17:41:14 +08:00
Tw93
aedeed1817 fix: refine terminal alt screen management with IN_ALT_SCREEN flag and conditional message display 2026-01-04 17:38:32 +08:00
Tw93
9d59649b51 feat(debug): add detailed debug output for clean operations
- Add classify_cleanup_risk() for risk level classification (LOW/MEDIUM/HIGH)
- Enhance safe_clean() with operation details and risk info
- Show item counts and file lists in debug mode
- Support for lib/clean/user.sh debug enhancements
- Part of GitHub issue #242 implementation
2026-01-04 17:30:41 +08:00
Tw93
9f504dc249 feat: implement installer cleanup functionality, add ZIP and file descriptor installer tests, and update README 2026-01-04 15:46:48 +08:00
Tw93
ad42266b09 refactor: rename installers command to installer across commands, script, and documentation. 2026-01-04 10:23:23 +08:00
Tw93
4680982ea1 Merge pull request #240 from JackPhallen/feat/installers-clean
feat: Create utility to find stale app installers
2026-01-04 10:12:00 +08:00
Jack Phallen
a2f071fd48 feat: Create utility to find stale app installers 2026-01-03 10:00:57 -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
3e1f22b3f7 feat: Add mo alias to zsh completion. 2026-01-03 14:03:45 +08:00
Tw93
f85f40b67c Merge branch 'main' of github.com:tw93/Mole 2026-01-02 17:47:55 +08:00
Tw93
1923a6bf2f chore: Add shellcheck directives and consolidate file writes. 2026-01-02 10:14:36 +08:00
Tw93
78ded00847 chore: auto format code 2026-01-02 01:56:20 +00:00
Tw93
88f434f01a feat: Add browser version cleanup tests, enhance shell completion with new tests, and introduce core command definitions. 2026-01-02 09:55:42 +08:00
Jean-Jacques Martrès
553bd47127 feat: add shell completion script
This commit introduces a new `completion` command that provides shell
completion for bash, zsh, and fish.

The completion is implemented as a shell script in `bin/completion.sh`
and the main `mole` script has been updated to use it.

This approach was chosen to keep the completion logic in shell script,
as the `mole` command is primarily a set of shell scripts.
2026-01-01 15:27:23 +01:00
Tw93
1e8ff30fa1 chore: auto format code 2025-12-31 08:24:02 +00: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
b5b09461c7 feat: add spinner feedback to optimization tasks, enhance app discovery for uninstall, and improve UI robustness and signal handling 2025-12-31 10:59:50 +08:00
Tw93
bb49ec3170 fix: Improve shell script robustness by adding variable validation and safer du output parsing. 2025-12-30 18:07:48 +08:00