Scan web/ directly in React Doctor - #291
Merged
Merged
Conversation
Running the action from the repo root discovered the `web` project but never resolved the root-level baseline diff plan against it, so every PR reported `baselineDegraded` and listed pre-existing issues as new — along with a bogus "add fetch-depth: 0" warning that was already set. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Every React Doctor PR comment has been carrying a "⚠️
.github/workflows/react-doctor.ymlis configured incorrectly — addfetch-depth: 0" warning.fetch-depth: 0was already set (added in cebfeed); the warning is a false positive.Cause
The action ran with the default
directory: .. Reproduced locally against a full clone, same commits and same 4 changed files:react-doctor . --project '*' --scope changedmode: "diff",baselineDegraded: truereact-doctor ./web --project '*' --scope changedmode: "baseline", delta computedThere is no root
package.json— the Next.js app is inweb/. Project discovery from the root still finds it (framework: nextjs), which is why full-scope push runs report findings normally. But the baseline diff plan is computed at the repo root and re-resolved per project, and that remapping does not survive the root→webhop, so no delta is ever produced.baselineDegradedthen trips and the renderer unconditionally attributes it to a shallow checkout.Effect: PRs #286, #288 and #289 all reported every issue in the changed files rather than only the ones they introduced.
Fix
Set
directory: web. The action’snormalize-changed-files.mjsstrips thedirectoryprefix from the PR’s changed-file list, so paths line up automatically. Push-to-main runs now full-scanweb/only, matching thepaths:filter the workflow already uses.Verification
This PR touches no files under
web/, so React Doctor will report "skipped" here rather than exercising the baseline path — the next PR that changesweb/is the real confirmation.🤖 Generated with Claude Code