feat(analyze): hidden-space insights in overview#664
Merged
Conversation
Add insight entries to the analyze overview that surface disk usage in commonly overlooked locations: - iOS Backups (~/Library/.../MobileSync/Backup) - Old Downloads (files >90 days in ~/Downloads) - Mail Data (~/Library/Mail) - Xcode DerivedData, Spotify Cache, JetBrains Cache, Docker Data - node_modules total (scans all projects under home) - Time Machine local snapshots Each insight entry appears alongside the standard overview entries with a distinctive icon. Virtual entries (node_modules total, Time Machine) cannot be navigated into. All others open in the regular analyze view.
Expand insight entries with cleanable paths that mo clean can handle: - Trash, System Caches, System Logs, Homebrew Cache (universal) - Xcode Simulators, Xcode Archives, pip/Gradle/CocoaPods cache (dev) Only shown when the path exists on the machine.
Remove node_modules (all), Time Machine Local, Trash, and Mail Data insight entries that fail due to permission-denied errors from du/find.
Owner
|
@sebastianbreguel Thanks for this, the hidden-space insight idea is solid and fits naturally into the overview. Merged with two small follow-up fixes in 81c36e4:
The result is a cleaner list that only surfaces entries worth acting on. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds hidden-space insight entries to the
mo analyzeoverview screen that surface disk usage in commonly overlooked locations. These appear alongside the standard directory entries (Home, App Library, Applications, System Library).Many of these correspond to things
mo cleanalready handles — this PR lets users see how much space each category uses before deciding to clean.Discussed in #659 as features that fit naturally inside
mo analyze.New insight entries
Universal (everyone has these)
mo clean?~/Downloads(files >90 days)~/Library/.../MobileSync/Backup~/Library/Cachesmo cleanclears user caches~/Library/Logsmo cleanclears old logs~/Library/Caches/Homebrewbrew cleanup/mo cleanDeveloper-specific (only shown if installed)
mo clean?~/Library/Developer/Xcode/DerivedData~/Library/Developer/CoreSimulator/Devicesxcrun simctl delete unavailable~/Library/Developer/Xcode/Archives~/Library/Containers/com.docker.docker/Datadocker system prune~/Library/.../Spotify/PersistentCachemo cleanhandles app caches~/Library/Caches/JetBrains~/Library/Caches/pippip cache purge~/.gradle/cachesgradle cleanBuildCache~/Library/Caches/CocoaPodspod cache clean --allBehavior
Visual preview
Test plan
go build ./cmd/analyze/— compiles cleanlygo vet ./cmd/analyze/— no issuesgo test ./cmd/analyze/— all tests passTestCreateInsightEntries,TestInsightIcon,TestMeasureOldDownloads,TestMeasureInsightSizeFallsBackToOverview