feat(cli): add React-aware symbol search - #1627
Open
aidenybai wants to merge 3 commits into
Open
Conversation
…ol-search # Conflicts: # packages/react-doctor/src/cli/index.ts # packages/react-doctor/src/cli/utils/constants.ts
commit: |
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
Contributor
Interactive terminal E2ETerminal Control verified the built CLI at
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2e5fb02. Configure here.
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.

Why
Developers and coding agents need a deterministic way to find reusable JavaScript, TypeScript, and React symbols before adding duplicate code. Before this change, React Doctor's contributor workflows shell out to a separate Truffler CLI and have no React-specific component or hook vocabulary.
After this change,
react-doctor findprovides that workflow directly, withsearchandgrepaliases, generic declaration kinds, React-awarecomponentandhookkinds, grep-friendly text, and structured JSON.Product brief
cli.invokedwithcommand=find; success is at least 100 invocations across the next two releases.What changed
find <query> [directory]withsearchandgrepaliasesAGENTS.mdand the contributor skills withreact-doctor findRDE/parity was not run because this is an additive CLI workflow, not a lint rule or detector change.
Test plan
nr typecheck— passed across all 11 workspace packagesnr lint— passed with existing fuzz-corpus warnings onlynr format:check— passednr testinpackages/react-doctor— 2,438 passed, 27 skippedfind,search, andgrepfixture smoke tests — passednr smoke:packed-cli-install— passed with no forbidden packagesnr testwas attempted; five unrelated eval suites could not import Daytona's undeclaredtslibdependency, while the 127 eval tests that loaded passedNote
Low Risk
Additive CLI and documentation only; scan/report behavior is unchanged, with tests and smoke coverage for the new command.
Overview
Introduces
react-doctor find <query> [directory](aliasessearch,grep) as an additive CLI for fuzzy JavaScript/TypeScript symbol lookup—grep-friendly lines or--json,--kindfilters (including Reactcomponentandhook), limits, path validation, and parse-error warnings. Search is implemented via@rayhanadev/truffler(bundled for packed installs), with local helpers for kind parsing, React naming/wrapper classification, and output formatting; adoption is tracked oncli.invokedwithcommand=find.Truffler moves from a root devDependency to a
react-doctorruntime dependency (plusoxc-parser); rootpackage.jsondrops the standalone Truffler dev dep.AGENTS.md, contributor skills, and the agent skill now tell people to runreact-doctor findinstead ofbunx @rayhanadev/truffler. README documents the command; a patch changeset ships the new surface.Reviewed by Cursor Bugbot for commit 825b6da. Bugbot is set up for automated code reviews on this repo. Configure here.