Skip to content

feat(search): bundle FFF for Find in Files - #438

Merged
fcoury merged 2 commits into
mainfrom
fcoury/fff-search
Nov 6, 2026
Merged

fcoury merged 2 commits into
mainfrom
fcoury/fff-search

Conversation

@fcoury-oai

@fcoury-oai fcoury-oai commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Human-written TL;DR

Replaces the external need for ripgrep by bundling fff 🤘

AI-written summary

Find in Files used to launch rg for every query. A fresh Red installation therefore needed ripgrep on PATH and permission for the search plugin to start it. This change bundles FFF in Red so Space g works with an empty process allowlist.

FFF builds a background index for repeated searches. Red checks current ignore rules on every query and only skips a file when the index can rule out a match and the file still has the same identity and change timestamp. It scans the remaining files with ripgrep’s Rust matching libraries, preserving smart case, regex and literal search, and byte offsets for navigation.

The picker shows the first matching line as soon as it arrives, cancels superseded queries, and returns up to 500 matching lines. Host API 0.22.0 exposes the search and cancellation calls to plugins. CI runs the search fixtures on its platform matrix, and release archives include FFF’s license.

CleanShot 2026-11-06 at 13 26 31

How to Test

  1. In an otherwise empty directory, save a file containing café Needle. Start Red there with the default config and no rg on PATH. Press Space g, type needle, and open the result. The cursor should land on the N after café .
  2. Reopen Find in Files and enter [ in regex mode. The picker should show a regex error. Replace it with needle and confirm the match returns without closing the picker.
  3. To run the fixture corpus, build with cargo build --release --locked -p red-fff-parity, then run python3 tools/fff-parity/compare.py target/release/red-fff-parity. Add --against-rg to compare the same cases with an installed ripgrep.

Local validation passed 75 parity cases each on macOS and Linux and 50 on Windows GNU. The macOS release binary also exercised hidden files, invalid regex recovery, Unicode navigation, and result export with no rg on PATH. The parity report records the platform coverage and warm-query timings.

@fcoury-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T16:32:05.629022Z 72b3311 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 72b3311303

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fcoury
fcoury merged commit 63bd293 into main Nov 6, 2026
34 of 35 checks passed
@fcoury
fcoury deleted the fcoury/fff-search branch November 6, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants