Skip to content

Highlight the first match in the @ and issue/PR pickers - #681

Merged
kalvinnchau merged 7 commits into
larry/search-tab-pickerfrom
larry/search-mention-resource
Oct 8, 2026
Merged

kalvinnchau merged 7 commits into
larry/search-tab-pickerfrom
larry/search-mention-resource

Conversation

@loganj

@loganj loganj commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🤖

Summary

  • The @ button picker and the issue/PR picker now search like Command-K.
  • The first result is highlighted, and Enter picks it. Up and Down move the highlight and wrap at the ends. Focus stays in the search field, so you can keep typing after an arrow key. Before, Down moved focus onto a row and typed letters no longer reached the search.
  • The matched letters are underlined.
  • Issues and PRs get a better order, by how well the title matches: exact title, then title start, then word start, then the others. Within each rank, newest comes first. An exact title comes before a newer title that only starts with your text. Before, the order was newest first only.
  • The fourth of five PRs that bring the Command-K search behavior to other pickers. It is stacked on Rank and highlight the New tab picker like Command-K #675.

@ button picker: typing "Hon" lists Honey and Honey (agent), with the first row highlighted and "Hon" underlined

Issue/PR picker: typing "login" lists "Login page shows a blank error" and "Fix login" before "Relogin loops after token refresh", with the first row highlighted

Details

  • Mention order does not change. The @ button keeps rankMentions, so it gives the same people in the same order as inline @ completion and mobile. Only word-start matches are underlined, because those are the matches that rank.
  • Same matches for issues/PRs. An item still matches when your text is anywhere in its title or repository name. Only the order changes.
  • What stays the same. Enter on an empty search picks the first row, as before; the row now shows the highlight. Shift+Enter and Shift+arrows are not picker keys. Rows that cannot be chosen (disabled mentions, issues being checked) are skipped. Enter and arrow keys do not reach the composer behind the popup. Rows are still buttons, and Tab still reaches them.
  • Tab and the highlight. When Tab focuses a row, that row becomes the highlight. While a row has focus, focus follows the highlight: Up and Down move both (as before this PR), and moving the pointer over another row moves focus there too. So Enter on a focused row always picks the highlighted row. This lives in the shared useSearchHighlight, so the New tab picker from Rank and highlight the New tab picker like Command-K #675 gets it too; its test covers Tab, Down, pointer and Enter.
  • Screen readers. The search field points at the result list (aria-controls) and at the highlighted row (aria-activedescendant). A status line names the highlighted row.
  • Shared pieces. useSearchHighlight gets two opt-in options, highlightEmpty and wrap. Command-K does not use them. MatchedLabel does not change. These two pickers wrap it in one <span>, so an underlined name stays on one line inside their flex-column labels.

@loganj
loganj force-pushed the larry/search-mention-resource branch from 056bea1 to 8a67eb4 Compare October 7, 2026 20:18
@loganj
loganj force-pushed the larry/search-mention-resource branch from 8a67eb4 to 6251b00 Compare October 7, 2026 22:15
@loganj
loganj force-pushed the larry/search-mention-resource branch from 6251b00 to b2d4b71 Compare October 8, 2026 15:31
@loganj
loganj marked this pull request as ready for review October 8, 2026 16:10
@loganj
loganj requested review from a team, comp615 and wesbillman October 8, 2026 16:10

@wpfleger96 wpfleger96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Thanks for this. Two things:

  1. Issue/PR order: an exact title can lose to a newer title that only starts with the text, because exact, prefix and word-start matches share one group. With "Login page broken" (newer) and "Login" (older), typing login highlights "Login page broken", so Enter adds that one. Same thing as on #682. Could the order use the matchName rank directly (exact, then prefix, then word start, then the rest), newest first within each rank, like the New tab picker in #675?

  2. Arrow keys from a focused row: Tab still reaches the rows, but once a row has focus, Up and Down no longer do anything. Before this change they moved between rows. In both pickers, could Up/Down on a focused row move the highlight too, for example by handing the key to highlight.keyDown and returning focus to the search field? A test that tabs to a row and presses Down would cover it.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One additional change needed: keep the highlight aligned with the row Enter activates after mixing Tab and pointer movement (inline). The previously reported focused-row arrow-key regression also remains applicable; I have not repeated it.

Automated source review by Star Lord, via Wes’s account. Head b2d4b71ca2dd15f7b72e3f93172b5ca88da674c0, base 2fc97375edfca62ef7ccb59effe0994baad66e28. No tests or app execution; inspected both supplied screenshots and the CI snapshot (Windows native validation skipped).

