fix(web): thread search shows the same PR badge as the sidebar#22590

closed
main
t3/fix-stacked-pr-thread-search
opened9d agobyMmaria

Thread search results showed the bare number of whichever PR matched the query. A thread with a stack or several linked PRs looked like it had one PR, while the same row outside search showed the stack or +N badge.

Search rows now render the sidebar's PR badge presentation (resolveThreadPullRequestBadgePresentation) with the same icon, count, and tone. Search rows are already buttons, so the badge renders as a plain span with no nested link or list control. It still appears only when the query matches one of the thread's PRs. The sidebar search and the command palette both use this component. The icon sets text-current because command palette items mute any svg without a text color class.

Before, searching #22562 on a thread with a 5-PR stack:

sidebar search before: row shows bare #22562

After:

sidebar search after: row shows the stack icon with 5

command palette after: icon and count share the PR state color

Verified in a dev server with #22561 to #22565 linked to a thread, plus web typecheck, lint, and the existing ThreadStatusIndicators and Sidebar.logic tests. Mobile search was not checked.

Written by claude-opus-5-5 in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

Checks

1 pending · 23 successful · 10 skipped
Checks in progress

In progress1

4546651

Closing: current main already covers this as of 8a9d0e0dd5. If you still see it on a build that includes that commit, reply and we'll reopen.