Fixes#313
Change browser process detection from pgrep -f (full command line match)
to pgrep -x (exact process name match) to prevent false positives.
Microsoft Teams processes contain 'Microsoft' in their paths and may have
Chromium-based components, which was causing them to be incorrectly
identified as Microsoft Edge during clean operations.
Changes:
- Chrome detection: pgrep -f → pgrep -x
- Edge detection: pgrep -f → pgrep -x
- Edge updater detection: pgrep -f → pgrep -x
This approach is consistent with Firefox detection and prevents Apps like
Microsoft Teams, Microsoft Office, or other Microsoft products from
triggering false Edge detection.
All existing tests pass (9/9 in clean_browser_versions.bats).
- 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
- Add logic to remove 0-byte files in ~/Library (maxdepth 1)
- Explicitly protect .localized files to preserve Finder localization
- Respect global whitelist patterns
- 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.
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.
- 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
- 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