feat(core): drive the unified search modal from the search controller#62093
Open
pringelmann wants to merge 3 commits into
Open
feat(core): drive the unified search modal from the search controller#62093pringelmann wants to merge 3 commits into
pringelmann wants to merge 3 commits into
Conversation
…roller Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
e85573a to
74dab71
Compare
pringelmann
commented
Jul 14, 2026
| private revealTimer: ReturnType<typeof setTimeout> | null = null | ||
| private pendingCancels: (() => void)[] = [] | ||
|
|
||
| constructor(private onChange?: (states: Record<string, CategorySearchState>) => void) {} |
Contributor
Author
There was a problem hiding this comment.
The controller now takes one onChange callback. I opted for this approach to keep things simple (instead of an event bus or a store). There's a single owner and a single consumer: useUnifiedSearch creates the controller, adapts the callback to a shallowRef, and disposes it on unmount. A callback keeps the controller plain TS with no framework dependency, so it unit-tests without mounting Vue. Pub/sub would add subscriber bookkeeping for listeners that don't exist, and a store would pull in reactivity the core doesn't need.
Happy to debate :)
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
74dab71 to
c3ee5c2
Compare
susnux
approved these changes
Jul 14, 2026
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.
Summary
Moves search orchestration out of the modal and into
UnifiedSearchController, wired up through a newuseUnifiedSearchcomposable. The modal now just renders the controller's per-category state.-> Preview link <-
Per-category filter params (date, person, provider) are forwarded so filters page correctly on "Load more".
Checklist
3. to review, feature component)stable32)AI (if applicable)