Skip to content

fix(cli): check root workflow before recommending CI - #1697

Merged
aidenybai merged 5 commits into
mainfrom
cursor/triage-1696-970e
Aug 30, 2026
Merged

fix(cli): check root workflow before recommending CI#1697
aidenybai merged 5 commits into
mainfrom
cursor/triage-1696-970e

Conversation

@skoshx

@skoshx skoshx commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Check the scan root for the React Doctor workflow in single-project and multi-project scans.
  • Do not show the GitHub Actions recommendation when the root workflow is already installed.
  • Record tui.ci_recommendation_shown only when the report displays the recommendation.

Product brief

  • User job: run a monorepo scan without receiving a setup prompt for CI that is already configured.
  • Reuse: use the existing root workflow detector and the existing report surface.
  • Compatibility: this removes one incorrect recommendation. It does not change scan results, configuration, or report schemas.
  • Success metric: tui.ci_recommendation_shown measures actual recommendation displays.
  • Kill metric: remove the metric if it stays unused or cannot measure this surface after two releases.

Validation

  • Full test suite
  • Lint
  • Typecheck
  • Format check
  • Build
  • JSON report smoke test
  • React Doctor focused regression: configured and unconfigured monorepo roots

Closes #1696

cursoragent and others added 2 commits August 29, 2026 04:24
Multi-project scans were unconditionally recommending GitHub Actions
even when  already existed at the
repository root. The logic checked individual project directories for
the workflow, which would fail in monorepos where the workflow lives
at the root.

Fixed by checking whether CI is configured at the root directory
(where the scan is running) instead of:
1. Unconditionally for multi-project scans (projectScans.length > 1)
2. Per-project directory checks that miss root-level workflows

Closes #1696

Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Aug 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 5f9b549

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 5f9b549.

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

Terminal Control verified the built CLI at 5f9b549 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 changed the title fix: check root directory for CI config in multi-project scans fix(cli): check root workflow before recommending CI Aug 30, 2026
@aidenybai
aidenybai merged commit 0557145 into main Aug 30, 2026
25 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.

Multi-project scans always show “Add to GitHub Actions” even when the root workflow is already configured

3 participants