Skip to content

[Bug]: Mobile search puts an older settled thread with an exact title match below weaker results #31873

Closed

Description

@RolfHegr

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Have several settled threads with similar titles (repeated work), some older than what the phone keeps loaded.
  2. On mobile, search for words from the title of one of the older ones.

Expected behavior

The thread whose title matches best is at or near the top.

Actual behavior

It shows up for a moment, then lands below other results, or doesn't show up at all. I mostly find threads by name, so this makes search hard to use for older work.

What I think is going on

From reading the code at 25b53299:

  • Older settled threads aren't on the phone, so their title matches come from the server and arrive after the local results. useThreadListSearchMatches keeps rows that are already shown in place, so late ones go below.
  • searchOlderSettled returns at most 15 title rows (OLDER_SETTLED_TITLE_ROWS). With many similar titles, recency and open counts decide which 15 come back, so the one I want can miss the cut.
  • Mobile passes picks: false, so it doesn't remember which thread I opened for this search last time. Desktop does.

Possible fixes: let a late title match move above results that only match inside messages, use picks on mobile, or rank older settled title rows by title quality before recency.

Impact

Major degradation or frequent failure

Version or commit

Current mobile app, code read at main @ 25b5329

Environment

The logic is in shared mobile code, not platform specific.

Workaround

Pin threads I come back to, or put a unique word in the title and search for that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions