Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unified search provider id #50550

Merged
merged 2 commits into from
Jan 31, 2025
Merged

Conversation

SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski commented Jan 29, 2025

Issue

Unified Search not searching dav properly

Screenshot 2025-01-29 154244

Unified search backend use the provider id to match providers but the front end was using the app id.

This works fine for most search providers as the app id and provider id are the same in most cases (e.g files app; app id is 'files', search provider id is 'files') but in other cases like dav this breaks (e.g. dav app; app id is 'dav' but search provider is 'contacts or events')

Also using the app id is not a good choice as one app can have multiple providers registered (e.g. dav has Contacts, Events and Tasks search)

Resolution

Modify front end to use provider id instead of app id

Checklist

@SebastianKrupinski
Copy link
Contributor Author

/compile amend

@nextcloud-command nextcloud-command force-pushed the fix/noid/fix-unified-search-provider-id branch from f132a11 to f70c929 Compare January 29, 2025 21:18
Copy link
Contributor

@nfebe nfebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would look into this asap

@nfebe nfebe marked this pull request as draft January 29, 2025 22:47
@nfebe nfebe force-pushed the fix/noid/fix-unified-search-provider-id branch from cbeee9f to 86d282b Compare January 29, 2025 22:50
@SebastianKrupinski
Copy link
Contributor Author

@nfebe your commit broker this again.

image

You can not just make up your own provider id, the id is being sent as 'dav-contacts' which is not valid.

What issue are you trying to solve maybe I can help you find a proper solution?

@nfebe
Copy link
Contributor

nfebe commented Jan 29, 2025

You can not just make up your own provider id, the id is being sent as 'dav-contacts' which is not valid.

Sorry, I converted it to WIP, it's not supposed to use that there a corresponding frontend change which I am adjusting.

@nfebe nfebe force-pushed the fix/noid/fix-unified-search-provider-id branch from 86d282b to f70c929 Compare January 30, 2025 00:04
@ChristophWurst ChristophWurst added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Jan 30, 2025
@nfebe nfebe force-pushed the fix/noid/fix-unified-search-provider-id branch from 67ed0d4 to f4516d2 Compare January 30, 2025 09:56
@nfebe nfebe marked this pull request as ready for review January 30, 2025 10:00
@nfebe
Copy link
Contributor

nfebe commented Jan 30, 2025

Also using the app id is not a good choice as one app can have multiple providers registered (e.g. dav has Contacts, Events and Tasks search)

Sure, I added a searchFrom property to in in-folder search plugin we could use this in the backend, my attempted backend changes where reverted as it would need much more work.

I have added a commit that restores full function with apps like dav while still having in-folder search working as expected.


TODO:

  • Ensure "load more results" removes other filters

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nfebe nfebe force-pushed the fix/noid/fix-unified-search-provider-id branch from f4516d2 to 32752f0 Compare January 30, 2025 15:37
@nfebe nfebe requested a review from skjnldsv as a code owner January 30, 2025 15:37
@nfebe nfebe force-pushed the fix/noid/fix-unified-search-provider-id branch from 32752f0 to b4338cf Compare January 30, 2025 17:25
@SebastianKrupinski
Copy link
Contributor Author

/compile amend

The client-side plugin `in-folder` uses the `files` provider, this makes it
overlap with the main files provider itself.

This change follows eecda06 after it was discovered
that some apps/providers like `dav` use providers from another app like `contacts`

Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command nextcloud-command force-pushed the fix/noid/fix-unified-search-provider-id branch from b4338cf to 8863b85 Compare January 30, 2025 17:35
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminds me of #47523 😞
I really dislike when this kind of mess comes to haunt us back way later.
It works almost fine because in most cases it works, but we don't test good enough for "edge cases" (which aren't really edge cases tbh because it's just standard behavior).

@nfebe nfebe merged commit 8bc5ec1 into master Jan 31, 2025
120 checks passed
@nfebe nfebe deleted the fix/noid/fix-unified-search-provider-id branch January 31, 2025 11:33
@nfebe
Copy link
Contributor

nfebe commented Jan 31, 2025

/backport to stable31

@nfebe
Copy link
Contributor

nfebe commented Jan 31, 2025

/backport to stable30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants