Skip to content

Treat underscores in thread search like other word breaks - #5038

Merged
brsbl merged 1 commit into
mainfrom
bb/thread-search-underscore-words-thr_tm8utsbqpb
Oct 6, 2026
Merged

brsbl merged 1 commit into
mainfrom
bb/thread-search-underscore-words-thr_tm8utsbqpb

Conversation

@brsbl

@brsbl brsbl commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Server thread search kept _ inside a query word, so foo_bar became the full-text phrase "foo" then "bar". ⌘K's title check, and the search index itself, treat _ as a word break. As a result, ⌘K could move a thread into its title-match section when the server had ranked it as a message-only match, and a title with both words apart, like "Search the thread list" for thread_search, wasn't found at all.

What changed

  • Thread search now splits queries on _ the same way it splits on spaces and hyphens.
  • thread_search finds threads containing both "thread" and "search", ranking titles with both words first.
  • Highlights cover each word separately.
  • Underscored queries no longer require the words to be next to each other, matching how hyphenated queries already behave.

How you verified

  • Remote CI: passed on 44e1c7a, including the new db test. Two unrelated Windows server timeouts passed on rerun. Run
  • New db test: thread_search ranks "Search the thread list" first and highlights both words. Today's code doesn't find that title at all.
  • New ⌘K unit case: thread_search treats "Search the thread list" as a title match, the same as the server.

Follows #5003 and #4962.

BB-Thread: ⌘K improvements

🤖 Generated with Claude Code

AGENT GENERATED

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@brsbl
brsbl merged commit fc019dd into main Oct 6, 2026
74 of 75 checks passed
@brsbl
brsbl deleted the bb/thread-search-underscore-words-thr_tm8utsbqpb branch October 6, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant