Skip to content

Desktop "Add application" picker omits most installed apps #3920

Description

@TyceHerrman

Describe the bug

Harper Desktop's Add application picker omits most installed applications and shows only an unusual subset.

The installed-app catalog returns bundle identifiers such as md.obsidian and com.apple.TextEdit. AppSearchIndex::populate() then filters those identifiers with ends_with(".app"). That suffix check belongs to application paths such as /Applications/Obsidian.app, not bundle identifiers.

As a result, ordinary bundle identifiers are excluded from the search index. Only identifiers that happen to end in the literal suffix .app remain visible.

To Reproduce

  1. Install an application whose bundle identifier does not end in .app, such as Obsidian (md.obsidian).
  2. Open Harper Desktop.
  3. Go to Settings → Integrations.
  4. Select Add application....
  5. Search for the installed application by name.
  6. Observe that it is missing from the results.
  7. Enter its bundle identifier manually and observe that Harper still allows it to be added.

Expected behavior

The picker should list every installed graphical application returned by the Spotlight application-bundle query, regardless of the bundle identifier's suffix.

Screenshots

Not included.

Platform

  • Harper Desktop 2.7.0
  • macOS 27.0 (26A5388g)
  • Apple Silicon (arm64)

Additional context

installed_application_bundle_ids() already:

  1. Uses Spotlight to find items with content type com.apple.application-bundle.
  2. Converts each .app path into its kMDItemCFBundleIdentifier.
  3. Removes empty and duplicate identifiers.

Source:

The problematic logic is:

for bundle_id in installed_bundles {
    let line = bundle_id.trim();

    if !line.ends_with(".app") {
        continue;
    }
}

Removing this suffix check should allow the existing catalog results to populate the index:

for bundle_id in installed_bundles {
    let result = app_search_result_from_bundle_id(&bundle_id);

    if seen_bundle_ids.insert(result.bundle_id.clone()) {
        self.index.push(result);
    }
}

A regression test should include ordinary identifiers such as com.apple.TextEdit and md.obsidian and confirm that both enter the search index.

Related history:

Metadata

Metadata

Assignees

No one assigned

    Labels

    desktopRelated to the Harper desktop application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions