Skip to content

feat(app): add previous and next match buttons to conversation search - #64865

Merged
neriousy merged 2 commits into
devfrom
search-match-buttons
Nov 19, 2026
Merged

neriousy merged 2 commits into
devfrom
search-match-buttons

Conversation

@neriousy

@neriousy neriousy commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

Closes #64825

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The conversation search bar (Cmd/Ctrl+F) only let you step through matches with the keyboard (Enter / Shift+Enter, ↑ / ↓), so it looked like only the first result was reachable. This adds up and down buttons next to the match count, same as the file search bar already has.

The buttons call the existing result.move(-1 | 1), are disabled when there are no matches, and keep focus in the input. Their labels reuse the already translated ui.fileSearch.previousMatch / ui.fileSearch.nextMatch strings, so there are no new i18n keys.

No feature flag. It's two buttons on an existing control that call an action the keyboard already triggers.

How did you verify your code works?

  • bun typecheck in packages/app
  • Opened the session-transcript-find story in Chrome via Playwright: clicking next twice goes 1/4 → 3/4, previous goes back to 2/4, input keeps focus. With a query that has no matches (0/0) both buttons are disabled.

Screenshots / recordings

Taken from the session-transcript-find story, dark theme.

Before After
Matches (2/4) before after
No matches (0/0), arrows disabled before after

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #4714

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This works as described. I opened the session-transcript-find story in Chromium for both the base and this PR. Starting at 1/4, clicking next twice gives 3/4 and previous then gives 2/4. The input keeps focus, and at 0/0 both buttons are disabled. tsc -b in packages/app and search-machine.test.ts both pass.

Public API: unchanged. The change only adds UI inside packages/app, with no new i18n keys.

One thing worth fixing: the bar is still a fixed 200px, so the two buttons take space from the query field. In the story it shrinks from about 112px to about 56px (see inline comment).

Related: #4714

Before

After

{c.result.activeDisplay()}/{c.result.count()}
</span>
</Show>
<For each={[-1, 1]}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The bar container is still fixed at w-[200px], so these two 20px buttons come out of the text field. In the story the input goes from about 112px on the base to about 56px here. That's fine for trail with 2/4, but a longer query or a count like 12/134 will leave very little of the query visible. Could you widen the bar to make up for the buttons (it is already capped by max-w-[50vw])?

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The earlier point about the narrow query field is addressed. The bar is now 240px wide, and in the story the input is about 96px wide (about 112px on the base), with the buttons still working. Public API: unchanged. Nothing further from me.

Before

After

@neriousy
neriousy merged commit 88c90d0 into dev Nov 19, 2026
14 checks passed
@neriousy
neriousy deleted the search-match-buttons branch November 19, 2026 12:38
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
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.

Issue with the search function

1 participant