Skip to content

fix: open custom unified search file results - #4275

Open
Dennis-Otto wants to merge 1 commit into
nextcloud:masterfrom
Dennis-Otto:fix/custom-unified-search-files
Open

fix: open custom unified search file results#4275
Dennis-Otto wants to merge 1 commit into
nextcloud:masterfrom
Dennis-Otto:fix/custom-unified-search-files

Conversation

@Dennis-Otto

Copy link
Copy Markdown

Summary

  • Resolve custom unified search entries with fileId or path attributes to native Nextcloud file metadata.
  • Keep the existing URL fallback for results that do not refer to a Nextcloud file.
  • Preserve the existing behaviour of the built-in files and fulltextsearch providers.

Reasoning

Nextcloud iOS currently creates temporary URL metadata for every result from a custom unified search provider, even when the entry exposes the standard fileId and path attributes. Selecting that temporary item exits silently because its random ocId is not present in Realm.

Resolving those attributes before creating the URL fallback makes file-backed results use the regular native file metadata and viewer. It also gives them their actual file type and preview instead of a generic URL icon.

Closes #4274.

Testing

  • Reproduced with Nextcloud iOS 34.1.4 against an isolated Nextcloud 33.0.8 instance and a minimal custom search provider.
  • Confirmed that the provider response contains a readable file ID and user-relative path.
  • Ran git diff --check.
  • Parsed the changed Swift source with xcrun swiftc -frontend -parse.
  • A full Xcode build was not available locally; the project CI will perform the supported simulator build and test suite.

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Resolve custom provider entries with standard fileId or path attributes to native Nextcloud file metadata. This avoids creating temporary URL metadata that cannot be selected and preserves the URL fallback for non-file results.

Assisted-by: Codex:gpt-5
Signed-off-by: Dennis Otto <61191244+Dennis-Otto@users.noreply.github.com>
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.

Custom unified search file results cannot be opened

1 participant