Skip to content

feat: add search, filter and sort for cache items#29

Closed
nguyenhuy158 wants to merge 2 commits intomomenbasel:mainfrom
nguyenhuy158:feature/search-filter
Closed

feat: add search, filter and sort for cache items#29
nguyenhuy158 wants to merge 2 commits intomomenbasel:mainfrom
nguyenhuy158:feature/search-filter

Conversation

@nguyenhuy158
Copy link
Copy Markdown

@nguyenhuy158 nguyenhuy158 commented Apr 14, 2026

Summary

This PR adds search, filter, and sorting capabilities to cache items as requested in #18.

Key Changes

  • Search: Filter items by name or path.
  • Filter: Filter by size (Small/Medium/Large) and date (Today/7d/30d/1y).
  • Sort: Sort by Size, Date, and Name (Asc/Desc).
  • Engine: Updated ScanEngine to retrieve modification dates for all categories.
  • Selection: "Select All" now respects active filters.

Closes #18

@nguyenhuy158 nguyenhuy158 changed the title [Feature] Add search/filter by size and date for cache items feat: add search, filter and sort for cache items Apr 14, 2026
@momenbasel
Copy link
Copy Markdown
Owner

Hey @nguyenhuy158, thanks so much for this PR! Really appreciate you taking the time to add search, filter, and sort functionality - these are genuinely useful features that improve the user experience a lot.

We just shipped a major v2.0 rewrite that restructured the entire codebase (new AppState, NavigationSplitView, native SwiftUI components, etc.), so this PR unfortunately can't merge as-is since it targets the old AppViewModel and CategoryDetailView structure.

That said, we've incorporated your search idea into the new CategoryDetailView with .searchable() - so your contribution directly influenced the direction! If you'd like to contribute further on v2, we'd love the help - especially on the filter-by-size and filter-by-date features which we haven't added yet. Feel free to open a new PR against main.

Thanks again for caring about PureMac!

momenbasel added a commit that referenced this pull request Apr 14, 2026
Inspired by community PRs #29, #30, #32, #33:

- Onboarding: 3-page welcome flow (Welcome, FDA setup, Ready)
  Shows only on first launch via @AppStorage
  Polls FDA status every second with live UI update
- Search: .searchable() in CategoryDetailView for filtering files
- Confirmation: .confirmationDialog before all destructive operations
- Protection: 27 Apple system apps excluded from uninstaller
  (Safari, Finder, Mail, Calendar, Photos, etc.)
  Also skips /System paths entirely
@momenbasel
Copy link
Copy Markdown
Owner

Hey @nguyenhuy158! Closing this as we've incorporated your search idea into v2.0 - CategoryDetailView now has .searchable() for filtering files by name or path. The filter-by-size and filter-by-date features from your PR are still great ideas we haven't added yet though!

Sorry for closing - we did a full SwiftUI rewrite for v2.0 which changed the entire codebase structure, so all PRs against v1 can't merge cleanly anymore. Your contribution definitely shaped what we built though.

Would love if you could take a look at the new codebase and see what you think! And if you're up for it, porting the size/date filters to v2 would be an awesome contribution. Thanks again!

@momenbasel momenbasel closed this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add search/filter by size and date for cache items

2 participants