Skip to content

Add interactive rule triage#949

Open
NisargIO wants to merge 2 commits into
mainfrom
feat/react-doctor-triage
Open

Add interactive rule triage#949
NisargIO wants to merge 2 commits into
mainfrom
feat/react-doctor-triage

Conversation

@NisargIO

Copy link
Copy Markdown
Member

Summary

  • Add react-doctor triage, an interactive rule-by-rule workflow for copying focused fix prompts, skipping rules, or disabling noisy rules in config.
  • Persist triage state under .react-doctor/triage, write focused diagnostics, add .react-doctor/ to gitignore during install, and expose triage from the post-scan handoff menu.
  • Improve triage readability with severity ordering, docs links, keybinds, colored headers, gray descriptions, scan spinners, and up to 8 affected files per rule.

Test plan

  • nr format:check
  • cd packages/core && nr typecheck
  • cd packages/react-doctor && nr typecheck
  • cd packages/react-doctor && nr test triage-utils.test.ts
  • nr lint

Note: full nr typecheck is blocked locally by unrelated workspace issues (deslop-js missing minimatch declarations in this install). The touched package checks above pass.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 7862f16.

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 7862f16

@rayhanadev

Copy link
Copy Markdown
Member

interesting

Merge main and add --pnpm flag to pkg-pr-new publish so it uses
pnpm pack (which resolves workspace:* to real versions) instead of
npm pack (which does not understand the workspace: protocol).

Fixes: npx https://pkg.pr.new/react-doctor@NNN failing with
  npm error Unsupported URL Type "workspace:": workspace:*
Co-Authored-By: nisarg@million.dev <awesomenisarg@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7862f16. Configure here.

}
state = updateTriageState(state, { disabled: [ruleKey] });
skippedRuleKeys.add(ruleKey);
rulesDisabled += 1;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage marks disabled without config

Medium Severity

When “Disable in doctor.config” cannot write config, triage still records the rule in persisted disabled state, skips it in future sessions, and increments rulesDisabled as if the rule were off, even though lint still runs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7862f16. Configure here.


this.moveCursor(matchingChoiceIndex);
this.submit();
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Global select patch submits early

Medium Severity

patchSelectKeybindSubmit runs for every prompts() select, so a single letter matching a choice title (e.g. y on “Yes”) moves the cursor and submits immediately, including on CI and action-upgrade prompts that document Esc-only cancel to avoid accidental installs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7862f16. Configure here.

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