- Add protection checks to Go analyze tool before delete operations
- Use try/finally to ensure Windows Update service restarts after cleanup
- Don't count interactive uninstall as automatic success
- Tighten orphaned app detection with stricter prefix matching
- Fix Test-IsProtectedPath -> Test-ProtectedPath in CI workflow
- Fix purge.ps1 to handle boolean return from Remove-SafeItem
- Add C:\Program Files and C:\Program Files (x86) to ProtectedPaths
- Fix openInExplorer to actually execute explorer.exe (was a no-op)
- Load System.Windows.Forms assembly before using Clipboard
- Use Remove-SafeItem in purge for consistent safety checks
- Fix Dropbox typo (was DroplboxCache)
- Reduce timeout from 5s to 500ms per directory
- Limit scan depth to 3 levels for quick size estimation
- Reduce max files scanned from 50k to 10k
- Results now appear in 1-2 seconds instead of minutes
- Fix analyze: Add timeout and depth limits to calculateDirSize() to prevent
indefinite scanning on large directories like user profile
- Fix purge: Add null checks for .Count property access under StrictMode
- Fix uninstall: Wrap registry property access in try/catch for items without
DisplayName, and add null checks throughout
- Fix mole.ps1: Add null check for Arguments.Count
- Add try/catch around CursorVisible calls for non-interactive terminals
All 73 Pester tests and all Go tests pass.
- Fix mole.cmd batch launcher to properly pass switch arguments
- Store %~dp0 before parse loop to avoid expansion issues
- Use PowerShell splatting in Invoke-MoleCommand for proper switch handling
- Rename $script:DryRun to $script:MoleDryRunMode in file_ops.ps1 to avoid
variable shadowing when dot-sourcing
- Handle switches passed as strings (e.g., '-ShowHelp') in mole.ps1 Main()
Fixes issue where 'mole clean -DryRun' would run cleanup instead of preview.
- Pester test suite for PowerShell scripts (Core, Clean, Commands)
- Go tests for TUI tools (analyze, status)
- GitHub Actions workflow for Windows CI
- Build and test automation scripts (test.ps1, build.ps1)
Add Go-based TUI tools for Windows:
- cmd/analyze: Interactive disk space analyzer with Bubble Tea
- cmd/status: Real-time system health monitor using gopsutil/WMI
- bin/analyze.ps1: Wrapper script for analyze tool
- bin/status.ps1: Wrapper script for status tool
- Makefile: Build automation for Go tools
- Updated README.md with Phase 3 documentation
Add cleanup modules and command scripts for Windows:
- lib/clean: user, caches, dev, apps, system cleanup modules
- bin/clean: deep cleanup orchestrator with dry-run and whitelist
- bin/uninstall: interactive app uninstaller
- bin/optimize: system optimization and health checks
- bin/purge: project artifact cleanup
All scripts support dry-run mode and follow safe deletion practices.
- Simplified banner in install.ps1 and ui.ps1 to avoid Unicode box-drawing
characters that caused parsing errors on some Windows systems
- Fixed PowerShell 5.1 compatibility for ANSI color codes using [char]27
- Renamed Show-Help to Show-InstallerHelp to avoid potential conflicts
- Changed -Help parameter to -ShowHelp for consistency with mole.ps1
Add isolated Windows support in windows/ directory with zero changes to existing macOS code.
Phase 1 includes:
- install.ps1: Windows installer with PATH and shortcut support
- mole.ps1: Main CLI entry point with menu system
- lib/core/base.ps1: Core definitions, colors, icons, constants
- lib/core/common.ps1: Common functions loader
- lib/core/file_ops.ps1: Safe file operations with protection checks
- lib/core/log.ps1: Logging functions with colors
- lib/core/ui.ps1: Interactive UI components (menus, confirmations)
- go.mod/go.sum: Go module for future TUI tools
- README.md: Windows-specific documentation
Closes#273
- Add '/Library/Input Methods' to application scan paths
- Unprotect Sogou, QQ, and Baidu input methods from system critical list
- Enhance file cleanup logic to detect input method plugins and caches
- Allow clean uninstallation and deep cleaning of WeType, Sogou, etc.
- 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
- 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
- Add file metadata logging in safe_remove() and safe_sudo_remove()
- Log file type, size, and age when in debug mode
- Support both dry-run and actual removal scenarios
- Part of GitHub issue #242 implementation
- Add debug_operation_start() for operation section headers
- Add debug_operation_detail() for detailed operation info
- Add debug_file_action() for file operations with metadata
- Add debug_risk_level() for risk classification with colors
- All functions output to both stderr and log file
- Addresses GitHub issue #242