Free, open-source macOS cleaner. CleanMyMac alternative with zero telemetry. Native SwiftUI, scheduled auto-cleaning, Xcode/Homebrew/system cache cleanup. MIT licensed.
Swift cache-cleanercleanmymaccleanupdisk-cleanerdisk-spacehomebrewmac-utilitymacosmacos-appmacos-cleanermacosxnativeossosxprivacyswiftswiftuisystem-cleanerxcode-cleaner
Smart Care dashboard redesign; bump 2.9.3
momenbasele3a0536e43ef
diff --git a/PureMac.xcodeproj/project.pbxproj b/PureMac.xcodeproj/project.pbxprojindex 9b1352e..b9a48ae 100644--- a/PureMac.xcodeproj/project.pbxproj+++ b/PureMac.xcodeproj/project.pbxproj@@ -10,6 +10,7 @@013EF7B96BF046D4DB38FBC5 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 241E0895B09C71AB423B2F9E /* Localizable.strings */; };1B0D043102FDB245312A5147 /* AppFilesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798B80977D14647A5691B0A0 /* AppFilesView.swift */; };2253F11BDF561B617439C96B /* FullDiskAccessManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = E866A1541D289C69144A5E62 /* FullDiskAccessManager.swift */; };+ 25E2304A3FF257F1740E304B /* FileProtection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7953B398E47A4C603DE287F1 /* FileProtection.swift */; };27F449EDD1B082FE11FEC9DF /* SchedulerService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28181F034530331A550C6A3D /* SchedulerService.swift */; };340E424F759ACCDE7372F99F /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5ADDC35F31E40780FB5D017 /* Theme.swift */; };41B27CACD7C6C7471EFD03F9 /* UpdateService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 022D0EAEE2B6E54069FC2CBE /* UpdateService.swift */; };@@ -21,6 +22,8 @@535B23C0108C06475215B8E8 /* AppTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB003A7751F05727DBFD1A5 /* AppTheme.swift */; };59B3096E2AE8ED0397B16798 /* AppLanguagePreferencesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491771F923C93FD61A263893 /* AppLanguagePreferencesTests.swift */; };61D285E96DED76FDCD54570F /* PermissionSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 069AAE87E3F9EDE5593AD8B3 /* PermissionSheet.swift */; };+ 68F9CE5ED4908F674D673FB2 /* BinaryThinner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B24B648B82186FC3B6EF2B /* BinaryThinner.swift */; };+ 6D449325D54B9850FC6C119F /* UniversalBinaryScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95EC878D25C244BF94D0094C /* UniversalBinaryScanner.swift */; };6E72022A661CBB41331A442C /* PermissionCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9DCBD97CC88D77AE8DB01A4 /* PermissionCoordinator.swift */; };75B5F0401D37F2872B1AD85A /* AppListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60E6BC61614B27C065BB18C9 /* AppListView.swift */; };76B132F9C499225D33E0D075 /* EmptyStateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 424F7B28624C271620E13BBC /* EmptyStateView.swift */; };@@ -33,12 +36,14 @@9AA80E035DF7B33F6EE118DF /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = CED1B71D5F9510582E869CFD /* AppState.swift */; };9BB5AAA574AFED6C27A3F8E2 /* AppPathFinder.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC0FEE7141871ED5F9E36121 /* AppPathFinder.swift */; };9E3639F9EFCB2A22F6747894 /* MenuBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 913E3064AA9BD7BE94A315CF /* MenuBarController.swift */; };+ 9E87638A3F12C12D93995DA7 /* LanguageFilesScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0899FE169D270DF95334905 /* LanguageFilesScanner.swift */; };A2AE68CC75CB72D6B10CBDF5 /* DashboardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F661A0F64CF93E482CB1728F /* DashboardView.swift */; };A549D8A39A9E5E70D91B90A6 /* Haptics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40A3F22FCEF534DE4A2CAD0E /* Haptics.swift */; };A9C3A1F643C26930F442E729 /* OrphanSafetyPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AE790496C936424EF98320A /* OrphanSafetyPolicy.swift */; };ABDDD4F35102A39CC1A2C325 /* ConfettiView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0599AA604B0D6BA4F957537 /* ConfettiView.swift */; };B51E5A95BB49A6C0F5273E21 /* FileSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE522B406791BCE905BC55B /* FileSize.swift */; };B52938BBD11842631314543D /* CategoryDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B0AF194677EAC1D5568785 /* CategoryDetailView.swift */; };+ B928E4369A3FC4369F014A29 /* SmartCareCoreArtwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAA389C4F50505795FB31A51 /* SmartCareCoreArtwork.swift */; };BC6C800216343438413349A3 /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D4FD34378988D430A582ED0 /* OnboardingView.swift */; };CDCDFEBA39A3290101F86AC6 /* MainWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F510F232341EE18F11DC934 /* MainWindow.swift */; };CFA64F54CDBF8A4765E0068D /* LocalizationFilesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155CE1B8CDCCCA6F9FD028C1 /* LocalizationFilesTests.swift */; };@@ -99,26 +104,31 @@607B9A8C7B34D6A7DCF4FFE2 /* PureMacTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PureMacTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };60E6BC61614B27C065BB18C9 /* AppListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppListView.swift; sourceTree = "<group>"; };63581B70F9B10231964E3602 /* PureMacApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PureMacApp.swift; sourceTree = "<group>"; };+ 69B24B648B82186FC3B6EF2B /* BinaryThinner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BinaryThinner.swift; sourceTree = "<group>"; };752603285F7DBBA12BB3AA91 /* AppStateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppStateTests.swift; sourceTree = "<group>"; };77D3D9A9BC52839E6D0A22BC /* Locations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Locations.swift; sourceTree = "<group>"; };+ 7953B398E47A4C603DE287F1 /* FileProtection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileProtection.swift; sourceTree = "<group>"; };798B80977D14647A5691B0A0 /* AppFilesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppFilesView.swift; sourceTree = "<group>"; };82BB0904726B38DEB141BECA /* AppLanguage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLanguage.swift; sourceTree = "<group>"; };8CE522B406791BCE905BC55B /* FileSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSize.swift; sourceTree = "<group>"; };8D5E63D733D1A3BDEDF4DCA5 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };913E3064AA9BD7BE94A315CF /* MenuBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarController.swift; sourceTree = "<group>"; };92259B3E9F4468865F15DEEC /* AppearancePill.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppearancePill.swift; sourceTree = "<group>"; };+ 95EC878D25C244BF94D0094C /* UniversalBinaryScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UniversalBinaryScanner.swift; sourceTree = "<group>"; };9F04B811BB0012F6D2F07F91 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };9F510F232341EE18F11DC934 /* MainWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainWindow.swift; sourceTree = "<group>"; };A27DB5A70FA829B6C3ED0AC3 /* MenuBarMonitorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuBarMonitorView.swift; sourceTree = "<group>"; };A711CDF5285F68775D9B5513 /* ScanEngine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanEngine.swift; sourceTree = "<group>"; };AC0FEE7141871ED5F9E36121 /* AppPathFinder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppPathFinder.swift; sourceTree = "<group>"; };- A1B3C4D5E6F7A8B9C0D1E2F3 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };B2CD0028599BE178B96F18A6 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = "<group>"; };B2EA41E1096FA8E3B916AD13 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };B71E8F62DB76D85F41F9A2E9 /* OrphanListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrphanListView.swift; sourceTree = "<group>"; };+ C0899FE169D270DF95334905 /* LanguageFilesScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageFilesScanner.swift; sourceTree = "<group>"; };+ C5963EBBEE5BA6E147700821 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };C5ADDC35F31E40780FB5D017 /* Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = "<group>"; };CB94E06E145558123BB5BFB3 /* Conditions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Conditions.swift; sourceTree = "<group>"; };CED1B71D5F9510582E869CFD /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = "<group>"; };+ DAA389C4F50505795FB31A51 /* SmartCareCoreArtwork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmartCareCoreArtwork.swift; sourceTree = "<group>"; };DB798781B99987F55D77E2E3 /* SystemMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemMonitor.swift; sourceTree = "<group>"; };E866A1541D289C69144A5E62 /* FullDiskAccessManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullDiskAccessManager.swift; sourceTree = "<group>"; };EEF15CB1B8EFCA78EF491824 /* ScanError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanError.swift; sourceTree = "<group>"; };@@ -196,6 +206,7 @@6184B2EC3D01E6E95633406E /* Services */ = {isa = PBXGroup;children = (+ 69B24B648B82186FC3B6EF2B /* BinaryThinner.swift */,2A8DE5D45BA19E2670B57DC5 /* CleaningEngine.swift */,E866A1541D289C69144A5E62 /* FullDiskAccessManager.swift */,40A3F22FCEF534DE4A2CAD0E /* Haptics.swift */,@@ -237,6 +248,7 @@231FF7CBB5F621B66F2AB8A5 /* FDADemoView.swift */,A27DB5A70FA829B6C3ED0AC3 /* MenuBarMonitorView.swift */,069AAE87E3F9EDE5593AD8B3 /* PermissionSheet.swift */,+ DAA389C4F50505795FB31A51 /* SmartCareCoreArtwork.swift */,);path = Components;sourceTree = "<group>";@@ -278,6 +290,7 @@isa = PBXGroup;children = (01B2C5F66B6D812572BD4F05 /* CLI.swift */,+ 7953B398E47A4C603DE287F1 /* FileProtection.swift */,8CE522B406791BCE905BC55B /* FileSize.swift */,5785762276FB5E3209C6DE4D /* Logger.swift */,4AE790496C936424EF98320A /* OrphanSafetyPolicy.swift */,@@ -310,8 +323,10 @@23486A54A82EE3865B784D1C /* AppInfoFetcher.swift */,AC0FEE7141871ED5F9E36121 /* AppPathFinder.swift */,CB94E06E145558123BB5BFB3 /* Conditions.swift */,+ C0899FE169D270DF95334905 /* LanguageFilesScanner.swift */,77D3D9A9BC52839E6D0A22BC /* Locations.swift */,1D3AC5F17D7CA94FAB1E8D7A /* StringNormalization.swift */,+ 95EC878D25C244BF94D0094C /* UniversalBinaryScanner.swift */,);path = Scanning;sourceTree = "<group>";@@ -442,6 +457,7 @@9AA80E035DF7B33F6EE118DF /* AppState.swift in Sources */,535B23C0108C06475215B8E8 /* AppTheme.swift in Sources */,95278ABDCF5F4D6AC60503B1 /* AppearancePill.swift in Sources */,+ 68F9CE5ED4908F674D673FB2 /* BinaryThinner.swift in Sources */,F2FA881A4B2209CC2A6342FB /* CLI.swift in Sources */,B52938BBD11842631314543D /* CategoryDetailView.swift in Sources */,48D1431A7C99C19EEBDB056B /* CleaningEngine.swift in Sources */,@@ -451,9 +467,11 @@A2AE68CC75CB72D6B10CBDF5 /* DashboardView.swift in Sources */,76B132F9C499225D33E0D075 /* EmptyStateView.swift in Sources */,52F11962555C639F0EECADD6 /* FDADemoView.swift in Sources */,+ 25E2304A3FF257F1740E304B /* FileProtection.swift in Sources */,B51E5A95BB49A6C0F5273E21 /* FileSize.swift in Sources */,2253F11BDF561B617439C96B /* FullDiskAccessManager.swift in Sources */,A549D8A39A9E5E70D91B90A6 /* Haptics.swift in Sources */,+ 9E87638A3F12C12D93995DA7 /* LanguageFilesScanner.swift in Sources */,E60B0A2C5D0A6CAE35BF4DFB /* Locations.swift in Sources */,DDDA5879006CB97D5D7BDD87 /* Logger.swift in Sources */,CDCDFEBA39A3290101F86AC6 /* MainWindow.swift in Sources */,@@ -470,9 +488,11 @@D50EB059E741011EB2523731 /* ScanError.swift in Sources */,27F449EDD1B082FE11FEC9DF /* SchedulerService.swift in Sources */,93743B036059418560D876E6 /* SettingsView.swift in Sources */,+ B928E4369A3FC4369F014A29 /* SmartCareCoreArtwork.swift in Sources */,47C5ECD49C4DD75F271DB6CE /* StringNormalization.swift in Sources */,DBFD73E3D9BDA74EC1CA56AB /* SystemMonitor.swift in Sources */,340E424F759ACCDE7372F99F /* Theme.swift in Sources */,+ 6D449325D54B9850FC6C119F /* UniversalBinaryScanner.swift in Sources */,41B27CACD7C6C7471EFD03F9 /* UpdateService.swift in Sources */,);runOnlyForDeploymentPostprocessing = 0;@@ -505,7 +525,7 @@9F04B811BB0012F6D2F07F91 /* en */,340D303C60FF878B019056B6 /* es */,5A5C80929EE4A430272674BC /* ja */,- A1B3C4D5E6F7A8B9C0D1E2F3 /* pl */,+ C5963EBBEE5BA6E147700821 /* pl */,8D5E63D733D1A3BDEDF4DCA5 /* pt-BR */,2641C6376DD6F5889F35510E /* zh-Hans */,02E502E2B5C6AECC76E5CFEF /* zh-Hant */,@@ -556,7 +576,7 @@CODE_SIGN_STYLE = Automatic;COMBINE_HIDPI_IMAGES = YES;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 18;+ CURRENT_PROJECT_VERSION = 24;DEBUG_INFORMATION_FORMAT = dwarf;DEVELOPMENT_TEAM = H3WXHVTP97;ENABLE_STRICT_OBJC_MSGSEND = YES;@@ -578,7 +598,7 @@GENERATE_INFOPLIST_FILE = NO;INFOPLIST_FILE = PureMac/Info.plist;MACOSX_DEPLOYMENT_TARGET = 13.0;- MARKETING_VERSION = 2.8.3;+ MARKETING_VERSION = 2.9.3;MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;MTL_FAST_MATH = YES;ONLY_ACTIVE_ARCH = NO;@@ -680,7 +700,7 @@CODE_SIGN_STYLE = Automatic;COMBINE_HIDPI_IMAGES = YES;COPY_PHASE_STRIP = NO;- CURRENT_PROJECT_VERSION = 18;+ CURRENT_PROJECT_VERSION = 24;DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";DEVELOPMENT_TEAM = H3WXHVTP97;ENABLE_NS_ASSERTIONS = NO;@@ -696,7 +716,7 @@GENERATE_INFOPLIST_FILE = NO;INFOPLIST_FILE = PureMac/Info.plist;MACOSX_DEPLOYMENT_TARGET = 13.0;- MARKETING_VERSION = 2.8.3;+ MARKETING_VERSION = 2.9.3;MTL_ENABLE_DEBUG_INFO = NO;MTL_FAST_MATH = YES;ONLY_ACTIVE_ARCH = NO;diff --git a/PureMac/Assets.xcassets/SmartCareCore.imageset/Contents.json b/PureMac/Assets.xcassets/SmartCareCore.imageset/Contents.jsonnew file mode 100644index 0000000..adfb8f5--- /dev/null+++ b/PureMac/Assets.xcassets/SmartCareCore.imageset/Contents.json@@ -0,0 +1,17 @@+{+ "images" : [+ {+ "filename" : "smart-care-core.png",+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "idiom" : "universal",+ "scale" : "2x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/PureMac/Assets.xcassets/SmartCareCore.imageset/smart-care-core.png b/PureMac/Assets.xcassets/SmartCareCore.imageset/smart-care-core.pngnew file mode 100644index 0000000..c5f6208Binary files /dev/null and b/PureMac/Assets.xcassets/SmartCareCore.imageset/smart-care-core.png differdiff --git a/PureMac/ViewModels/AppState.swift b/PureMac/ViewModels/AppState.swiftindex c8544ca..4f6cf76 100644--- a/PureMac/ViewModels/AppState.swift+++ b/PureMac/ViewModels/AppState.swift@@ -829,6 +829,8 @@ final class AppState: ObservableObject {scanProgress = 1.0scanTicker.path = ""+ scanState = .scanning(progress: 1.0, currentCategory: "Finishing scan")+ try? await Task.sleep(nanoseconds: 800_000_000)scanState = .completedloadDiskInfo()}@@ -853,6 +855,8 @@ final class AppState: ObservableObject {totalJunkSize = categoryResults.values.reduce(0) { $0 + $1.totalSize }scanProgress = 1.0scanTicker.path = ""+ scanState = .scanning(progress: 1.0, currentCategory: "Finishing scan")+ try? await Task.sleep(nanoseconds: 800_000_000)scanState = .completed}}diff --git a/PureMac/Views/Components/AppTheme.swift b/PureMac/Views/Components/AppTheme.swiftindex 9594bd8..c58ca6a 100644--- a/PureMac/Views/Components/AppTheme.swift+++ b/PureMac/Views/Components/AppTheme.swift@@ -73,6 +73,17 @@ enum TintGradient {colors: [Tint.blue, Tint.purple],startPoint: .topLeading, endPoint: .bottomTrailing)+ /// Immersive Smart Care backdrop. Kept separate from `accent` so primary+ /// controls stay bright while the dashboard can use a deeper scenic plane.+ static let smartCare = LinearGradient(+ colors: [+ Color(red: 0.025, green: 0.031, blue: 0.047),+ Color(red: 0.035, green: 0.051, blue: 0.086),+ Color(red: 0.018, green: 0.071, blue: 0.108)+ ],+ startPoint: .topLeading,+ endPoint: .bottomTrailing+ )static let destructive = LinearGradient(colors: [Tint.red, Tint.red.opacity(0.8)],startPoint: .top, endPoint: .bottomdiff --git a/PureMac/Views/Components/SmartCareCoreArtwork.swift b/PureMac/Views/Components/SmartCareCoreArtwork.swiftnew file mode 100644index 0000000..7149980--- /dev/null+++ b/PureMac/Views/Components/SmartCareCoreArtwork.swift@@ -0,0 +1,307 @@+import SwiftUI++/// A semantic storage sculpture: its layers represent the checks PureMac+/// performs while the inspection light follows real scan and cleanup progress.+struct SmartCareCoreArtwork: View {+ enum Phase: Equatable {+ case idle+ case scanning(Double)+ case review+ case cleaning(Double)+ case success++ var tint: Color {+ switch self {+ case .idle: return Tint.cyan+ case .scanning: return Tint.blue+ case .review, .cleaning: return Tint.orange+ case .success: return Tint.green+ }+ }++ var progress: Double? {+ switch self {+ case .scanning(let value), .cleaning(let value):+ return max(0, min(1, value))+ case .idle, .review, .success:+ return nil+ }+ }++ var isWorking: Bool {+ switch self {+ case .scanning, .cleaning: return true+ case .idle, .review, .success: return false+ }+ }++ }++ let phase: Phase+ var size: CGFloat = 330++ @State private var hovering = false+ @State private var hoverLocation: CGPoint?+ @State private var tilt = CGSize.zero+ @State private var isDragging = false+ @State private var settleGeneration = 0+ @Environment(\.accessibilityReduceMotion) private var reduceMotion++ var body: some View {+ ZStack {+ Image("SmartCareCore")+ .resizable()+ .scaledToFit()+ .contrast(1.02)+ .saturation(phase.isWorking ? 0.28 : (phase == .success ? 0.82 : 0.94))+ .brightness(phase == .success ? 0.045 : 0)+ .shadow(+ color: phase.tint.opacity(phase.isWorking ? 0.22 : 0.12),+ radius: phase.isWorking ? 22 : 14,+ y: 5+ )+ .animation(reduceMotion ? nil : MotionTokens.gentle, value: phase)++ phaseLight++ interactionHighlight+ }+ .scaleEffect(interactionScale)+ .offset(y: isDragging && !reduceMotion ? -5 : 0)+ .rotation3DEffect(+ .degrees(Double(rotationAngle)),+ axis: rotationAxis,+ perspective: 0.42+ )+ .shadow(+ color: Color.black.opacity(isDragging ? 0.42 : 0.24),+ radius: isDragging ? 28 : 16,+ y: isDragging ? 18 : 9+ )+ .animation(+ reduceMotion ? nil : .spring(response: 0.28, dampingFraction: 0.86),+ value: hoverLocation+ )+ .frame(width: size, height: size)+ .contentShape(RoundedRectangle(cornerRadius: size * 0.18, style: .continuous))+ .onContinuousHover { hoverPhase in+ switch hoverPhase {+ case .active(let location):+ hovering = true+ hoverLocation = location+ case .ended:+ hovering = false+ hoverLocation = nil+ }+ }+ .gesture(tiltGesture)+ .help("Drag to tilt")+ .onDisappear {+ settleGeneration += 1+ }+ .accessibilityHidden(true)+ }++ private var tiltGesture: some Gesture {+ DragGesture(minimumDistance: 3, coordinateSpace: .local)+ .onChanged { value in+ guard !reduceMotion else { return }++ settleGeneration += 1+ var transaction = Transaction()+ transaction.disablesAnimations = true+ withTransaction(transaction) {+ isDragging = true+ tilt = boundedTilt(for: value.translation)+ }+ }+ .onEnded { value in+ guard !reduceMotion else {+ tilt = .zero+ isDragging = false+ return+ }++ settleGeneration += 1+ let generation = settleGeneration+ let current = boundedTilt(for: value.translation)+ let predicted = boundedTilt(for: value.predictedEndTranslation)+ let projected = boundedVector(+ CGSize(+ width: current.width + (predicted.width - current.width) * 0.22,+ height: current.height + (predicted.height - current.height) * 0.22+ ),+ maximum: 10+ )++ withAnimation(.easeOut(duration: 0.1)) {+ isDragging = false+ tilt = projected+ }++ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {+ guard settleGeneration == generation else { return }+ withAnimation(.spring(response: 0.46, dampingFraction: 0.78)) {+ tilt = .zero+ }+ }+ }+ }++ private var activeTilt: CGSize {+ guard !reduceMotion else { return .zero }+ if isDragging || tilt != .zero {+ return tilt+ }++ guard let hoverLocation else {+ return hovering ? CGSize(width: 1.8, height: -1.1) : .zero+ }+ return boundedVector(+ CGSize(+ width: (hoverLocation.x / size - 0.5) * 7,+ height: (hoverLocation.y / size - 0.5) * 6+ ),+ maximum: 3.5+ )+ }++ private var rotationAngle: CGFloat {+ hypot(activeTilt.width, activeTilt.height)+ }++ private var rotationAxis: (x: CGFloat, y: CGFloat, z: CGFloat) {+ let angle = rotationAngle+ guard angle > 0.001 else {+ return (x: 1, y: 0, z: 0)+ }+ return (+ x: -activeTilt.height / angle,+ y: activeTilt.width / angle,+ z: 0+ )+ }++ private var interactionScale: CGFloat {+ guard !reduceMotion else { return 1 }+ if isDragging { return 1.035 }+ return hovering ? 1.018 : 1+ }++ private var interactionHighlight: some View {+ LinearGradient(+ colors: [+ Color.white.opacity(isDragging ? 0.2 : 0.1),+ Color.clear,+ phase.tint.opacity(isDragging ? 0.08 : 0.035)+ ],+ startPoint: UnitPoint(+ x: clamped(0.28 + activeTilt.width / 36, to: 0.08...0.48),+ y: clamped(0.18 + activeTilt.height / 40, to: 0.06...0.42)+ ),+ endPoint: UnitPoint(+ x: clamped(0.72 + activeTilt.width / 36, to: 0.52...0.92),+ y: clamped(0.82 + activeTilt.height / 40, to: 0.58...0.94)+ )+ )+ .blendMode(.screen)+ .mask(+ Image("SmartCareCore")+ .resizable()+ .scaledToFit()+ )+ .opacity(hovering || isDragging || tilt != .zero ? 1 : 0)+ }++ private func boundedTilt(for translation: CGSize) -> CGSize {+ boundedVector(+ CGSize(+ width: translation.width / size * 30,+ height: translation.height / size * 30+ ),+ maximum: 10+ )+ }++ private func boundedVector(_ vector: CGSize, maximum: CGFloat) -> CGSize {+ let magnitude = hypot(vector.width, vector.height)+ guard magnitude > maximum, magnitude > 0 else { return vector }+ let scale = maximum / magnitude+ return CGSize(width: vector.width * scale, height: vector.height * scale)+ }++ private func clamped(_ value: CGFloat, to range: ClosedRange<CGFloat>) -> CGFloat {+ min(max(value, range.lowerBound), range.upperBound)+ }++ @ViewBuilder+ private var phaseLight: some View {+ if let progress = phase.progress {+ inspectionFill(progress: progress)+ } else if phase == .review {+ edgeGlow(color: Tint.orange, opacity: 0.14)+ } else if phase == .success {+ edgeGlow(color: Tint.green, opacity: 0.18)+ }+ }++ private func inspectionFill(progress: Double) -> some View {+ let clamped = max(0, min(1, progress))+ let fillHeight = size * CGFloat(clamped)+ let leadingEdgeOffset = size * (0.5 - CGFloat(clamped))++ return ZStack {+ VStack(spacing: 0) {+ Spacer(minLength: 0)+ LinearGradient(+ colors: [+ Color.white.opacity(0.34),+ phase.tint.opacity(0.72),+ phase.tint.opacity(0.3)+ ],+ startPoint: .top,+ endPoint: .bottom+ )+ .frame(height: fillHeight)+ }++ LinearGradient(+ colors: [+ Color.clear,+ phase.tint.opacity(0.72),+ Color.white.opacity(0.38),+ phase.tint.opacity(0.56),+ Color.clear+ ],+ startPoint: .top,+ endPoint: .bottom+ )+ .frame(height: size * 0.14)+ .offset(y: leadingEdgeOffset)+ .opacity(clamped > 0 ? 1 : 0)+ }+ .frame(width: size, height: size)+ .blendMode(.screen)+ .mask(+ Image("SmartCareCore")+ .resizable()+ .scaledToFit()+ )+ .animation(reduceMotion ? nil : .easeInOut(duration: 0.28), value: clamped)+ }++ private func edgeGlow(color: Color, opacity: Double) -> some View {+ RadialGradient(+ colors: [color.opacity(opacity), .clear],+ center: UnitPoint(x: 0.53, y: 0.52),+ startRadius: 0,+ endRadius: size * 0.42+ )+ .blendMode(.screen)+ .mask(+ Image("SmartCareCore")+ .resizable()+ .scaledToFit()+ )+ }+}diff --git a/PureMac/Views/DashboardView.swift b/PureMac/Views/DashboardView.swiftindex c90a99c..0ca6b7e 100644--- a/PureMac/Views/DashboardView.swift+++ b/PureMac/Views/DashboardView.swift@@ -6,6 +6,8 @@ import SwiftUI/// at-a-glance view, and delegates active-scan progress to inline state UI.struct DashboardView: View {@EnvironmentObject var appState: AppState+ var onNavigate: (AppSection) -> Void = { _ in }+@State private var showConfirmation = false@State private var fireCleanConfetti = false@State private var lastCleanedScanState: Bool = false@@ -35,20 +37,15 @@ struct DashboardView: View {var body: some View {ZStack {ScrollView {- VStack(alignment: .leading, spacing: 20) {+ VStack(alignment: .leading, spacing: 14) {+ pageHeader+switch appState.scanState {case .idle:hero.transition(heroTransition)- stats- if appState.diskInfo.totalSpace > 0 {- sectionHeader("Storage composition")- storageComposition- }- if !suggestionRows.isEmpty {- sectionHeader("Suggested for you")- suggestions- }+ sectionHeader("Care areas")+ careOverviewcase .scanning:scanningHero.transition(heroTransition)@@ -60,9 +57,8 @@ struct DashboardView: View {completedHero.transition(heroTransition)if appState.totalJunkSize > 0 {- sectionHeader("By category")- categoryChartCard- resultsList+ sectionHeader("Review what was found")+ findingsGrid}case .cleaning:cleaningHero@@ -72,9 +68,10 @@ struct DashboardView: View {.transition(heroTransition)}}- .padding(.horizontal, 28)- .padding(.vertical, 24)- .frame(maxWidth: 920, alignment: .leading)+ .padding(.horizontal, 24)+ .padding(.vertical, 18)+ .frame(maxWidth: 1220, alignment: .leading)+ .frame(maxWidth: .infinity, alignment: .top).animation(reduceMotion ? nil : MotionTokens.gentle, value: appState.scanState)}@@ -129,6 +126,84 @@ struct DashboardView: View {}}+ // MARK: - Page chrome++ private var pageHeader: some View {+ let status = headerStatus++ return HStack(alignment: .top, spacing: 18) {+ VStack(alignment: .leading, spacing: 4) {+ Text("Smart Care")+ .font(.system(size: 24, weight: .bold))+ .tracking(-0.45)+ .accessibilityAddTraits(.isHeader)+ Text(headerSubtitle)+ .font(.system(size: 12.5))+ .foregroundStyle(.secondary)+ .lineLimit(1)+ }++ Spacer(minLength: 20)++ HStack(spacing: 12) {+ StatusChip(+ label: status.label,+ systemImage: status.systemImage,+ tint: status.tint+ )+ TimelineView(.periodic(from: .now, by: 60)) { timeline in+ Text(lastCareText(relativeTo: timeline.date))+ .font(.system(size: 11))+ .foregroundStyle(.tertiary)+ }+ }+ }+ }++ private var headerSubtitle: String {+ switch appState.scanState {+ case .idle:+ return String(localized: "One scan checks every cleanup tool and prepares a plan for your review.")+ case .scanning:+ return String(localized: "PureMac is checking your Mac without removing anything.")+ case .completed:+ return String(localized: "Choose what to keep, then clean everything in one controlled pass.")+ case .cleaning:+ return String(localized: "Selected items are being removed safely.")+ case .cleaned:+ return String(localized: "Cleanup complete. Your storage summary is refreshing.")+ }+ }++ private var headerStatus: (label: String, systemImage: String, tint: Color) {+ switch appState.scanState {+ case .idle:+ return appState.hasFullDiskAccess+ ? (String(localized: "Ready"), "checkmark.circle.fill", Tint.green)+ : (String(localized: "Limited access"), "lock.fill", Tint.orange)+ case .scanning:+ return (String(localized: "Scanning"), "sparkles", Tint.blue)+ case .completed:+ return appState.totalJunkSize > 0+ ? (String(localized: "Review ready"), "list.bullet.clipboard.fill", Tint.orange)+ : (String(localized: "All clear"), "checkmark.seal.fill", Tint.green)+ case .cleaning:+ return (String(localized: "Cleaning"), "wand.and.stars", Tint.orange)+ case .cleaned:+ return (String(localized: "Complete"), "checkmark.seal.fill", Tint.green)+ }+ }++ private func lastCareText(relativeTo now: Date) -> String {+ guard let date = appState.lastCleanedDate else {+ return String(localized: "No cleanup run yet")+ }+ let formatter = RelativeDateTimeFormatter()+ formatter.unitsStyle = .full+ let relative = formatter.localizedString(for: date, relativeTo: now)+ return String(format: String(localized: "Last clean: %@"), relative)+ }+private var cleanConfirmationTitle: String {String(format: String(localized: "Clean %@?"),@@ -140,68 +215,141 @@ struct DashboardView: View {private var hero: some View {let total = appState.diskInfo.totalSpace- let used = appState.diskInfo.usedSpacelet free = appState.diskInfo.freeSpace- let percentUsed = total > 0 ? Double(used) / Double(total) : 0- let stress = percentUsed > 0.85- // Below this width the side-by-side ring + storage column overflows the- // card, so the hero stacks vertically and the ring shrinks.- let compact = dashboardSize.width > 0 && dashboardSize.width < 660- let ringSize: CGFloat = compact ? 132 : 176-- return CardSurface(padding: compact ? 20 : 26, elevation: .raised,- tint: stress ? Tint.orange : Tint.blue) {- VStack(spacing: compact ? 18 : 24) {- AdaptiveStack(compact: compact, spacing: compact ? 18 : 30) {- ZStack {- // Slow atmospheric drift behind the ring — barely-there- // ambient depth, frozen under Reduce Motion.- HeroDrift(tint: stress ? Tint.orange : Tint.blue)- HealthRing(percent: percentUsed)- .frame(width: ringSize, height: ringSize)- // Small satellite bubbles orbiting the ring — the- // playful counterweight to the matte stat cards.- OrbSatellites(tint: stress ? Tint.orange : Tint.blue, ringSize: ringSize)- }-- VStack(alignment: .leading, spacing: 12) {- HStack(alignment: .top) {- VStack(alignment: .leading, spacing: 5) {- HStack(spacing: 8) {- Text("Storage")- .font(.system(size: 12, weight: .semibold))- .foregroundStyle(.secondary)- .textCase(.uppercase)- .tracking(0.8)- if stress {- StatusChip(label: String(localized: "Low space"),- systemImage: "exclamationmark.triangle.fill",- tint: Tint.orange)- }- }- CountUpBytes(bytes: free)- .font(.system(size: 38, weight: .bold))- .foregroundStyle(stress ? Tint.orange : Color.primary)- Text(freeOfText(total: total))- .font(.system(size: 12.5))- .foregroundStyle(.secondary)- }- Spacer()- Button {- appState.startSmartScan()- } label: {- Label("Smart Scan", systemImage: "sparkles")- .padding(.horizontal, 4)- }- .buttonStyle(GlowProminentButtonStyle(breathes: true, large: true))+ // Use one source of truth for every percentage shown in this hero.+ // APFS can report `usedSpace` and `freeSpace` on slightly different+ // schedules, which previously produced a visible 71%/72% mismatch.+ let used = max(0, total - free)+ let percentUsed = total > 0+ ? max(0, min(1, Double(used) / Double(total)))+ : 0+ let stress = percentUsed >= 0.85+ let compact = dashboardSize.width > 0 && dashboardSize.width < 760+ let coreSize: CGFloat = compact ? 250 : 304++ return SmartCareStageSurface(+ tint: stress ? Tint.orange : Tint.blue,+ padding: compact ? 22 : 28+ ) {+ HStack(spacing: compact ? 14 : 28) {+ VStack(alignment: .leading, spacing: 12) {+ HStack(spacing: 8) {+ Image(systemName: "square.3.layers.3d")+ Text("\(CleaningCategory.scannable.count)-POINT LOCAL SCAN")+ .tracking(0.7)+ if stress {+ Text("LOW SPACE")+ .padding(.horizontal, 8)+ .padding(.vertical, 4)+ .background(Capsule().fill(Tint.orange.opacity(0.22)))}}- .frame(maxWidth: .infinity, alignment: .leading)+ .font(.system(size: 10.5, weight: .bold))+ .foregroundStyle(.white.opacity(0.70))++ Text(stress ? "Make room.\nKeep control." : "Scan first.\nDecide what goes.")+ .font(.system(size: compact ? 30 : 36, weight: .bold))+ .tracking(-1.0)+ .foregroundStyle(.white)+ .lineSpacing(-1)++ Text("PureMac builds a reviewable cleanup plan on your Mac. Nothing is removed until you approve it.")+ .font(.system(size: 13.5))+ .foregroundStyle(.white.opacity(0.68))+ .fixedSize(horizontal: false, vertical: true)+ .frame(maxWidth: 430, alignment: .leading)++ Button {+ appState.startSmartScan()+ } label: {+ Label("Scan My Mac", systemImage: "sparkles")+ }+ .buttonStyle(.borderedProminent)+ .controlSize(.large)+ .tint(Tint.blue)+ .foregroundStyle(.white)+ .accessibilityHint("Checks every cleanup category without deleting files")+ .padding(.vertical, 2)++ HStack(spacing: 14) {+ trustLabel("Local", icon: "lock.shield.fill")+ trustLabel("Private", icon: "eye.slash.fill")+ trustLabel("Reviewable", icon: "checklist")+ }++ storagePlaque(+ free: free,+ total: total,+ used: used,+ percentUsed: percentUsed+ )+ .padding(.top, 4)}+ .frame(maxWidth: .infinity, alignment: .leading)- storageMeter(used: used, total: total)+ storageVolumeScene(size: coreSize)+ .frame(width: compact ? 270 : 340)}+ .frame(height: compact ? 296 : 326)+ }+ }++ private func trustLabel(_ title: LocalizedStringKey, icon: String) -> some View {+ Label(title, systemImage: icon)+ .font(.system(size: 10.5, weight: .semibold))+ .foregroundStyle(.white.opacity(0.58))+ }++ private func storagePlaque(+ free: Int64,+ total: Int64,+ used: Int64,+ percentUsed: Double+ ) -> some View {+ HStack(spacing: 12) {+ Image(systemName: "internaldrive.fill")+ .font(.system(size: 15, weight: .semibold))+ .foregroundStyle(Tint.cyan)++ VStack(alignment: .leading, spacing: 2) {+ Text("\(formatted(free)) free")+ .font(.system(size: 12.5, weight: .bold))+ .monospacedDigit()+ .foregroundStyle(.white)+ Text(freeOfText(total: total))+ .font(.system(size: 9.5))+ .foregroundStyle(.white.opacity(0.48))+ }++ StackedMeter(+ segments: [+ .init(id: "used", value: Double(used), color: Tint.blue),+ .init(id: "free", value: Double(max(0, free)), color: .white.opacity(0.10))+ ]+ )+ .frame(maxWidth: 150)++ Text(percentUsedText(percentUsed))+ .font(.system(size: 10.5, weight: .semibold))+ .monospacedDigit()+ .foregroundStyle(.white.opacity(0.58))}+ .padding(.horizontal, 13)+ .padding(.vertical, 10)+ .background(+ RoundedRectangle(cornerRadius: 13, style: .continuous)+ .fill(.white.opacity(0.065))+ )+ .overlay(+ RoundedRectangle(cornerRadius: 13, style: .continuous)+ .strokeBorder(.white.opacity(0.12), lineWidth: 0.7)+ )+ .frame(maxWidth: 470)+ }++ private func storageVolumeScene(size: CGFloat) -> some View {+ SmartCareCoreArtwork(phase: .idle, size: size)+ .accessibilityLabel("Twelve-layer storage inspection model")}private func freeOfText(total: Int64) -> String {@@ -278,70 +426,128 @@ struct DashboardView: View {}private func percentUsedText(_ usedPct: Double) -> String {- String(format: String(localized: "%lld%% used"), Int64(usedPct * 100))+ let clamped = max(0, min(1, usedPct))+ return String(+ format: String(localized: "%lld%% used"),+ Int64((clamped * 100).rounded())+ )}- // MARK: - Stats+ // MARK: - Care overview- private var stats: some View {- let free = appState.diskInfo.freeSpace- let total = appState.diskInfo.totalSpace- let percentUsed = total > 0 ? Double(total - free) / Double(total) : 0-- // Four across when there's room, two when the dashboard is narrow so the- // cards don't crush their values.- let columnCount = dashboardSize.width > 0 && dashboardSize.width < 660 ? 2 : 4- return LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 12), count: columnCount), spacing: 12) {- StatCard(- icon: "internaldrive.fill",+ private var everydayCleanupCategories: [CleaningCategory] {+ [.systemJunk, .userCache, .mailAttachments, .trashBins, .largeFiles]+ }++ private var developerCleanupCategories: [CleaningCategory] {+ [.aiApps, .xcodeJunk, .brewCache, .nodeCache, .dockerCache,+ .universalBinaries, .languageFiles]+ }++ private var careOverview: some View {+ let cleanupSize = summarySize(for: everydayCleanupCategories)+ let developerSize = summarySize(for: developerCleanupCategories)+ let compact = dashboardSize.width > 0 && dashboardSize.width < 900+ let supportingWidth: CGFloat = compact ? 136 : 178++ return HStack(spacing: 12) {+ CareModuleCard(+ icon: "sparkles.rectangle.stack.fill",tint: Tint.blue,- label: "Free Space",- value: ByteCountFormatter.string(fromByteCount: free, countStyle: .file),- delta: total > 0 ? freeSpaceDelta(total: total, percentUsed: percentUsed) : nil,- byteValue: free- )+ title: "Cleanup",+ value: summaryValue(size: cleanupSize, categories: everydayCleanupCategories),+ detail: cleanupSize > 0+ ? String(localized: "Ready for review")+ : String(localized: "Caches, mail, trash, and large files"),+ prominent: true,+ showsDetail: !compact+ ) {+ onNavigate(.cleaning(largestCategory(in: everydayCleanupCategories) ?? .systemJunk))+ }.staggered(0)- StatCard(- icon: "trash.circle.fill",+ .frame(maxWidth: .infinity)++ CareModuleCard(+ icon: "hammer.circle.fill",tint: Tint.orange,- label: "Junk Found",- value: appState.totalJunkSize > 0- ? ByteCountFormatter.string(fromByteCount: appState.totalJunkSize, countStyle: .file)- : "—",- delta: appState.allResults.isEmpty- ? String(localized: "Run a scan")- : junkFoundDelta(count: appState.allResults.count),- byteValue: appState.totalJunkSize > 0 ? appState.totalJunkSize : nil- )+ title: "Developer",+ value: summaryValue(size: developerSize, categories: developerCleanupCategories),+ detail: developerSize > 0+ ? String(localized: "Ready for review")+ : String(localized: "Xcode and package tools"),+ showsDetail: !compact+ ) {+ onNavigate(.cleaning(largestCategory(in: developerCleanupCategories) ?? .xcodeJunk))+ }.staggered(1)- StatCard(+ .frame(width: supportingWidth)++ CareModuleCard(icon: "square.grid.2x2.fill",tint: Tint.purple,- label: "Apps",+ title: "Applications",value: "\(appState.installedApps.count)",- delta: String(localized: "installed")- )+ detail: String(localized: "Installed apps"),+ showsDetail: !compact+ ) {+ onNavigate(.apps)+ }.staggered(2)- StatCard(- icon: "memorychip.fill",- tint: Tint.green,- label: "Purgeable",- value: appState.diskInfo.purgeableSpace > 0- ? ByteCountFormatter.string(fromByteCount: appState.diskInfo.purgeableSpace, countStyle: .file)- : "—",- delta: String(localized: "Managed by macOS"),- byteValue: appState.diskInfo.purgeableSpace > 0 ? appState.diskInfo.purgeableSpace : nil- )+ .frame(width: supportingWidth)++ CareModuleCard(+ icon: "doc.questionmark.fill",+ tint: Tint.pink,+ title: "Orphaned Files",+ value: "\(appState.orphanedFiles.count)",+ detail: appState.orphanedFiles.isEmpty+ ? String(localized: "No known leftovers")+ : String(localized: "App leftovers to inspect"),+ showsDetail: !compact+ ) {+ onNavigate(.orphans)+ }.staggered(3)+ .frame(width: supportingWidth)}+ .frame(height: compact ? 128 : 134)}- private func freeSpaceDelta(total: Int64, percentUsed: Double) -> String {- String(- format: String(localized: "of %@ · %lld%% used"),- ByteCountFormatter.string(fromByteCount: total, countStyle: .file),- Int64(percentUsed * 100)- )+ private func summarySize(for categories: [CleaningCategory]) -> Int64 {+ categories.reduce(0) { partial, category in+ partial + (appState.categoryResults[category]?.totalSize ?? 0)+ }+ }++ private func summaryValue(size: Int64, categories: [CleaningCategory]) -> String {+ if size > 0 {+ return formatted(size)+ }++ let scannedCount = categories.reduce(0) { count, category in+ count + (appState.categoryResults[category] == nil ? 0 : 1)+ }+ if scannedCount == 0 {+ return String(+ format: String(localized: "%lld checks"),+ Int64(categories.count)+ )+ }+ if scannedCount < categories.count {+ return String(+ format: String(localized: "%lld/%lld checked"),+ Int64(scannedCount),+ Int64(categories.count)+ )+ }+ return String(localized: "Clear")+ }++ private func largestCategory(in categories: [CleaningCategory]) -> CleaningCategory? {+ categories+ .compactMap { appState.categoryResults[$0] }+ .max { $0.totalSize < $1.totalSize }?+ .category}private func junkFoundDelta(count: Int) -> String {@@ -449,21 +655,24 @@ struct DashboardView: View {// MARK: - Scanning stateprivate var scanningHero: some View {- CardSurface(padding: 26, elevation: .raised, material: .ultraThinMaterial, tint: Tint.blue) {- HStack(alignment: .center, spacing: 28) {- ScanningGauge(progress: appState.scanProgress)- .frame(width: 180, height: 180)- VStack(alignment: .leading, spacing: 10) {+ let compact = dashboardSize.width > 0 && dashboardSize.width < 700+ let coreSize: CGFloat = compact ? 248 : 292++ return SmartCareStageSurface(tint: Tint.blue) {+ HStack(spacing: compact ? 16 : 30) {+ VStack(alignment: .leading, spacing: 12) {HStack(spacing: 8) {- sparklesIcon+ Image(systemName: "sparkles")Text("Scanning your Mac")- .font(.system(size: 22, weight: .bold))+ .font(.system(size: compact ? 26 : 31, weight: .bold))+ .tracking(-0.5)}+ .foregroundStyle(.white)// Category line slides up as the scan advances.Text(currentlyInText).font(.system(size: 13))- .foregroundStyle(.secondary)+ .foregroundStyle(.white.opacity(0.68)).id(appState.currentScanCategory).transition(reduceMotion@@ -484,9 +693,17 @@ struct DashboardView: View {// dashboard (issues #119, #120).ScanPathTicker(ticker: appState.scanTicker)}+ .frame(maxWidth: .infinity, alignment: .leading).animation(reduceMotion ? nil : .easeOut(duration: 0.18), value: appState.currentScanCategory)- Spacer(minLength: 0)++ workingCore(+ phase: .scanning(appState.scanProgress),+ progress: appState.scanProgress,+ label: "SCANNING",+ size: coreSize+ )}+ .frame(height: compact ? 250 : 286)}}@@ -532,64 +749,65 @@ struct DashboardView: View {private var completedHero: some View {let isClean = appState.totalJunkSize <= 0- return CardSurface(padding: 26, elevation: .raised,- tint: isClean ? Tint.green : Tint.orange) {- HStack(spacing: 24) {- if isClean {- HStack(spacing: 12) {- cleanSealIcon- Text("Your Mac is clean")- .font(.system(size: 22, weight: .bold))- .foregroundStyle(Tint.green)- }- Spacer()- Button("Scan Again") { appState.startSmartScan() }- .controlSize(.large)- } else {- VStack(alignment: .leading, spacing: 10) {- Text("Junk Found")- .font(.system(size: 12, weight: .semibold))- .foregroundStyle(Tint.orange)- .textCase(.uppercase)- .tracking(0.8)- HStack(alignment: .firstTextBaseline, spacing: 8) {- CountUpBytes(bytes: appState.totalJunkSize)- .font(.system(size: 40, weight: .bold))- .foregroundStyle(- LinearGradient(- colors: [Tint.orange, Tint.red],- startPoint: .topLeading, endPoint: .bottomTrailing- )- )- Text("found")- .font(.system(size: 16))- .foregroundStyle(.secondary)- }+ let compact = dashboardSize.width > 0 && dashboardSize.width < 700+ let coreSize: CGFloat = compact ? 248 : 292++ return SmartCareStageSurface(tint: isClean ? Tint.green : Tint.orange) {+ HStack(spacing: compact ? 16 : 30) {+ VStack(alignment: .leading, spacing: 10) {+ Label(+ isClean ? "ALL CLEAR" : "SCAN COMPLETE",+ systemImage: isClean ? "checkmark.seal.fill" : "sparkles.rectangle.stack.fill"+ )+ .font(.system(size: 11, weight: .bold))+ .tracking(1)+ .foregroundStyle(.white.opacity(0.72))++ if isClean {+ Text("Your Mac is in good shape.")+ .font(.system(size: 30, weight: .bold))+ .tracking(-0.6)+ .foregroundStyle(.white)+ Text("No removable junk was found in the areas PureMac checked.")+ .font(.system(size: 14))+ .foregroundStyle(.white.opacity(0.68))+ } else {+ Text("Ready to reclaim")+ .font(.system(size: 15, weight: .medium))+ .foregroundStyle(.white.opacity(0.68))+ CountUpBytes(bytes: appState.totalJunkSize)+ .font(.system(size: 42, weight: .bold))+ .foregroundStyle(.white)Text(junkFoundDelta(count: appState.allResults.count))- .font(.system(size: 12.5))- .foregroundStyle(.secondary)+ .font(.system(size: 13))+ .foregroundStyle(.white.opacity(0.66))+ }- HStack(spacing: 12) {- if appState.totalSelectedSize > 0 {- Button {- showConfirmation = true- } label: {- Label {- Text(cleanSelectedLabel)- } icon: {- Image(systemName: "sparkles")- }- .padding(.horizontal, 6)- }- .buttonStyle(GlowProminentButtonStyle(large: true))+ HStack(spacing: 10) {+ if !isClean && appState.totalSelectedSize > 0 {+ Button {+ showConfirmation = true+ } label: {+ Label(cleanSelectedLabel, systemImage: "sparkles")}- Button("Scan Again") { appState.startSmartScan() }+ .buttonStyle(.borderedProminent)+ .controlSize(.large)+ .tint(Tint.blue)+ .foregroundStyle(.white)}- .padding(.top, 2)++ Button("Scan Again") { appState.startSmartScan() }+ .buttonStyle(.bordered)+ .controlSize(.large)+ .tint(.white)}- Spacer()+ .padding(.top, 4)}+ .frame(maxWidth: .infinity, alignment: .leading)++ resultCore(isClean: isClean, size: coreSize)}+ .frame(height: compact ? 250 : 286)}}@@ -600,28 +818,19 @@ struct DashboardView: View {)}- private var categoryChartCard: some View {- let bars = appState.allResults- .filter { $0.totalSize > 0 }- .sorted { $0.totalSize > $1.totalSize }- .prefix(8)- .map { CategoryBarChart.Bar(category: $0.category, size: $0.totalSize) }-- return CardSurface(padding: 18, elevation: .standard) {- CategoryBarChart(bars: Array(bars))- }- }+ private var findingsGrid: some View {+ let columnCount = dashboardSize.width > 0 && dashboardSize.width < 900 ? 2 : 3+ let results = appState.allResults.sorted { $0.totalSize > $1.totalSize }- private var resultsList: some View {- CardSurface(padding: 0) {- VStack(spacing: 0) {- ForEach(Array(appState.allResults.enumerated()), id: \.element.id) { idx, result in- CategoryToggleRow(result: result)- .staggered(idx)- if result.id != appState.allResults.last?.id {- Divider().padding(.leading, 54)- }+ return LazyVGrid(+ columns: Array(repeating: GridItem(.flexible(), spacing: 14), count: columnCount),+ spacing: 14+ ) {+ ForEach(Array(results.enumerated()), id: \.element.id) { index, result in+ FindingTile(result: result) {+ onNavigate(.cleaning(result.category))}+ .staggered(index)}}}@@ -654,22 +863,33 @@ struct DashboardView: View {}private var cleaningHero: some View {- CardSurface(padding: 26, elevation: .raised, material: .ultraThinMaterial, tint: Tint.orange) {- HStack(alignment: .center, spacing: 28) {- ScanningGauge(progress: appState.cleanProgress, tint: Tint.orange, label: "CLEANING")- .frame(width: 180, height: 180)- VStack(alignment: .leading, spacing: 8) {- Text("Cleaning…")- .font(.system(size: 22, weight: .bold))+ let compact = dashboardSize.width > 0 && dashboardSize.width < 700+ let coreSize: CGFloat = compact ? 248 : 292++ return SmartCareStageSurface(tint: Tint.orange) {+ HStack(spacing: compact ? 16 : 30) {+ VStack(alignment: .leading, spacing: 10) {+ Text("Cleaning safely…")+ .font(.system(size: compact ? 26 : 31, weight: .bold))+ .tracking(-0.5)+ .foregroundStyle(.white)Text(percentCompleteText).font(.system(size: 13))- .foregroundStyle(.secondary)+ .foregroundStyle(.white.opacity(0.68))ShimmerProgressBar(progress: appState.cleanProgress, tint: Tint.orange).frame(maxWidth: 320).padding(.top, 2)}- Spacer(minLength: 0)+ .frame(maxWidth: .infinity, alignment: .leading)++ workingCore(+ phase: .cleaning(appState.cleanProgress),+ progress: appState.cleanProgress,+ label: "CLEANING",+ size: coreSize+ )}+ .frame(height: compact ? 250 : 286)}}@@ -689,41 +909,385 @@ struct DashboardView: View {}private var cleanedHero: some View {- CardSurface(padding: 26, elevation: .raised, material: .ultraThinMaterial, tint: Tint.green) {- HStack(alignment: .center, spacing: 28) {- SuccessMedal()- .background(- GeometryReader { geo in- Color.clear.onAppear { updateBurstOrigin(medalFrame: geo.frame(in: .named(dashboardSpace))) }- }- )+ let compact = dashboardSize.width > 0 && dashboardSize.width < 700+ let coreSize: CGFloat = compact ? 248 : 292+ return SmartCareStageSurface(tint: Tint.green) {+ HStack(spacing: compact ? 16 : 30) {VStack(alignment: .leading, spacing: 6) {+ Text("Cleanup complete")+ .font(.system(size: 15, weight: .semibold))+ .foregroundStyle(.white.opacity(0.70))CountUpBytes(bytes: appState.totalFreedSpace)- .font(.system(size: 40, weight: .semibold))- .foregroundStyle(Tint.green)+ .font(.system(size: 42, weight: .bold))+ .foregroundStyle(.white)Text("freed").font(.system(size: 14))- .foregroundStyle(.secondary)+ .foregroundStyle(.white.opacity(0.68))Button("Done") { appState.scanState = .idle }- .buttonStyle(GlowProminentButtonStyle(tint: Tint.green, gradient: TintGradient.of(Tint.green)))+ .buttonStyle(.borderedProminent)+ .controlSize(.large)+ .tint(Tint.blue)+ .foregroundStyle(.white).padding(.top, 4)}- Spacer(minLength: 0)+ .frame(maxWidth: .infinity, alignment: .leading)++ resultCore(isClean: true, size: coreSize)+ .background(+ GeometryReader { geo in+ Color.clear.onAppear {+ updateBurstOrigin(medalFrame: geo.frame(in: .named(dashboardSpace)))+ }+ }+ )}+ .frame(height: compact ? 250 : 286)}}+ private func workingCore(+ phase: SmartCareCoreArtwork.Phase,+ progress: Double,+ label: LocalizedStringKey,+ size: CGFloat+ ) -> some View {+ let clamped = max(0, min(1, progress))+ let percentage = Int((clamped * 100).rounded())++ return SmartCareCoreArtwork(phase: phase, size: size)+ .frame(width: size, height: size)+ .fixedSize()+ .accessibilityElement(children: .ignore)+ .accessibilityLabel(Text(label))+ .accessibilityValue("\(percentage) percent")+ }++ private func resultCore(isClean: Bool, size: CGFloat) -> some View {+ SmartCareCoreArtwork(phase: isClean ? .success : .review, size: size)+ .frame(width: size, height: size)+ .frame(width: size, height: size)+ .fixedSize()+ .accessibilityElement(children: .ignore)+ .accessibilityLabel(isClean ? "All clear" : "Review scan results")+ }+// MARK: - Helpersprivate func sectionHeader(_ text: LocalizedStringKey) -> some View {- SectionHeader(text)+ Text(text)+ .font(.system(size: 15, weight: .semibold))+ .foregroundStyle(.primary).padding(.top, 4)+ .accessibilityAddTraits(.isHeader)}}// MARK: - Components+/// Deep, stateful dashboard plane inspired by premium Mac utilities while+/// preserving native SwiftUI content, focus, and accessibility behavior.+private struct SmartCareStageSurface<Content: View>: View {+ let tint: Color+ var padding: CGFloat = 28+ @ViewBuilder var content: Content++ private let cornerRadius: CGFloat = 28++ var body: some View {+ content+ .padding(padding)+ .frame(maxWidth: .infinity, alignment: .leading)+ .background(+ ZStack {+ RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)+ .fill(TintGradient.smartCare)+ RadialGradient(+ colors: [tint.opacity(0.18), .clear],+ center: .topTrailing,+ startRadius: 0,+ endRadius: 460+ )+ RadialGradient(+ colors: [Tint.cyan.opacity(0.06), .clear],+ center: .bottomLeading,+ startRadius: 0,+ endRadius: 420+ )+ LinearGradient(+ colors: [.white.opacity(0.03), .clear, .black.opacity(0.14)],+ startPoint: .top,+ endPoint: .bottom+ )+ }+ )+ .clipShape(RoundedRectangle(cornerRadius: cornerRadius, style: .continuous))+ .overlay(+ RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)+ .strokeBorder(+ LinearGradient(+ colors: [.white.opacity(0.17), tint.opacity(0.10), .white.opacity(0.05)],+ startPoint: .topLeading,+ endPoint: .bottomTrailing+ ),+ lineWidth: 0.8+ )+ )+ .shadow(color: tint.opacity(0.08), radius: 28, y: 12)+ .shadow(color: .black.opacity(0.28), radius: 22, y: 10)+ // The scenic surface is always dark, even when the surrounding app+ // is light, so semantic primary/secondary styles remain legible.+ .environment(\.colorScheme, .dark)+ }+}++private struct CareModuleCard: View {+ let icon: String+ let tint: Color+ let title: LocalizedStringKey+ let value: String+ let detail: String+ var prominent: Bool = false+ var showsDetail: Bool = true+ let action: () -> Void++ @State private var hovering = false+ @Environment(\.accessibilityReduceMotion) private var reduceMotion+ @Environment(\.colorScheme) private var colorScheme++ var body: some View {+ Button(action: action) {+ VStack(alignment: .leading, spacing: prominent ? 11 : 8) {+ if prominent {+ HStack(spacing: 9) {+ IconTile(+ systemName: icon,+ tint: tint,+ size: 32,+ corner: 9,+ glow: hovering,+ vivid: true+ )+ Text(title)+ .font(.system(size: 14, weight: .semibold))+ Spacer(minLength: 5)+ Image(systemName: "arrow.up.right")+ .font(.system(size: 9.5, weight: .bold))+ .foregroundStyle(hovering ? tint : Color.secondary.opacity(0.7))+ }+ } else {+ HStack {+ IconTile(+ systemName: icon,+ tint: tint,+ size: 25,+ corner: 7,+ glow: hovering+ )+ Spacer(minLength: 4)+ Image(systemName: "arrow.up.right")+ .font(.system(size: 8.5, weight: .bold))+ .foregroundStyle(hovering ? tint : Color.secondary.opacity(0.65))+ }+ Text(title)+ .font(.system(size: 11.5, weight: .semibold))+ .lineLimit(1)+ .minimumScaleFactor(0.70)+ }++ HStack(alignment: .firstTextBaseline, spacing: 8) {+ Text(value)+ .font(.system(size: prominent ? 27 : 22, weight: .bold))+ .monospacedDigit()+ .contentTransition(.numericText())+ .lineLimit(1)+ .minimumScaleFactor(0.64)+ if prominent && showsDetail {+ Text(detail)+ .font(.system(size: 11.5))+ .foregroundStyle(.secondary)+ .lineLimit(1)+ }+ }++ if !prominent && showsDetail {+ Text(detail)+ .font(.system(size: 10.5))+ .foregroundStyle(.secondary)+ .lineLimit(1)+ }+ }+ .padding(.horizontal, prominent ? 18 : 15)+ .padding(.vertical, prominent ? 15 : 14)+ .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)+ .background(cardBackground)+ .overlay(cardBorder)+ .overlay(alignment: .topLeading) {+ Capsule()+ .fill(+ LinearGradient(+ colors: [tint.opacity(0.85), tint.opacity(0.18)],+ startPoint: .leading,+ endPoint: .trailing+ )+ )+ .frame(width: prominent ? 68 : 38, height: 2)+ .padding(.leading, prominent ? 18 : 15)+ }+ .shadow(+ color: hovering ? tint.opacity(0.13) : .black.opacity(colorScheme == .dark ? 0.11 : 0.06),+ radius: hovering ? 16 : 9,+ y: hovering ? 7 : 4+ )+ }+ .buttonStyle(.plain)+ .contentShape(RoundedRectangle(cornerRadius: 18, style: .continuous))+ .scaleEffect(hovering && !reduceMotion ? 1.012 : 1)+ .offset(y: hovering && !reduceMotion ? -3 : 0)+ .animation(reduceMotion ? nil : MotionTokens.snappy, value: hovering)+ .onHover { hovering = $0 }+ }++ private var cardBackground: some View {+ RoundedRectangle(cornerRadius: 18, style: .continuous)+ .fill(.ultraThinMaterial)+ .overlay(+ RoundedRectangle(cornerRadius: 18, style: .continuous)+ .fill(+ LinearGradient(+ colors: [+ tint.opacity(prominent ? 0.105 : 0.045),+ Color.white.opacity(colorScheme == .dark ? 0.025 : 0.24),+ .clear+ ],+ startPoint: .topLeading,+ endPoint: .bottomTrailing+ )+ )+ )+ }++ private var cardBorder: some View {+ RoundedRectangle(cornerRadius: 18, style: .continuous)+ .strokeBorder(+ LinearGradient(+ colors: [+ Color.white.opacity(colorScheme == .dark ? 0.15 : 0.65),+ tint.opacity(hovering ? 0.30 : 0.10),+ Color.primary.opacity(0.04)+ ],+ startPoint: .topLeading,+ endPoint: .bottomTrailing+ ),+ lineWidth: 0.8+ )+ }+}++private struct FindingTile: View {+ @EnvironmentObject var appState: AppState+ let result: CategoryResult+ let onReview: () -> Void++ @State private var hovering = false+ @Environment(\.accessibilityReduceMotion) private var reduceMotion++ private var isFullySelected: Bool {+ appState.selectedCountInCategory(result.category) == result.itemCount+ }++ private var selection: Binding<Bool> {+ Binding(+ get: { isFullySelected },+ set: { selected in+ if selected {+ appState.selectAllInCategory(result.category)+ } else {+ appState.deselectAllInCategory(result.category)+ }+ }+ )+ }++ var body: some View {+ VStack(alignment: .leading, spacing: 11) {+ HStack(spacing: 10) {+ Toggle(isOn: selection) {+ Text(LocalizedStringKey(result.category.rawValue))+ .font(.system(size: 13.5, weight: .semibold))+ }+ .toggleStyle(.checkbox)++ Spacer(minLength: 8)+ IconTile(+ systemName: result.category.icon,+ tint: result.category.color,+ size: 34,+ glow: hovering,+ vivid: true+ )+ }++ Text(result.formattedSize)+ .font(.system(size: 27, weight: .bold))+ .monospacedDigit()+ .contentTransition(.numericText())++ Text(itemsCountText)+ .font(.system(size: 11.5))+ .foregroundStyle(.secondary)++ HStack {+ Text(selectedCountText)+ .font(.system(size: 11, weight: .medium))+ .foregroundStyle(result.category.color)+ Spacer()+ Button("Review", action: onReview)+ .buttonStyle(.bordered)+ .controlSize(.small)+ .tint(result.category.color)+ }+ }+ .padding(17)+ .frame(maxWidth: .infinity, minHeight: 158, alignment: .topLeading)+ .background(+ ZStack {+ RoundedRectangle(cornerRadius: 17, style: .continuous)+ .fill(Color(nsColor: .controlBackgroundColor))+ RoundedRectangle(cornerRadius: 17, style: .continuous)+ .fill(+ LinearGradient(+ colors: [result.category.color.opacity(0.16), .clear],+ startPoint: .topTrailing,+ endPoint: .bottomLeading+ )+ )+ }+ )+ .overlay(+ RoundedRectangle(cornerRadius: 17, style: .continuous)+ .strokeBorder(result.category.color.opacity(hovering ? 0.34 : 0.16), lineWidth: 0.8)+ )+ .shadow(color: .black.opacity(hovering ? 0.12 : 0.06),+ radius: hovering ? 14 : 8, y: hovering ? 6 : 3)+ .scaleEffect(hovering && !reduceMotion ? 1.012 : 1)+ .offset(y: hovering && !reduceMotion ? -2 : 0)+ .animation(reduceMotion ? nil : MotionTokens.snappy, value: hovering)+ .onHover { hovering = $0 }+ }++ private var itemsCountText: String {+ String(format: String(localized: "%lld items found"), Int64(result.itemCount))+ }++ private var selectedCountText: String {+ String(+ format: String(localized: "%lld selected"),+ Int64(appState.selectedCountInCategory(result.category))+ )+ }+}+private struct StatCard: View {let icon: Stringlet tint: Colordiff --git a/PureMac/Views/MainWindow.swift b/PureMac/Views/MainWindow.swiftindex 49765e6..b665728 100644--- a/PureMac/Views/MainWindow.swift+++ b/PureMac/Views/MainWindow.swift@@ -6,22 +6,37 @@ struct MainWindow: View {@ObservedObject private var permission = PermissionCoordinator.shared@State private var selectedSection: AppSection? = .cleaning(.smartScan)@State private var columnVisibility: NavigationSplitViewVisibility = .all+ @State private var advancedToolsExpanded = false+ @FocusState private var focusedSection: AppSection?@Environment(\.accessibilityReduceMotion) private var reduceMotion@Environment(\.colorScheme) private var colorScheme+ private static let cleanupCategories: [CleaningCategory] = [+ .systemJunk,+ .userCache,+ .mailAttachments,+ .trashBins,+ .largeFiles,+ ]++ private static let advancedCategories: [CleaningCategory] = [+ .aiApps,+ .xcodeJunk,+ .brewCache,+ .nodeCache,+ .dockerCache,+ .universalBinaries,+ .languageFiles,+ ]+var body: some View {NavigationSplitView(columnVisibility: $columnVisibility) {sidebar+ .navigationSplitViewColumnWidth(min: 232, ideal: 244, max: 300)} detail: {detailContainer}- .navigationSplitViewColumnWidth(min: 232, ideal: 244, max: 320).frame(minWidth: 980, minHeight: 600)- .toolbar {- ToolbarItem(placement: .navigation) {- appearancePicker- }- }.onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ inappState.checkFullDiskAccess()permission.refreshStatus()@@ -30,7 +45,7 @@ struct MainWindow: View {// A right-clicked app arrived via Finder Services — surface the// Installed Apps view so its related-files scan is visible.guard app != nil else { return }- selectedSection = .apps+ selectSection(.apps)appState.pendingExternalApp = nil}.onAppear {@@ -38,8 +53,10 @@ struct MainWindow: View {// launch, or while onboarding was still showing) — onChange alone// fires only on subsequent changes and would miss it.if appState.pendingExternalApp != nil {- selectedSection = .apps+ selectSection(.apps)appState.pendingExternalApp = nil+ } else if let selectedSection {+ focusedSection = selectedSection}}.onChange(of: appState.cleanErrorIsFDAFixable) { isFDAFixable in@@ -74,36 +91,86 @@ struct MainWindow: View {// MARK: - Sidebarprivate var sidebar: some View {- List(selection: $selectedSection) {+ List {Section {- navRow(section: .cleaning(.smartScan), label: "Dashboard",- icon: "sparkles", tint: Tint.blue,- badge: dashboardBadge)+ navRow(section: .cleaning(.smartScan), label: "Smart Care",+ icon: "sparkles",+ tint: SidebarPalette.smartCarePrimary,+ secondaryTint: SidebarPalette.smartCareSecondary,+ badge: dashboardBadge,+ isFeatured: true)} header: { sectionLabel("Overview") }+ Section {+ ForEach(Self.cleanupCategories) { category in+ navRow(section: .cleaning(category),+ label: LocalizedStringKey(category.rawValue),+ icon: category.icon,+ tint: category.color,+ secondaryTint: category.color,+ badge: sizeBadge(for: category))+ }+ } header: { sectionLabel("Cleanup") }+Section {navRow(section: .apps, label: "Installed Apps",- icon: "square.grid.2x2.fill", tint: Tint.purple,+ icon: "square.grid.2x2.fill",+ tint: SidebarPalette.applicationsPrimary,+ secondaryTint: SidebarPalette.applicationsSecondary,badge: appState.installedApps.isEmpty ? nil : "\(appState.installedApps.count)")navRow(section: .orphans, label: "Orphaned Files",- icon: "doc.questionmark.fill", tint: Tint.pink,+ icon: "doc.questionmark.fill",+ tint: Tint.orange,+ secondaryTint: Tint.orange,badge: appState.orphanedFiles.isEmpty ? nil : "\(appState.orphanedFiles.count)")} header: { sectionLabel("Applications") }Section {- ForEach(CleaningCategory.scannable) { category in- navRow(section: .cleaning(category),- label: LocalizedStringKey(category.rawValue),- icon: category.icon,- tint: category.color,- badge: sizeBadge(for: category))+ DisclosureGroup(isExpanded: $advancedToolsExpanded) {+ ForEach(Self.advancedCategories) { category in+ navRow(section: .cleaning(category),+ label: LocalizedStringKey(category.rawValue),+ icon: category.icon,+ tint: category.color,+ secondaryTint: category.color,+ badge: sizeBadge(for: category))+ }+ } label: {+ HStack(spacing: 9) {+ IconTile(+ systemName: "wrench.and.screwdriver.fill",+ tint: SidebarPalette.advanced,+ size: 24,+ corner: 7+ )+ Text("Advanced Tools")+ .font(.system(size: 12.5, weight: .medium))+ .foregroundStyle(sidebarLabelColor)+ }+ .frame(minHeight: 36)+ .contentShape(Rectangle())}- } header: { sectionLabel("Cleanup") }+ .tint(.secondary)+ .listRowInsets(EdgeInsets(top: 1, leading: 12, bottom: 1, trailing: 12))+ .listRowSeparator(.hidden)+ .listRowBackground(Color.clear)+ }}.listStyle(.sidebar)+ .environment(\.defaultMinListRowHeight, 36)+ .scrollContentBackground(.hidden)+ .background(sidebarBackdrop).navigationTitle("PureMac")+ .onMoveCommand(perform: moveSelection)+ .onChange(of: selectedSection) { section in+ guard case let .cleaning(category)? = section,+ Self.advancedCategories.contains(category) else { return }+ withAnimation(reduceMotion ? nil : MotionTokens.gentle) {+ advancedToolsExpanded = true+ }+ }.safeAreaInset(edge: .bottom) {- healthFooter+ sidebarFooter}}@@ -116,12 +183,62 @@ struct MainWindow: View {}private func navRow(section: AppSection, label: LocalizedStringKey, icon: String,- tint: Color, badge: String?) -> some View {- SidebarNavRow(- label: label, icon: icon, tint: tint, badge: badge,- isSelected: selectedSection == section- )- .tag(section)+ tint: Color, secondaryTint: Color, badge: String?,+ isFeatured: Bool = false) -> some View {+ Button {+ selectSection(section)+ } label: {+ SidebarNavRow(+ label: label,+ icon: icon,+ tint: tint,+ secondaryTint: secondaryTint,+ badge: badge,+ isSelected: selectedSection == section,+ isFeatured: isFeatured+ )+ }+ .buttonStyle(.plain)+ .focused($focusedSection, equals: section)+ .accessibilityAddTraits(selectedSection == section ? .isSelected : [])+ .listRowInsets(EdgeInsets(top: 1, leading: 12, bottom: 1, trailing: 12))+ .listRowSeparator(.hidden)+ .listRowBackground(Color.clear)+ }++ private var visibleSections: [AppSection] {+ var sections: [AppSection] = [.cleaning(.smartScan)]+ sections.append(contentsOf: Self.cleanupCategories.map(AppSection.cleaning))+ sections.append(contentsOf: [.apps, .orphans])+ if advancedToolsExpanded {+ sections.append(contentsOf: Self.advancedCategories.map(AppSection.cleaning))+ }+ return sections+ }++ private func selectSection(_ section: AppSection) {+ selectedSection = section+ focusedSection = section+ }++ private func moveSelection(_ direction: MoveCommandDirection) {+ let sections = visibleSections+ guard !sections.isEmpty else { return }++ let current = focusedSection ?? selectedSection+ let currentIndex = current.flatMap(sections.firstIndex(of:))+ let targetIndex: Int++ switch direction {+ case .up:+ targetIndex = max(0, (currentIndex ?? sections.count) - 1)+ case .down:+ targetIndex = min(sections.count - 1, (currentIndex ?? -1) + 1)+ default:+ return+ }++ selectSection(sections[targetIndex])}private var dashboardBadge: String? {@@ -135,23 +252,69 @@ struct MainWindow: View {return ByteCountFormatter.string(fromByteCount: size, countStyle: .file)}+ private var sidebarBackdrop: some View {+ ZStack {+ Rectangle()+ .fill(.ultraThinMaterial)++ RadialGradient(+ colors: [+ SidebarPalette.smartCarePrimary.opacity(colorScheme == .dark ? 0.16 : 0.08),+ SidebarPalette.smartCareSecondary.opacity(colorScheme == .dark ? 0.06 : 0.025),+ .clear,+ ],+ center: .topLeading,+ startRadius: 0,+ endRadius: 360+ )++ LinearGradient(+ colors: [+ Color.white.opacity(colorScheme == .dark ? 0.018 : 0.20),+ Color.clear,+ Color.black.opacity(colorScheme == .dark ? 0.08 : 0.018),+ ],+ startPoint: .top,+ endPoint: .bottom+ )+ }+ .ignoresSafeArea()+ }++ private var sidebarFooter: some View {+ VStack(spacing: 7) {+ healthFooter+ appearanceMenu+ }+ .padding(.horizontal, 12)+ .padding(.top, 8)+ .padding(.bottom, 10)+ .background(.ultraThinMaterial)+ .overlay(alignment: .top) {+ Rectangle()+ .fill(Color.white.opacity(colorScheme == .dark ? 0.08 : 0.42))+ .frame(height: 0.5)+ }+ }+private var healthFooter: some View {let ok = appState.hasFullDiskAccesslet tint = ok ? Tint.green : Tint.orange- return HStack(spacing: 10) {+ return HStack(spacing: 8) {PulsingDot(tint: tint, isPulsing: !ok)+ .scaleEffect(0.78)+ .frame(width: 14, height: 14)VStack(alignment: .leading, spacing: 1) {Text(LocalizedStringKey(ok ? "Ready to clean" : "Limited access"))- .font(.system(size: 12, weight: .semibold))+ .font(.system(size: 11, weight: .semibold))// Explicit solid color — same vibrancy-collapse guard as the// sidebar rows (#117); this title also inherited the default.- .foregroundStyle(colorScheme == .dark- ? Color.white.opacity(0.92)- : Color.black.opacity(0.85))+ .foregroundStyle(sidebarLabelColor)Text(LocalizedStringKey(ok ? "Full Disk Access granted" : "Grant FDA in Settings"))- .font(.system(size: 10.5))+ .font(.system(size: 9.5)).foregroundStyle(.secondary)+ .lineLimit(1)}Spacer()if !ok {@@ -160,24 +323,72 @@ struct MainWindow: View {appState.checkFullDiskAccess()}}- .buttonStyle(.borderedProminent)+ .buttonStyle(.bordered).tint(Tint.orange).controlSize(.small).help("Fix permission")}}- .padding(.horizontal, 14)- .padding(.vertical, 10)- .background(.bar)+ .padding(.horizontal, 10)+ .padding(.vertical, 7)+ .background(+ RoundedRectangle(cornerRadius: 11, style: .continuous)+ .fill(Color.white.opacity(colorScheme == .dark ? 0.055 : 0.44))+ )+ .overlay(+ RoundedRectangle(cornerRadius: 11, style: .continuous)+ .strokeBorder(+ Color.white.opacity(colorScheme == .dark ? 0.10 : 0.62),+ lineWidth: 0.5+ )+ )}- // MARK: - Toolbar+ private var appearanceMenu: some View {+ Menu {+ ForEach(AppearanceMode.allCases) { appearance in+ Button {+ theme.appearance = appearance+ } label: {+ Label(appearance.label, systemImage: appearance.icon)+ }+ }+ } label: {+ HStack(spacing: 8) {+ Image(systemName: theme.appearance.icon)+ .font(.system(size: 11.5, weight: .semibold))+ .foregroundStyle(.secondary)+ .frame(width: 16)++ Text("Appearance")+ .font(.system(size: 11.5, weight: .medium))+ .foregroundStyle(sidebarLabelColor)++ Spacer(minLength: 6)++ Text(theme.appearance.label)+ .font(.system(size: 10.5, weight: .medium))+ .foregroundStyle(.secondary)++ Image(systemName: "chevron.up.chevron.down")+ .font(.system(size: 8.5, weight: .semibold))+ .foregroundStyle(.tertiary)+ }+ .frame(minHeight: 26)+ .padding(.horizontal, 9)+ .contentShape(RoundedRectangle(cornerRadius: 9, style: .continuous))+ }+ .buttonStyle(.plain)+ .menuStyle(.borderlessButton)+ .help("Change appearance")+ .accessibilityLabel("Appearance")+ .accessibilityValue(theme.appearance.label)+ }- private var appearancePicker: some View {- AppearancePill(selection: Binding(- get: { theme.appearance },- set: { theme.appearance = $0 }- ))+ private var sidebarLabelColor: Color {+ colorScheme == .dark+ ? Color.white.opacity(0.92)+ : Color.black.opacity(0.85)}// MARK: - Detail@@ -224,7 +435,7 @@ struct MainWindow: View {OrphanListView()case .cleaning(let category):if category == .smartScan {- DashboardView()+ DashboardView { selectSection($0) }} else {CategoryDetailView(category: category)}@@ -299,25 +510,38 @@ private func pulsingLockIconView() -> some View {}}-/// Sidebar row with a springy hover highlight. Extracted to a struct so each-/// row owns its hover state; the selected row's IconTile glows via the shared-/// glow treatment in AppTheme.+/// Premium navigation row with explicit selection, independent of List's+/// system-blue selection rendering.private struct SidebarNavRow: View {let label: LocalizedStringKeylet icon: Stringlet tint: Color+ let secondaryTint: Colorlet badge: String?let isSelected: Bool+ let isFeatured: Bool@State private var hovering = false@Environment(\.accessibilityReduceMotion) private var reduceMotion@Environment(\.colorScheme) private var colorSchemevar body: some View {- HStack(spacing: 10) {- IconTile(systemName: icon, tint: tint, size: 24, glow: isSelected)+ HStack(spacing: 9) {+ IconTile(+ systemName: icon,+ tint: tint,+ size: 24,+ corner: 7,+ glow: isFeatured && isSelected,+ vivid: isFeatured+ )+ .shadow(+ color: isFeatured ? tint.opacity(isSelected ? 0.52 : 0.28) : .clear,+ radius: isFeatured ? (isSelected ? 9 : 5) : 0+ )Text(label)- .font(.system(size: 13, weight: isSelected ? .semibold : .regular))+ .font(.system(size: 12.5, weight: isSelected ? .semibold : .medium))+ .lineLimit(1)// Force an explicit, solid foreground instead of inheriting the// sidebar list's default. On some configs (custom accent /// reduced transparency, seen on M1 Max — issue #117) the@@ -329,32 +553,76 @@ private struct SidebarNavRow: View {Spacer()if let badge {Text(badge)- .font(.system(size: 11, weight: .semibold))+ .font(.system(size: 9.75, weight: .semibold)).monospacedDigit()- .foregroundStyle(isSelected ? tint : .secondary)- .padding(.horizontal, 7)+ .foregroundStyle(isFeatured && isSelected ? tint : .secondary)+ .padding(.horizontal, 6).padding(.vertical, 2).background(- Capsule().fill(- (isSelected ? tint : Color.primary).opacity(isSelected ? 0.15 : 0.06)- )+ Capsule()+ .fill(Color.primary.opacity(isSelected ? 0.075 : 0.045))).contentTransition(.numericText())+ .fixedSize(horizontal: true, vertical: false)+ }+ }+ .frame(maxWidth: .infinity, minHeight: 36, alignment: .leading)+ .padding(.horizontal, 8)+ .background(rowBackground)+ .overlay(alignment: .leading) {+ if isSelected {+ Capsule()+ .fill(+ LinearGradient(+ colors: [tint, secondaryTint],+ startPoint: .top,+ endPoint: .bottom+ )+ )+ .frame(width: 2.5, height: 20)+ .padding(.leading, 3)+ .shadow(+ color: isFeatured ? tint.opacity(0.55) : .clear,+ radius: isFeatured ? 5 : 0+ )}}- .padding(.vertical, 2)- // Leading anchor keeps the row from clipping against the sidebar edge.- .scaleEffect(hovering && !reduceMotion ? 1.02 : 1, anchor: .leading)- .background(- RoundedRectangle(cornerRadius: 6, style: .continuous)- .fill(Color.primary.opacity(hovering && !isSelected ? 0.05 : 0))- .padding(.horizontal, -6)- ).animation(reduceMotion ? nil : MotionTokens.snappy, value: hovering)- .contentShape(Rectangle())+ .animation(reduceMotion ? nil : MotionTokens.snappy, value: isSelected)+ .contentShape(RoundedRectangle(cornerRadius: 11, style: .continuous)).onHover { hovering = $0 }}+ @ViewBuilder+ private var rowBackground: some View {+ let shape = RoundedRectangle(cornerRadius: 11, style: .continuous)++ if isSelected {+ shape+ .fill(.thinMaterial)+ .overlay {+ shape.fill(Color.white.opacity(colorScheme == .dark ? 0.045 : 0.24))+ }+ .overlay {+ shape.strokeBorder(+ Color.white.opacity(colorScheme == .dark ? 0.13 : 0.72),+ lineWidth: 0.55+ )+ }+ .shadow(+ color: Color.black.opacity(colorScheme == .dark ? 0.18 : 0.08),+ radius: 5,+ y: 2+ )+ } else {+ shape.fill(+ hovering+ ? Color.primary.opacity(colorScheme == .dark ? 0.045 : 0.032)+ : Color.clear+ )+ }+ }+/// Solid, opaque label color that adapts to light/dark without routing/// through the sidebar's vibrant primary style (see #117).private var labelColor: Color {@@ -364,6 +632,16 @@ private struct SidebarNavRow: View {}}+private enum SidebarPalette {+ static let smartCarePrimary = Tint.purple+ static let smartCareSecondary = Tint.blue+ static let cleanupPrimary = Tint.blue+ static let cleanupSecondary = Tint.cyan+ static let applicationsPrimary = Tint.purple+ static let applicationsSecondary = Tint.pink+ static let advanced = Tint.orange+}+/// Small reusable status dot with optional pulse. Used in the sidebar health/// footer and other "system status" surfaces.private struct PulsingDot: View {diff --git a/README.md b/README.mdindex 52fa704..cec063f 100644--- a/README.md+++ b/README.md@@ -1,9 +1,9 @@<p align="center">- <img src="screenshot.png" alt="PureMac dashboard — animated storage health ring and live composition donut" width="820">+ <img src="screenshots/smart-care.png" alt="PureMac Smart Care - one scan covering 12 cleanup checks, with free-space meter" width="820"></p><p align="center">- <img src="screenshots/breakdown.png" alt="PureMac scan results — by-category breakdown chart" width="820">+ <img src="screenshots/scanning.png" alt="PureMac scanning - live progress with categories and sizes as they are found" width="820"></p><p align="center">@@ -166,17 +166,21 @@ Give it a minute to re-seed, then open PureMac once. If it still sticks, a resta## Screenshots-| Onboarding | App Uninstaller |+| Smart Care | Live scan ||---|---|-|  |  |+|  |  |++| Scan breakdown | App Uninstaller |+|---|---|+|  |  || System Junk | Xcode Junk ||---|---||  |  |-| User Cache |-|---|-|  |+| User Cache | Onboarding |+|---|---|+|  |  |## Architecturediff --git a/docs/README.ar.md b/docs/README.ar.mdindex e9dff95..8c7abff 100644--- a/docs/README.ar.md+++ b/docs/README.ar.md@@ -1,5 +1,5 @@<p align="center">- <img src="../screenshot.png" alt="PureMac" width="700">+ <img src="../screenshots/smart-care.png" alt="PureMac" width="700"></p><p align="center">diff --git a/docs/README.es.md b/docs/README.es.mdindex d3b1906..1d58ec0 100644--- a/docs/README.es.md+++ b/docs/README.es.md@@ -1,5 +1,5 @@<p align="center">- <img src="../screenshot.png" alt="PureMac" width="700">+ <img src="../screenshots/smart-care.png" alt="PureMac" width="700"></p><p align="center">diff --git a/docs/README.ja.md b/docs/README.ja.mdindex e0fb4a2..e3be115 100644--- a/docs/README.ja.md+++ b/docs/README.ja.md@@ -1,5 +1,5 @@<p align="center">- <img src="../screenshot.png" alt="PureMac" width="700">+ <img src="../screenshots/smart-care.png" alt="PureMac" width="700"></p><p align="center">diff --git a/docs/README.zh-Hans.md b/docs/README.zh-Hans.mdindex 688d884..413363e 100644--- a/docs/README.zh-Hans.md+++ b/docs/README.zh-Hans.md@@ -1,5 +1,5 @@<p align="center">- <img src="../screenshot.png" alt="PureMac" width="700">+ <img src="../screenshots/smart-care.png" alt="PureMac" width="700"></p><p align="center">diff --git a/docs/README.zh-Hant.md b/docs/README.zh-Hant.mdindex 232dbe0..0a91ac7 100644--- a/docs/README.zh-Hant.md+++ b/docs/README.zh-Hant.md@@ -1,5 +1,5 @@<p align="center">- <img src="../screenshot.png" alt="PureMac" width="700">+ <img src="../screenshots/smart-care.png" alt="PureMac" width="700"></p><p align="center">diff --git a/project.yml b/project.ymlindex efed700..c3711c7 100644--- a/project.yml+++ b/project.yml@@ -23,8 +23,8 @@ settings:CODE_SIGN_ENTITLEMENTS: "PureMac/PureMac.entitlements"INFOPLIST_FILE: "PureMac/Info.plist"PRODUCT_BUNDLE_IDENTIFIER: "com.puremac.app"- MARKETING_VERSION: "2.9.2"- CURRENT_PROJECT_VERSION: "23"+ MARKETING_VERSION: "2.9.3"+ CURRENT_PROJECT_VERSION: "24"GENERATE_INFOPLIST_FILE: "NO"ASSETCATALOG_COMPILER_APPICON_NAME: "AppIcon"COMBINE_HIDPI_IMAGES: "YES"diff --git a/screenshots/scanning.png b/screenshots/scanning.pngnew file mode 100644index 0000000..b2a8966Binary files /dev/null and b/screenshots/scanning.png differdiff --git a/screenshots/smart-care.png b/screenshots/smart-care.pngnew file mode 100644index 0000000..540cee3Binary files /dev/null and b/screenshots/smart-care.png differ