Comment thread src/bundled/mentions/MentionPicker.tsx Resolved
@loganj

loganj commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Both points from the first review are fixed in c8decd27.

  1. Issue/PR order: titles are now ordered by matchName rank (exact, then prefix, then word start, then the rest), newest first within each rank. With "Fix login page" (newer) and "Fix login" (older), typing fix login highlights "Fix login", and Enter adds it. The new test "puts an exact title before a newer title that starts with it" checks this. It fails on the previous head.
  2. Arrow keys from a focused row: in both pickers, Up and Down on a focused row move the highlight and focus together, as before this PR. Focus follows the highlight instead of going back to the search field. That keeps native Enter on the focused row correct, and it also fixes the Tab-then-hover finding from the second review. New tests in both pickers tab to a row and press Down. They fail on the previous head.

#682 is rebased on this head as 80e62af6, with no conflicts.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No further changes requested. The updated source addresses the earlier highlight/Enter mismatch and focused-row arrow handling, and puts exact issue titles ahead of prefix matches.

Automated source review by Star Lord, via Wes’s account: head c8decd270754e97902243b27921fc02718c18cd5, base 2fc97375edfca62ef7ccb59effe0994baad66e28. No tests or app execution; CI was still running at the snapshot, Windows native validation was skipped, and native/screen-reader behavior remains unverified.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No material blockers found in the reviewed picker changes. The previously reported ranking and focused-row selection issues are addressed. One optional IME follow-up is inline.

Reviewed head c8decd270754e97902243b27921fc02718c18cd5 against stacked base 2fc97375edfca62ef7ccb59effe0994baad66e28.

Validation: traced shared-hook callers and selection/revalidation paths; independently reviewed keyboard/focus behavior; exercised the real mention-composer fixture in Chromium and WebKit (wrapping, continued typing, Tab → arrows → pointer → Enter), both passing. Inspected both screenshots. No source changes or full-suite rerun; native IME and screen-reader behavior remain untested.

CI is not green: Chromium shard 1/6 fails in github-conversation.spec.mjs:440: a contributor link intercepts the Expand Comment click. This is outside the modified picker paths, not established as a defect caused by this PR. Some browser shards remain running; JavaScript and Rust lanes passed. Required CI still needs to clear before merge. This is a comment, not approval.

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Comment thread src/bundled/projects/ResourcePicker.tsx Resolved
@loganj
loganj force-pushed the larry/search-mention-resource branch from c8decd2 to ba49c57 Compare October 8, 2026 17:13

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No further changes requested. The resource picker’s IME follow-up now returns before cancelling composition keys, and the new assertion checks both composition signals; the prior focus and ranking fixes remain intact in source.

Star Lord’s automated source review via Wes’s account — head ba49c57529fd1140d1484214c2e553f13538175e, base c67bfb1b7a864a5be9cdb2d9d18ee5e7fcf6020b. No tests or app execution performed; native IME and screen-reader behavior remain unverified. The CI snapshot reports failing Chromium/WebKit journey shards 1/6 and the required aggregate; their causes were not established by this review. This is not an approval or merge-readiness verdict.

@loganj
loganj force-pushed the larry/search-mention-resource branch from ba49c57 to 2458015 Compare October 8, 2026 17:46

@wpfleger96 wpfleger96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Both points are addressed. Issues and PRs now follow matchName rank order, newest first within each rank. After Tab, Up/Down move the highlight and focus together, and a pointer highlight moves focus too, so Enter picks the highlighted row. The IME early return is back as well. Reverting any of these fixes fails a test.

Optional nit: the new sentence in the useSearchHighlight doc comment left one line far past the wrap width (...chooses the highlighted one. Typed text highlights the first row, so Enter chooses it without an).

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new actionable findings in this restack follow-up. The inherited member-row styling uses Dialog’s floating selection/text recipe, and the added assertion checks the resolved fill; the picker files are unchanged since the previous review.

Star Lord automated source review via Wes’s account: head 2458015a6b217b43ed2b3f1fc78a9b7954613c4a, base fc641ce655e00dfb376d905c3e51786039803ede.

Source-only: no tests or app execution; rendered contrast and native focus remain unverified, and the CI snapshot shows Chromium/WebKit shard 1/6 and required aggregate failures (causes not investigated).

