fix(applications): scan ~/Applications on macOS - #589
Merged
Xoshbin merged 1 commit intoAug 7, 2026
Conversation
macOS installers that don't require admin rights write to the per-user ~/Applications folder instead of /Applications — Autodesk Fusion, some Adobe tools, and the PWA shims Chrome and Edge generate. None of them were reachable from search, because the macOS arm of get_default_app_scan_paths() only covered /Applications and /System/Applications. The Linux arm already adds ~/.local/share/applications and the Windows arm already adds APPDATA, so macOS was the only platform ignoring its per-user location. This brings it in line. is_default_app_location() derives from the same function, so ~/Applications now also counts as a default location and the settings UI correctly rejects it as a redundant custom scan path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Owner
|
Thank you for your contribution. |
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.
Problem
Apps installed into the per-user
~/Applicationsfolder are invisible to search on macOS.get_default_app_scan_paths()covers only/Applicationsand/System/Applications. Installers that don't ask for admin rights write to~/Applicationsinstead — Autodesk Fusion, some Adobe tools, and the PWA shims Chrome and Edge generate.This is a platform asymmetry rather than a deliberate choice: the Linux arm of the same function already adds
~/.local/share/applications, and the Windows arm already addsAPPDATA. macOS was the only platform ignoring its per-user location.Evidence
On an affected machine, querying
search_index.dbbefore the change:~/ApplicationsAutodesk FusionfindableChange
Appends
~/Applicationsto the macOS defaults, mirroring how the Linux arm resolves its per-user path viadirs::home_dir(). No new dependency.is_default_app_location()derives from the same function, so~/Applicationsnow also counts as a default location — the settings UI will correctly reject it as a redundant custom scan path for users who added it manually as a workaround.Worth flagging
Scanner::scan_directoryrecurses, so this also picks up bundles nested inside~/Applicationssubfolders. On the machine above that meant 6 extra entries beyond the 4 top-level ones, fromChrome Apps.localized,Edge Apps.localized, and a vendor subfolder — all of them genuinely launchable apps.For users with many PWAs this could feel noisy. Two mitigations already exist: individual apps can be disabled via
applicationEnabledin the Applications tab, and the recursion behaviour is unchanged from how custom scan paths have always worked. Happy to restrict the new path to a non-recursive scan if you'd prefer that trade-off.Tests
Two tests added, both verified failing before the change and passing after:
test_get_default_app_scan_paths_includes_user_applicationstest_is_default_app_location_macos_matches_user_applicationscargo test --lib application::→ 97 passed, 0 failed.cargo clippyclean (the two remaining warnings are pre-existing: the ext-builder sidecar placeholder and ablock v0.1.6future-incompat in a transitive dep).cargo fmt --checkclean.