Repository navigation
[stable-25.1.x] Fix to show search results immediately - #7038
Merged
Merged
Conversation
… the server The search combined the stored conversations with the open conversations, users and messages fetched from the server. combine only emits once every source has emitted, so the matching local conversations were only shown after the slowest server request had answered. The server requests now start as pending, so local matches are shown at once and the server results are added as they arrive. The search counts as loading until every server request has answered, so "no results" is not shown too early. A failed request counts as answered with no results instead of ending the whole search. The regression was introduced in 4be64e3, which made local filtering wait for the users and open conversations, and kept by 023588b, which moved the search into combine. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Since the local search results are shown before the server has answered, the search results are rebuilt with every server response. This made some existing problems easier to hit: - Messages loaded with "load more" were replaced by the first page again when a later server response arrived. - The search of the previous query kept running until the new search started after the debounce. Its responses replaced the results and ended the loading state while the new query was being typed. - Returning to the previous query before the debounce ended skipped the search and left the loading state on. The running search is now canceled as soon as the query changes, and the messages loaded with "load more" are kept when the results are rebuilt. The word pattern is built once per search instead of for every response. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- A failed "load more" request was not caught and crashed the app. The error is now logged and the shown messages are kept. - Tapping "load more" again while it was loading requested the same page twice, which listed messages twice and crashed the list on the duplicate keys. Further taps are now ignored until it has finished. - A "load more" of the previous query kept running after the query changed and could mix its messages into the new search. It is now canceled together with the search. - Repeating the same query, for example after a rotation, started the search again when no results were shown yet. It is now skipped while the search of that query is still running. The new test file uses the SPDX copyright line for new files. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- After a failed "load more" request, the message search can't continue, but the "load more" entry stayed and did nothing when tapped. It is now removed, also when later server responses rebuild the results. - A "load more" entry still shown from the previous query could load more messages of that query into the new search, before the new search had reset the message search. "Load more" now only runs once the first page of messages of the current search has arrived. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
… pause The search only started 300 ms after the last keystroke, so the result list stayed empty for that time, although the stored conversations can be filtered at once. The pause is only needed to avoid a server request per keystroke. The search now starts at every keystroke and only the server requests wait for the pause. Changing the query cancels the search while it waits, so typing quickly still sends the server requests for the last query only. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
backportbot
Bot
requested review from
AndyScherzinger,
mahibi and
rapterjet2004
November 12, 2026 13:41
Contributor
AndyScherzinger
approved these changes
Nov 12, 2026
Contributor
📱 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
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.
Backport of PR #7032