You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thread search excerpts can highlight text inside commit SHAs even though the server ignores those occurrences when deciding what matches.
Deterministic repro on origin/main (8c51815e0dab006104014ea57cf2b1a372c06d52): In a Replay (dev) thread titled Weekly notes, send dead 7dead52bb8 from the composer. Search for dead in the sidebar. The orchestration.searchThreads RPC uses ThreadSearch to accept the standalone match and return the full snippet; ThreadSearchMatchExcerpt then highlights the snippet independently.
Observed: The result row renders two <mark> elements. messageMatcher("dead")("7dead52bb8") returns null, but findSearchTokenRanges("dead 7dead52bb8", "dead") returns [{start: 0, end: 4}, {start: 6, end: 10}].
Expected: Only [{start: 0, end: 4}] is highlighted. A search for the SHA prefix 7dead still highlights [{start: 5, end: 10}].
Change
Reuse the server matcher's cached hex-run check in the excerpt highlighter so it skips interior SHA hits without rescanning the run for each hit. This fixes the shared ranges used by sidebar and command palette excerpts on web, Electron, and mobile, and by the range-based fallback when seeding web thread find; server ranking and the wire contract are unchanged.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
The regression originally failed on the extra {start: 6, end: 10} range. Running the same fixture on the new base still returns that range. On the rebased head, vp test run packages/shared/src/paletteSearch.test.ts passed all 39 tests, including the SHA prefix check.
Macroscope's review found this PR approvable — Search excerpts stop highlighting interior SHA substrings already ignored by search matching, while SHA-prefix matches remain supported. The change is confined to search highlighting and navigation ranges, with no persistent-data or operational effects.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between 1148b54 and 0f67aaa.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Search matching and highlight range generation now exclude hits inside qualifying hexadecimal IDs. Tests cover excluded interior hits and accepted prefix matches.
Changes: Hexadecimal hit filtering
Layer / File(s)
Summary
Shared hexadecimal hit filtering packages/shared/src/paletteSearch.ts, packages/shared/src/paletteSearch.test.ts
A shared check identifies hits inside qualifying hexadecimal IDs. The message matcher and highlight range finder apply the check. Tests verify that interior hits are excluded while prefix matches are accepted.
Search excerpts no longer highlight text inside commit SHAs, which matches what the server matches. Prefix matches on a SHA still highlight. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the change: excerpt highlighting no longer marks substrings inside ignored commit SHAs. The raw summary and objectives both describe the same change in makeInteriorHexHitCheck and find…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives a reproduction and expected behavior. The Change section explains the fix and …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the change: excerpt highlighting no longer marks substrings inside ignored commit SHAs. The raw summary and objectives both describe the same change in makeInteriorHexHitCheck and findSearchTokenRanges. The title follows the conventional commit form and is specific.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives a reproduction and expected behavior. The Change section explains the fix and says server ranking and the wire contract are unchanged. The Scope section justifies why no issue is linked. The Verification section lists focused test results, a before/after scenario, and items not checked. It meets the template's requirements.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 6500240 and 1148b54.
Files selected for processing: 2
packages/shared/src/paletteSearch.test.ts
packages/shared/src/paletteSearch.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Environment: real web app in Chromium, 1280×800, light theme, isolated fresh database per commit, free Replay (dev) Multi turn recording.
Steps: On each fresh database, create a demo project and a Replay (dev) Multi turn thread titled Weekly notes with an initial Start turn. Open it directly, type dead 7dead52bb8 into the composer, send it, and wait for the replay reply. Search 7dead in the sidebar and capture the SHA-prefix highlight; then search dead and capture the excerpt highlights. The pre-titled thread avoids the auto-title match, equivalent to the reported rename.
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
size:M30-99 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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
Thread search excerpts can highlight text inside commit SHAs even though the server ignores those occurrences when deciding what matches.
Deterministic repro on
origin/main(8c51815e0dab006104014ea57cf2b1a372c06d52): In a Replay (dev) thread titledWeekly notes, senddead 7dead52bb8from the composer. Search fordeadin the sidebar. Theorchestration.searchThreadsRPC usesThreadSearchto accept the standalone match and return the full snippet;ThreadSearchMatchExcerptthen highlights the snippet independently.<mark>elements.messageMatcher("dead")("7dead52bb8")returnsnull, butfindSearchTokenRanges("dead 7dead52bb8", "dead")returns[{start: 0, end: 4}, {start: 6, end: 10}].[{start: 0, end: 4}]is highlighted. A search for the SHA prefix7deadstill highlights[{start: 5, end: 10}].Change
Reuse the server matcher's cached hex-run check in the excerpt highlighter so it skips interior SHA hits without rescanning the run for each hit. This fixes the shared ranges used by sidebar and command palette excerpts on web, Electron, and mobile, and by the range-based fallback when seeding web thread find; server ranking and the wire contract are unchanged.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
{start: 6, end: 10}range. Running the same fixture on the new base still returns that range. On the rebased head,vp test run packages/shared/src/paletteSearch.test.tspassed all 39 tests, including the SHA prefix check.expected: count 1,observed: count 2; the reviewed patch passed the same assertion. Before/after screenshots, runtime transcript, and runnable scenario.vp run check:changedexited 0: format, lint, Knip, typecheck, and all 41 affected tests passed.Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).