@loganj
loganj force-pushed the larry/search-mention-resource branch from 2458015 to 1a2e973 Compare October 8, 2026 19:54

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new actionable findings in this follow-up: the saved-team journey now checks the initial highlight and Enter from search, retaining exact-recipient and composer-focus assertions; the restacked picker integration remains consistent with the prior fixes.

Automated source review by Star Lord via Wes’s account: head 60437cf3344cc6e3c591313eeede43dc77ecb069, base 79fc98f573c0efdb6f81767da152fb1e99ba7833. Source-only—no tests or app execution; both public screenshots inspected. Hosted CI was still running at the snapshot (DCO passed; Windows skipped); native focus, IME and screen-reader behavior remain unverified.

@kalvinnchau
kalvinnchau added this pull request to stack #772 October 8, 2026 21:21
Larry added 3 commits October 8, 2026 14:31
The @ button and issues/PRs pickers now use the shared search highlight.
Focus stays in the search field: Up and Down move a visible highlight
(wrapping, as before) and Enter chooses the highlighted row, which is the
first row before anything is typed, as before. Shift keys stay text keys.
Matched letters are underlined. Mentions keep rankMentions, shared with
inline @ completion and mobile. Issues and PRs keep the same matches but
put titles with a word starting with the text first, newest first.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Tab can focus a result row. Enter then chooses that row, so the hook
now highlights and announces it. The @ and issue/PR search fields
point aria-controls at their result list.

MatchedLabel returns one element, so a flex-column label keeps an
underlined name on one line.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Wrapping MatchedLabel itself in a span changed the measured name box in
the add-to-channel dialog. Wrap only the @ and issue/PR labels, which
sit in a flex column.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Larry and others added 4 commits October 8, 2026 14:31
matchPerson ranks mentions, so it now also draws their underlines; the
underline no longer marks more than the rank used.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Issue and PR titles are ordered by matchName rank (exact, prefix, word
start, then the rest), newest first within each rank, so an exact title
comes before a newer one that only starts with it.

When Tab moves focus to a row, Up and Down now move the highlight and
focus together, as they did before the shared highlight. A pointer
highlight also moves focus while a row has it, so native Enter always
chooses the highlighted row. Pointer moves over rows that cannot be
chosen no longer move the highlight.

Signed-off-by: Logan Johnson <[email protected]>
The issue/PR search returns before cancelling Enter while an input
method is composing, as the shared highlight already does. A New tab
picker test also covers Up/Down and pointer focus after Tab, which the
shared highlight now handles for every picker.

Signed-off-by: Logan Johnson <[email protected]>
Main's saved-team journey pressed Down to move focus onto the team row.
With the shared highlight, the first match is already highlighted and
focus stays in the search, so Enter there inserts the team.

Signed-off-by: Logan Johnson <[email protected]>
@kalvinnchau
kalvinnchau force-pushed the larry/search-mention-resource branch from 60437cf to 1745ca5 Compare October 8, 2026 21:35
@kalvinnchau
kalvinnchau merged commit 6428b01 into main Oct 8, 2026
24 of 32 checks passed
@kalvinnchau
kalvinnchau deleted the larry/search-mention-resource branch October 8, 2026 21:50
wpfleger96 pushed a commit that referenced this pull request Oct 8, 2026
…nsole

* origin/main: (23 commits)
  Let Enter continue lists in the shared composer (#736)
  fix(emoji): match run-together words in picker search (#765)
  test: cover template and team dialog cancellation (#741)
  keep GitHub PR metadata readable at enlarged text sizes (#737)
  Unify scrollbars with the sidebar’s quiet gray styling (#735)
  feat(identity): add Sign out of Buzz with optional device wipe (#718)
  add scrollable breathing room above the composer (#771)
  Highlight the first match in the workflow channel picker (#682)
  Highlight the first match in the @ and issue/PR pickers (#681)
  Rank and highlight the New tab picker like Command-K (#675)
  Highlight the first match when adding people to a channel (#674)
  Highlight and rank New message recipients like search (#672)
  Match people names one way, ignoring accents (#705)
  fix(launch): dismiss the launch screen when Buzz starts in the background (#761)
  Organize sessions into sections with inherited workspace settings (#754)
  Add Voice Notes plugin (#747)
  Float agent activity above the composer (#764)
  feat: add snapshot sharing dialog and durable delivery (#712)
  feat(agents): add community agent and team catalogs (#716)
  feat: add reusable team bundles (#717)
  ...

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

# Conflicts:
#	src-tauri/src/lib.rs
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.

4 participants