Skip to content

Show ⌘K thread titles first with the matching message underneath - #4962

Merged
brsbl merged 12 commits into
mainfrom
bb/quick-switcher-review-followups-thr_tm8utsbqpb
Oct 6, 2026
Merged

brsbl merged 12 commits into
mainfrom
bb/quick-switcher-review-followups-thr_tm8utsbqpb

Conversation

@brsbl

@brsbl brsbl commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

⌘K buried exact title matches under message matches, and multi-line excerpts hid each row's thread name. Its highlight could also jump to another thread when server results arrived.

What changed

  • Threads whose title contains every typed word rank above message-only matches.
  • Title matching follows the server's rule: each word starts a title word, ignoring accents and punctuation.
  • Each row leads with the thread title.
  • When a message matched, the row's second line shows that excerpt on one line.
  • Every row reserves the "Open in split" column, so text truncates at the same edge.
  • The highlighted row stays visible and selected when server results arrive, and stays listed when you arrow back up.
  • Local matching builds rows only for the top 50 matches.
  • Personal threads no longer match the hidden "Personal" project name.

How you verified

  • Remote CI: passed on a258a28. Run
  • Eval test: real "moss plugins" results put the exact title first, selected and highlighted.
  • Chrome for Testing via bb Browser Automation, headless at 2×, desktop and mobile web.
  • Typing "in": every row leads with its title; message matches show one-line excerpts.
  • Arrowing to the 6th row before server results: it stays highlighted on "Upgrade toolchain…".
  • Opening ⌘K on a thread that's already open: all rows keep the split column; widths hold while arrowing.
  • Slop Cop (security, architecture, code quality, performance) on a7673d5: one blocker, fixed in 24ebaa0.
  • Two review follow-ups fixed in a258a28, with tests for accented, hyphenated and mid-word queries and for arrowing back up.

Screenshots

Before: fd31b75 (merge base) · After: a258a28 · Captured at 2×

Screen / state Viewport Before After
⌘K / type "in" Desktop · 1440×900 Before: message excerpts lead each row, multi-line After: titles lead, one-line excerpts
⌘K / type "in" Mobile · 390×844 Before on mobile After on mobile
⌘K / "in", arrow to the 6th row before server results arrive Desktop · 1440×900 Before: highlighted row pushed out of view After: Upgrade toolchain stays highlighted in view

The back/forward shortcut fixes moved to #5013.

BB-Thread: ⌘K improvements

🤖 Generated with Claude Code

AGENT GENERATED

- Keep a highlighted ⌘K row visible when server results push it past the
  group limit, so Enter still opens the chosen thread.
- Build ⌘K rows only for the top 50 local matches, match project names
  once per project, and skip the Personal project's hidden name.
- Put Go back / Go forward first in the default bindings so a user's own
  Mod+[ / Mod+] binding wins, and skip them while the in-app browser has
  focus.
- Offer Go back / Go forward in ⌘⇧P only when there is somewhere to go.
- Correct the docs on what the shortcuts do at either end of history.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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 and others added 7 commits October 5, 2026 16:34
Thread title text keeps whitespace exactly, so message excerpts with
line breaks or code blocks rendered as tall multi-line rows in ⌘K.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every thread row keeps the hint's space and shows it only when
highlighted, so excerpts truncate at the same edge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A thread that matched by title and by a message showed the message
excerpt and moved its title to the details line. The title now stays
on top, and Enter still opens the thread at the matched message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every row leads with the thread title. When a message matched, the
second line shows that excerpt instead of project and time, so the row
shows what Enter will jump to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Threads whose title contains every query word now come before threads
found only by a message, in both Active and Archived. Adds an eval for
searching "moss plugins", where the server ranked the exact title match
third.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brsbl brsbl changed the title Fix quick switcher review follow-ups Show ⌘K thread titles first and fix back/forward shortcut gaps Oct 6, 2026
@brsbl brsbl changed the title Show ⌘K thread titles first and fix back/forward shortcut gaps Show ⌘K thread titles first with the matching message underneath Oct 6, 2026
brsbl added a commit that referenced this pull request Oct 6, 2026
## Human comments

## What was wrong

The ⌘[ / ⌘] shortcuts from #4897 overrode a user's own binding on the
same key, ran inside the in-app browser, and showed in ⌘⇧P with nowhere
to go. The docs also said the keys do nothing at either end of history,
but on the web the browser's own Back runs.

## What changed

- A user's own ⌘[ / ⌘] binding now wins over Go back / Go forward.
- Go back / Go forward no longer run while the in-app browser has focus.
- ⌘⇧P lists Go back / Go forward only when there is somewhere to go.
- `docs/configuration.md` describes what happens at either end of
history.

## How you verified

- Remote CI: passed on 7a435a3.
[Run](https://github.com/get-bb/bb/actions/runs/37443067390)
- Chrome for Testing via bb Browser Automation, headless at 2×, on
7a435a3.
- A fresh window's ⌘⇧P lists neither command; after opening another
thread, only Go back.
- Earlier QA: with Previous thread rebound to ⌘[, ⌘[ opened the thread
above instead of going back.
- Not run end to end: the desktop-only in-app browser case, covered by a
server binding test.

### Screenshots

Before: fd31b75 (merge base) · After: 7a435a3 · Captured at 2×

| Screen / state | Viewport | Before | After |
| --- | --- | --- | --- |
| ⌘⇧P / type "go", fresh window | Desktop · 1440×900 | ![Before: Go back
and Go forward listed with nowhere to
go](https://github.com/user-attachments/assets/abbfd237-af52-4174-be64-03c1cfcc0f6b)
| ![After: neither command
listed](https://github.com/user-attachments/assets/dd8ff893-ba50-44ed-8952-e4a7da4fbe10)
|
| ⌘⇧P / type "go", fresh window | Mobile · 390×844 | ![Before on
mobile](https://github.com/user-attachments/assets/9b944c45-d805-40b6-bc77-6818dbeb5426)
| ![After on
mobile](https://github.com/user-attachments/assets/bb7b6ec5-5150-4069-9ed5-c7a6dee22cf0)
|
| ⌘⇧P / type "go", after opening another thread | Desktop · 1440×900 |
![Before: Go back and Go forward both
listed](https://github.com/user-attachments/assets/c7d48205-94a0-4521-8c4b-e388a0261f21)
| ![After: only Go back
listed](https://github.com/user-attachments/assets/4a6d96fd-a81e-48ac-aee7-60354ed72657)
|

Split out of #4962. Follows #4897.

BB-Thread: [⌘K
improvements](https://brsbl.getbb.app/projects/proj_khiw2za95v/threads/thr_tm8utsbqpb)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> AGENT GENERATED

Co-authored-by: Claude Opus 5.5 <[email protected]>
@brsbl
brsbl merged commit 6ca9cd6 into main Oct 6, 2026
41 checks passed
@brsbl
brsbl deleted the bb/quick-switcher-review-followups-thr_tm8utsbqpb branch October 6, 2026 12:04
brsbl added a commit that referenced this pull request Oct 6, 2026
## 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](https://github.com/get-bb/bb/actions/runs/37511624334)
- 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](https://brsbl.getbb.app/projects/proj_khiw2za95v/threads/thr_tm8utsbqpb)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

> AGENT GENERATED

Co-authored-by: Claude Opus 5.5 <[email protected]>
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