Repository navigation
Performance, Resource Control, Safety & Stability Release: Introduces unified Scan Performance modes (
EconomyandPower) with automatic hardware selection and Low Power/thermal step-down, offloads blocking I/O and shell execution to eliminate UI stalls, removes and protects macOS font/icon caches while adding per-user Darwin directory guards, refreshes Dashboard recent operations cards, fixes Liquid Glass scroll clipping on macOS 27.2.1+ and live language switching in Privacy, and improves cancellation logging and unknown-size cleanup handling.
🙏 Acknowledgments
Thanks to everyone who reported Liquid Glass scrolling and localization issues in issue #45, as well as users who shared CPU load and UI responsiveness feedback on Apple Silicon Macs.
⚡ Scan Performance & Engine Overhaul
🎚️ Unified Scan Performance Modes (Economy & Power)
- Two App-Wide Modes (
Economy,Power): AddedScanResourceModeandScanResourcePolicyunder Settings → Cleanup → Scan Performance, shared across Cleanup, Uninstaller, Disk Analyzer, Duplicates, and Dashboard viaScanResourcePolicyCenterand@TaskLocal ScanResourcePolicy.active. Both modes scan the same categories, depth, and safety rules — only CPU priority and parallelism change:- Economy:
.utilityQoS (TaskPriority.utility,DispatchQoS.utility,QualityOfService.utility,userInitiatedAllowingIdleSystemSleepactivity),1–2parallel categories (min(2, max(1, pCores / 2))). Keeps macOS and other apps responsive during scans. - Power:
.userInitiatedQoS, up to8parallel categories (min(8, max(2, pCores))). Automatically steps down toEconomywhen Low Power Mode is enabled orthermalState >= .serious(.seriousor.critical).
- Economy:
- Automatic Hardware Selection: Detects CPU brand, Apple Silicon status, P-core/E-core performance levels (
hw.perflevel0.physicalcpu/hw.perflevel1.physicalcpu), and physical RAM viasysctlbyname. Macs with ≤ 4 P-cores, ≤ 8 GB RAM, VMs without performance levels, or Intel CPUs default toEconomyon first launch; higher-core Apple Silicon Macs default toPower. - One-Time Economy Banner & Settings UX: Displays a single contextual banner (
ResourceModeBannerView) whenEconomyis auto-selected on first visit to Cleanup, Uninstaller, Disk Analyzer, or Duplicates (not Dashboard, and deferred while Full Disk Access or Update sheets are open), with an Open Settings button that scrolls directly to Settings → Cleanup → Scan Performance. Settings displays a Recommended for your Mac badge, a warning whenPoweris chosen onEconomy-recommended Macs (including an Intel-specific note), and an Important notes block — localized across all 14 languages. - Timeout Retries & Unknown-Size Handling: Categories that time out on the main parallel pass are queued and retried once sequentially at 2× timeout. Directory sizing (
getDirectorySizeWithTimeout) invalidates the path cache and retries once at 2× timeout before marking the entry as Size unknown (isSizeUnknown, unselected by default) instead of silently dropping it. Explicitly selected size-unknown paths and review targets still clean within the timeout and logremoved (size unknown).
🚀 Responsiveness, I/O & Shell Execution
- No Main-Thread Stalls or QoS Escalation: Root scan workers run via
Task.detachedwith the active policy's priority instead of inheriting.userInitiatedfrom@MainActor. Engine events batch off-main (CleanupEventBatcher, 120 ms batches + synchronous final drain),CleanupItemManagerusesO(1)path-set deduplication and incremental totals, Dashboard category updates cap at ~4–5 Hz (220 ms),FileManager.trashItemandpermanentlyDeleterun off@MainActorviaBlockingIO, andAnimatedScanViewrenders a single adaptive instance at 30 FPS (paused with Reduce Motion). Startup auto-scan waits for the initial Dashboard update. - Offloaded Blocking I/O & Single-Pass Cleanup Sizing: Moved blocking filesystem traversals off Swift Concurrency's cooperative pool onto a dedicated concurrent
BlockingIODispatchQueuehonoring per-callDispatchQoSwith lightweightCancellationFlagchecks (PosixScannerbounded by policy concurrency). Removed redundant post-deletion directory walks by summing actually deleted item sizes (invalidating caches before measuring CLI package managers). - Single-Probe Shell & Cached
PATH: PrewarmsUserShellEnvironmenton launch and resolves userPATHonce per session via a single-flight login-shell probe (3s timeout, marker-delimited parsing, 60s retry on fallback). Standard CLI tools run through/usr/bin/envwith cachedPATHand policy QoS instead of spawning nestedbash/zshshells.CommandCachecaches only found tools so newly installed CLIs are detected. Added-l -cexecution and argument escaping (ShellQuoting.fishQuoted,nuQuoted,isSafeNuCommandName) forfishandnushell.
🛡️ Safety Hardening & Cleanup Accuracy
- Font Cache Category Removed & Protected (41 Categories, 2,422 Paths): Removed the
atsutilFont Cache cleanup category and its restart-required prompt to prevent font and icon rendering corruption.SafetyManager.isProtectedFontOrIconPathnow blocks macOS font/icon caches (com.apple.fontd,com.apple.fontregistry,com.apple.ats,com.apple.iconservices,com.apple.iconservices.store) and/Library/Fonts/~/Library/Fontsduring both scan and cleanup. - Per-User Darwin Directory Guards (
DarwinUserDirectories): Resolves per-user…/C,…/T, and…/Xdirectories alongsideNSTemporaryDirectory().FileSystemContextallows current-user…/Cand…/Xfor Uninstaller inspection whileSafetyManagerprotects/var/folders,/private/var/folders, root…/C/…/Xdirectories, all…/C/…/Xpaths during Cleanup, andcom.apple.*entries during Uninstall. - Accurate Cancellation Logging: Cancelling a cleanup run preserves completed categories and already-freed bytes (
freedBytesTally), records.trashvs.permanenttransaction modes accurately when cancelled before emptying Trash, and writes a single category record even when interrupted mid-category. - Dynamic Cache & Preview Accuracy: Unselected
~/Library/Cachesentries are skipped before sizing and excluded from logs and skipped counts. Non-deletable review items no longer inflate parent group sizes or alter parent risk ratings.
🪟 UI Polish, Liquid Glass & Localization (Issue #45)
- Liquid Glass Scroll Clipping (macOS 27.2.1+): Scoped
GlassEffectContainerstrictly to pinned headers and footers in Privacy, Startup Services, Cleanup, Uninstaller, Dashboard, and Disk Analyzer so scrollable controls no longer bleed over headers or the title bar. AddedrowButtonStyle()(.bordered/.borderedProminent) for scrolling rows/cards andGlassPillPicker(surface: .content)with horizontal scrolling fallback for narrow windows. Pinned filter pickers aboveScrollViewin Privacy → Network and Disk Analyzer. - Dashboard Recent Operations & Live Rings: Redesigned
CleanupCardViewwith category-colored icons, relative timestamps, proportional freed-space bars, trigger and deletion-mode chips (Trash/Permanent/Mixed), direct click-to-history navigation, a cleanup count badge, and an empty-state hint. RefinedDiskRingsChartViewprogressive scanning arcs and 30 FPS animations with Reduce Motion support. - Live Language Switching in Privacy & 14-Language Parity: Replaced cached localized strings in
PrivacyViewModelandTCCDatabaseStatuswith render-time localization (PrivacyNotice), cleared staleerrorMessageon language change so Safari banners and TCC status notices update immediately, removed duplicateuninstaller_show_in_finderkeys across.lprojfiles, and added duplicate-key tests across all 14 languages.
📦 Download & Verification
| Asset | Description |
|---|---|
MacOSCleaner.dmg |
Release DMG for Apple Silicon (arm64), macOS 26.0+ |
System Requirements: macOS 26.0+ on Apple Silicon (
arm64only).
# Clear Gatekeeper quarantine flag on first launch (for direct DMG downloads):
xattr -dr com.apple.quarantine /Applications/MacOSCleaner.appIf MacOSCleaner helped you, a ⭐ on the repo helps other people find it: https://github.com/AlexTkDev/MacOSCleaner