Skip to content

feat: highlight matching characters in fuzzy file search#1420

Merged
bolinfest merged 1 commit intomainfrom
pr1420
Jun 28, 2025
Merged

feat: highlight matching characters in fuzzy file search#1420
bolinfest merged 1 commit intomainfrom
pr1420

Conversation

@bolinfest
Copy link
Collaborator

@bolinfest bolinfest commented Jun 28, 2025

Using the new file-search API introduced in #1419, matching characters are now shown in bold in the TUI:

incremental-file-search-in-codex.mov

Fixes #1261

@bolinfest bolinfest added the code-review Issues relating to code reviews performed by codex label Jun 28, 2025
@github-actions github-actions bot added codex-review-in-progress and removed code-review Issues relating to code reviews performed by codex labels Jun 28, 2025
@github-actions
Copy link
Contributor

Summary

Replaces the plain Vec<String> file-search results with Vec<FileMatch> objects and uses the supplied indices to bold the matching characters in the File Search popup.

Notes

  • Propagates the new type through AppEvent, ChatWidget, BottomPane, etc.
  • Turns compute_indices on, removes path-only mapping.
  • Renders each match as a Line of Spans, adding Modifier::BOLD at the provided indices; selected row still gets yellow FG.

Review

Nice quality-of-life improvement—code is tidy and the highlighting works well.

  • Consider guarding against indices == None instead of expect, so we never panic on unexpected data.
  • If the search library ever returns byte offsets, iterating over chars() could de-sync highlighting; you may want to clarify/convert.
  • Otherwise LGTM!

View workflow run

@bolinfest bolinfest merged commit 4a341ef into main Jun 28, 2025
12 checks passed
@bolinfest bolinfest deleted the pr1420 branch June 28, 2025 22:04
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support @ for fuzzy file search

1 participant