Repository navigation
Conversation
Add mod+f in-page search for the session transcript. Matches are computed from row data (user/assistant text, reasoning, tool inputs, errors) so the virtualized timeline can scroll off-screen matches into view, then rendered hits are highlighted with the CSS Custom Highlight API. Enter / shift+Enter and mod+g / mod+shift+g cycle matches, Escape closes. The pierre file-find host registry is exported so the timeline joins the existing mod+f routing and only one find bar is active at a time. Bottom follow is paused synchronously before navigating so anchor-bottom resize handlers cannot race the find scroll.
Contributor
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Contributor
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
3 of 6 tasks
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.
Issue for this PR
N/A — small UX gap reported directly: the session transcript has no in-page search.
Type of change
What does this PR do?
Adds
mod+fin-page search to the session timeline in the app/desktop UI.The timeline is virtualized, so a purely DOM-based find would miss off-screen content. Matches are therefore computed from row data (user/assistant text, reasoning, tool call inputs, error rows), the active match is scrolled into view through the virtualizer, and rendered hits are highlighted with the CSS Custom Highlight API under the same
opencode-findnames/colors the pierre file viewer already uses. Highlights rebuild as rows mount and unmount during scrolling.The timeline registers as a find host in the existing pierre
file-findregistry (newregisterFindHost/activateFindHostexports), somod+f/mod+grouting is shared with the file viewer and only one find bar is active at a time. File tabs keep their existing shortcut behavior and win viadefaultPrevented. The bar itself is the existingFileSearchBarcomponent with the existingui.fileSearch.*i18n keys, so no new strings were added.One non-obvious fix: bottom-follow must be paused synchronously (new
onPauseScrollprop wired toautoScroll.pause) before navigating to a match. Otherwise the anchor-bottom resize handlers race the find scroll and pull the viewport back down, making far-away matches unreachable.How did you verify your code works?
find.test.tscovers search-text extraction and match computation (7 tests pass). Full app unit suite passes except one pre-existing i18n failure that also fails ondev.bun dev+ a local server with seeded sessions:mod+fopens the bar even while the composer is focused; counts shown/m,0/0on no match.Enter/shift+Entercycle with wrap-around;mod+g/mod+shift+gnavigate while open.Escapecloses the bar and clears all highlights.open === falseand the keydown listener only does modifier checks for unrelated keys.Screenshots / recordings
Happy to provide a recording on request; verified interactively as described above.
Checklist