Skip to content

FP104: keep Pages Router app paths outside App Router rules - #1880

Merged
aidenybai merged 2 commits into
mainfrom
codex/fp104-next-pages-app-path
Oct 5, 2026
Merged

aidenybai merged 2 commits into
mainfrom
codex/fp104-next-pages-app-path

Conversation

@aidenybai

@aidenybai aidenybai commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

A Pages Router path such as pages/app/editor.tsx contains an app segment but is not an App Router file. React Doctor treated that segment as an App Router directory and incorrectly rejected a valid next/head import.

When the project root is known, App Router rules now require the file to be under the project’s app/ or src/app/ directory. The existing shared directory helper supplies the fix to the other App Router rules. Unknown-root fallback and other directory checks keep their existing behavior.

New full-corpus audit case FP104-58: mdSilo-web, pages/app/md.tsx:1. Source hashes were verified against the pinned repository. The original detector reproduced the report; the fixed detector emits none.

Validation: 820 focused Next.js, server-fetch, and directory tests passed, including four Pages Router/component negatives that failed before the fix and four actual App Router controls. The full workspace suite, build, lint, typecheck, format check, and JSON report smoke check passed. Includes a synthetic fuzz seed and patch changesets.

Next.js documents next/head for the Pages Router.

Pushed-head corpus comparison

All 49 repositories and 49 roots completed with no skips and no diagnostic changes across the 22 impacted rules. The mdSilo case is outside this 49-repository set; its original and fixed source replays are recorded separately. Evaluation resources were verified deleted.

CI follow-up: the package-gate tests now use their existing probe rule so App Router directory checks are tested separately. Temporary paths are canonical on macOS. All local workspace tests, lint, typecheck, format check, and JSON-report smoke passed after this test-only correction. Detector source is unchanged from the recorded corpus comparison.

@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@1880
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@1880
npm i https://pkg.pr.new/react-doctor@1880

commit: c7b539d

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

Terminal Control verified the built CLI at c7b539d in a real PTY:

  • selected a project interactively and observed Scanning... before the three-second Git delay completed
  • waited for the clean result and exercised the compact report
  • opened copy context and the GitHub Actions confirmation, then cancelled safely

Download the edited MP4 and PNG evidence

@aidenybai
aidenybai marked this pull request as ready for review October 5, 2026 06:33
@aidenybai
aidenybai merged commit 96bf20f into main Oct 5, 2026
25 of 26 checks passed
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.

1 participant