feat(review): VS Code-style diff search in file tree sidebar#347
Merged
Conversation
Search data layer for code review: patch parser, match finder, file grouping, snippet extraction, DOM highlight injection with shadow DOM traversal, and state management hook. Co-Authored-By: sercan tor <tor.sercan@gmail.com>
VS Code-style search UI in the file tree panel. Search input at the top of the sidebar replaces the tree with grouped results when active. Clicking a match navigates to the file and scrolls to the line. Keyboard: Cmd/Ctrl+F focuses input, Enter/F3 steps through matches, Escape clears. In-diff highlights via shadow DOM traversal. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d880eef to
4860421
Compare
Owner
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
…rimmed queries Group search matches by line before highlighting so each DOM occurrence gets the correct match ID. Also trim the query before building the highlight regex to stay consistent with the search engine. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 20, 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.
Summary
@pierre/diffsshadow DOM via recursive root traversal with inline stylesCmd/Ctrl+Ffocuses search,Enter/F3steps through matches,EscapeclearsBased on the search engine from #344 by @sercantor — his data layer (
reviewSearch.ts,reviewSearchHighlight.ts,useReviewSearch.ts) is taken verbatim. The UI integration (sidebar placement, FileTree/DiffViewer wiring) is new.Test plan
bun test packages/review-editor/— all 19 tests passbun run build:review && bun run build— builds cleanCmd+Ffocuses input,Entersteps forward,Shift+Entersteps backward,EscapeclearsCmd+Ffalls through to browser default