Skip to content

fix(mobile): rank fuzzy thread search across lists - #76

Draft
kvnloo wants to merge 12 commits into
channels/basefrom
feat/mobile-fuzzy-thread-search
Draft

kvnloo wants to merge 12 commits into
channels/basefrom
feat/mobile-fuzzy-thread-search

Conversation

@kvnloo

@kvnloo kvnloo commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Problem

Owner O13: “can we setup ai search & fuzzy search and just overall better search algorithm for t3code android. also move the search bar to the bottom and lets think thru how to improve navigation while not adding too much clutter at the bottom since nav bar is there too. generate a few prototypes and fix the search algo first in parallel”

Mobile active, pending, sidebar, and archived search previously used inconsistent matching. This Draft PR addresses the algorithm first, not AI/semantic retrieval or bottom navigation. Qualification found a ranking defect: searching arch preferred a one-edit typo (Arxh) over the exact contiguous substring in Search.

Design

  • Share one pure matcher for active, pending, sidebar, and archived threads, with Unicode case/accent folding.
  • Match quality within a field: exact token 5, word prefix 4, contiguous substring of at least three characters 3, one insertion/deletion/substitution/adjacent transposition for query words of at least four characters 2, and noncontiguous in-order subsequence 1. The existing exact joined-field bonus is +0.5.
  • Sort first by tier title > project/branch/workspace context > server-reported message content, then match quality, then latest activity, then stable original position. Blank queries retain the caller's pinned/shelf/archive ordering.
  • Keep the distinct bottom-navigation experiments in Draft PRs feat(mobile): prototype A bottom search pill in Android navigation #77 and feat(mobile): prototype B bottom search sheet behind Settings toggle #78 untouched; no semantic-search backend was added.

Change (file:line at head 35dc2bbe6fa1b108d96dbfcb249913cc7856274d)

Tests

UNRUN locally: connector cannot execute Vite Plus, TypeScript, or an Android build. New table-driven cases are present but not claimed passing.

  • vp test run apps/mobile/src/features/threads/mobileThreadSearch.test.ts — unrun.
  • vp test run apps/mobile/src/features/threads/threadListV2.test.ts apps/mobile/src/features/home/homeThreadList.test.ts — unrun.
  • vp run check:changed — unrun.
  • CI run #42003694118 — pending at last read; Mobile Fingerprint Check queued; Agent Context Budget failed, cause not verified.

Expected order worked out by hand: arch returns Arch (exact 5.5), Archive (prefix 4), Search (substring 3), Arxh (one edit 2), AxRxCxH (subsequence 1), regardless of the newer typo timestamp. search returns title Searching before project Search, branch feature/search, and message-preview-only Search by tier. Equal-scored Search thread items order by descending timestamp, then input index. serach, searxh, searxch, and sarch match Search; cot does not fuzzy-match Cat, and sxxrch does not match Search.

How Kevin checks it on his phone

Install an Android build of feat/mobile-fuzzy-thread-search using the maintainer's vp run mobile:install android workflow. On Home and the navigation sidebar, search arch and serach; verify exact/prefix/substring results precede typos, while title/project hits precede message-only hits. Repeat in Archived Threads; clear the query to verify pinned shelves and archived newest/oldest ordering remain unchanged. Physical device verification has not happened.

Follow-ups

Open risks: no verified test pass or Android capture; message-only hits have no server relevance score, and archive still groups by project. This review did not change #77 or #78.

Implemented by ChatGPT (mobile app, GitHub connector) for Kevin's OSS factory.

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Nov 5, 2026

This branch has not been deployed

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

Labels

vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant