feat: add fuzzy file search for PRD file path input#253
Conversation
Add fuzzy autocomplete suggestions when entering PRD file paths in the EpicLoaderOverlay. Discovers JSON files on mount (up to depth 5, excluding node_modules/.git/dist/etc) and filters them as the user types using a scoring-based fuzzy matcher. Arrow keys navigate suggestions, Tab completes, Enter selects. Also fixes cursor display bug where the underscore cursor was rendered as a separate element, causing the first character to appear masked. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@bigs is attempting to deploy a commit to the plgeek Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughAdds a new fuzzy-search utility for scoring and filtering file paths and integrates it into the FileBrowser component to provide keyboard-driven fuzzy search, filtered navigation, UI indicators, plus documentation and tests for the interactive file browser and fuzzy search behaviour. Changes
Sequence DiagramsequenceDiagram
actor User
participant FB as FileBrowser Component
participant FS as fuzzySearch Utility
participant UI as UI Display
User->>FB: Type search query
activate FB
FB->>FB: update searchQuery state
FB->>FS: fuzzySearch(entries, query)
activate FS
FS->>FS: calculate scores (exact, filename, containment, sequential)
FS-->>FB: FuzzyMatch[] (sorted)
deactivate FS
FB->>FB: compute filteredEntries
FB->>UI: render filtered results + search indicator
deactivate FB
UI-->>User: show matches and count
User->>FB: navigate / select
activate FB
FB->>FB: apply navigation on filteredEntries
FB->>UI: update selection
deactivate FB
UI-->>User: display selected entry
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Heya @subsy totally understand if you wanna close this in favor of something else. I was checking out ralph-tui and found that the prompt dialog for locating the prd.json file (when working in that modality) was a little rough. The "cursor" underscore was always fixed at the first position, so you couldn't see what the first letter you typed was. It didn't advance. So I updated it so that:
I've tested it locally, it's looking good to me :) Edit: I had Claude implement a simple fuzzy matching algo to avoid bringing in another dependency, but would happily factor that out as well. |
|
Ah, interesting. Yeah, that should be doable. Probably easiest to let that land first, then rebase this onto that. I'd be happy to when that's ready. |
|
Nice one - going to try to get that in today or tomorrow - working on the
big parallel execution pr first
…On Mon, 2 Feb 2026 at 18:12, bigs ***@***.***> wrote:
*bigs* left a comment (subsy/ralph-tui#253)
<#253 (comment)>
Ah, interesting. Yeah, that should be doable. Probably easiest to let that
land first, then rebase this onto that. I'd be happy to when that's ready.
—
Reply to this email directly, view it on GitHub
<#253 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2X73NRVF2MRPBEPLDP3ED4J6HR7AVCNFSM6AAAAACTWTEUTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQMZWHA2TMMRWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Ben Williams
Newsletter <https://plg.news> | Website <https://plgeek.com> | LinkedIn
<https://www.linkedin.com/in/theproductledgeek/>
|
|
Miscellaneous question—how are you liking CodeRabbit? My team has been using BugBot, but we're getting frustrated with the latency (even though the quality is fairly high). Feels like CodeRabbit is a fair bit quicker, but curious what you think of the quality. |
@bigs I really like CR - especially if you put in a bit of work to tune the config (though OOTB its pretty good). I still get frustrated with the latency - less so in private repos - but OSS repos are rate limited - but free |
Resolves conflicts by keeping FileBrowser component from main while preserving fuzzy-search utility from this branch for future integration.
Add real-time fuzzy filtering to the file browser: - Type any alphanumeric character to start filtering - Results ranked by fuzzy match score (exact > starts with > contains > sequential) - Search clears when changing directories or pressing Escape - ".." entry hidden during search for cleaner results - Footer shows contextual keybindings for search mode
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
==========================================
+ Coverage 43.35% 43.49% +0.13%
==========================================
Files 91 92 +1
Lines 28281 28351 +70
==========================================
+ Hits 12260 12330 +70
Misses 16021 16021
🚀 New features to boost your workflow:
|
Document the keyboard-driven file browser UI: - quick-start.mdx: Add "File Browser" section with keyboard shortcuts - json.mdx: Add "Interactive File Browser" section explaining when it appears and how fuzzy search works Covers navigation, fuzzy search, path entry, and hidden files toggle.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@website/content/docs/getting-started/quick-start.mdx`:
- Around line 154-168: The key shortcut table in the "File Browser" section is
missing the Tab autocomplete entry; update the table in quick-start.mdx under
the "File Browser" heading to add a row for `Tab` with an appropriate action
like "Autocomplete selected suggestion" (so readers see Tab alongside
`Enter`/`→` and other keys) and ensure any accompanying prose about fuzzy search
also mentions Tab as the autocomplete shortcut.
New test file for fuzzy-search.ts utility (100% coverage): - Empty/basic query handling - Exact match scoring (1000 points) - Filename matching tiers (800/600/400 points) - Path matching (200 points) - Sequential fzf-style matching with consecutive bonuses - Ranking and alphabetical tie-breaking - Real-world file patterns Extended file-browser.test.ts with integration tests: - Fuzzy filtering of DirectoryEntry arrays - Search mode index calculation (no ".." in search) - Max index bounds for navigation
- Tab now selects the highlighted entry (same as Enter) - Updated quick-start.mdx and json.mdx docs to include Tab shortcut - Mentioned Tab in fuzzy search prose sections Addresses PR feedback about missing Tab autocomplete documentation.
|
Oh awesome, ty! Excited to use this! |
feat: add fuzzy file search for PRD file path input
Summary
Test plan
bun run dev run --tracker jsonwithout a--prdflageto open the epic loader overlay🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Tests