New features:
- Add orphaned LaunchAgent/LaunchDaemon detection with 5-layer verification
- Layer 1: Check if program path exists
- Layer 2: Verify AssociatedBundleIdentifiers via mdfind
- Layer 3: Check Application Support directory activity (7 days)
- Layer 4: Fuzzy match app name in /Applications
- Layer 5: Special handling for PrivilegedHelperTools
- Only process user-level ~/Library/LaunchAgents (safer than system-level)
- Unload agent before removal using launchctl
Bug fixes:
- Handle paths with spaces correctly in orphaned_app_data cleanup
- Add nullglob state management to prevent word splitting
- Use IFS=$'\n' for proper array iteration
- Only count successful deletions (check safe_clean return value)
Tests:
- Add 4 new tests for is_launch_item_orphaned edge cases
- Add tests for space handling and deletion count accuracy
Fixes text remnants and extra blank lines when spinner messages change.
Issues fixed:
1. Text remnants when switching from longer to shorter messages (e.g., 'Cleaning...ems...')
2. Extra blank lines appearing after section headers
Root causes:
- \033[K only clears from cursor to end of line, leaving remnants when new messages are shorter
- stop_section_spinner was clearing lines even when no spinner was running
Changes:
- lib/core/base.sh:
- Changed stop_section_spinner(), safe_clear_line(), safe_clear_lines() to use \033[2K
- Added guard in stop_section_spinner to only clear when spinner is actually running
- lib/core/ui.sh:
- Clear line once when starting spinner (before loop) to ensure clean start
- Normal spinner rotation uses \r without clearing (performance optimization)
Performance: Line clearing happens only once per spinner start, not on every loop iteration.
Fixes#390
- 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
- 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
Detect and remove leftover LaunchDaemons, LaunchAgents, and
PrivilegedHelperTools from uninstalled apps like Sogou Input,
ClashX, ClashMac, and Nektony App Cleaner.
- 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.
- 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
- Refactor safe_clean to decouple deletion logic from size calculation
- Attempt deletion for all existing paths, even if size is 0 or unknown
- Correctly count failures only for files that existed but couldn't be removed
- 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)
- add ensure_user_dir/ensure_user_file helpers in lib/core/base.sh, including
sudo-aware ownership correction under the invoking user’s home
- use the helpers across clean/optimize/purge/uninstall/whitelist to create
cache and export files safely (no naked mkdir/touch), including log files and
dry-run exports
- ensure purge stats/count files and update message caches are pre-created with
safe permissions
- add Darwin version helpers and skip LaunchServices/dyld rebuild on macOS 15+,
keeping the existing corruption protection for earlier versions
- guard brew cache timestamp writes and TCC permission flags with safe file
creation to avoid root-owned artifacts