Add in-room search match stepping with a k-of-N counter, highlight, and keyboard navigation#34008
Open
hayaksi1 wants to merge 1 commit into
Open
Add in-room search match stepping with a k-of-N counter, highlight, and keyboard navigation#34008hayaksi1 wants to merge 1 commit into
hayaksi1 wants to merge 1 commit into
Conversation
…nd keyboard navigation
This was referenced Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In-room search shows a results list, but there is no way to step through the matches in place:
you can't see a match highlighted in the live timeline, can't move to the next/previous match, and
have no sense of "match k of N". Finding the right hit means scanning the results list and clicking
each one.
Fix
Add in-room match stepping driven by a small
SearchSessionStore(the search cursor) and a sharedSearchMatchNavigation"k of N" control:match, scrolling the live timeline to it and focusing the matched tile.
"older/newer" regardless of the backend's raw ordering; ties keep backend order (stable sort),
undated matches sink last, and matches missing an event/room id are skipped (can't be jumped to).
separate from hover/selected and from the mention/keyword highlight, with the search term
highlighted in its body.
affordance while a match is focused, keeping the search session alive. The stepper's "loaded"
denominator is disambiguated from the backend's "N results found" estimate.
re-search and the session isn't torn down mid-jump.
Tests
SearchSessionStore-test: cursor lifecycle, stepping/wrap, durable focused-match guard, snapshotfields (matches/previews/order/scope).
RoomSearchNavigationViewModel-test: k-of-N derivation, step actions, wrap-around.SearchMatchNavigation.test(shared-components): renders the counter + arrows, disabled/emptystates.
MessagePanel/TimelinePanel/EventTile: focused-match highlight plumbing.Relates to #21640
Checklist
public/exportedsymbols have accurate TSDoc documentation.