Skip to content

[stable-25.1.x] Fix to show search results immediately - #7038

Merged
mahibi merged 5 commits into
stable-25.1.xfrom
backport/7032/stable-25.1.x
Nov 12, 2026
Merged

mahibi merged 5 commits into
stable-25.1.xfrom
backport/7032/stable-25.1.x

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 12, 2026

Copy link
Copy Markdown

Backport of PR #7032

… 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 backportbot Bot added 3. to review Waiting for reviews AI assisted labels Nov 12, 2026
@backportbot backportbot Bot added this to the 25.1.1 milestone Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings17137
Errors015

SpotBugs

CategoryBaseNew
Bad practice77
Correctness88
Dodgy code4040
Internationalization33
Malicious code vulnerability33
Performance77
Security1111
Total7979

@github-actions

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit ebcada0
Version 7038
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@mahibi
mahibi merged commit cd9cfaa into stable-25.1.x Nov 12, 2026
15 of 16 checks passed
@mahibi
mahibi deleted the backport/7032/stable-25.1.x branch November 12, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants