Skip to content

feat(ci): add react doctor workflow - #279

Closed
paulbalaji wants to merge 1 commit into
mainfrom
add-react-doctor-ci
Closed

feat(ci): add react doctor workflow#279
paulbalaji wants to merge 1 commit into
mainfrom
add-react-doctor-ci

Conversation

@paulbalaji

@paulbalaji paulbalaji commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds React Doctor GitHub Action to scan for React security, performance, correctness, and accessibility issues on PRs
  • Produces a 0-100 health score with actionable diagnostics across 60+ rules

Test plan

  • Verify workflow runs on a test PR
  • Review initial score and diagnostics output

🤖 Generated with Claude Code


Note

Low Risk
CI-only change that adds a new diagnostic workflow; no production code or runtime behavior is modified.

Overview
Adds a new GitHub Actions workflow (.github/workflows/react-doctor.yml) that runs on PRs to main (and manually) to execute millionco/react-doctor@0.0.1 with verbose output.

The job checks out the repo, runs React Doctor, and prints the resulting /100 score from the action outputs.

Written by Cursor Bugbot for commit 4ed1664. This will update automatically on new commits. Configure here.

@vercel

vercel Bot commented Feb 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperlane-explorer Ready Ready Preview, Comment Feb 20, 2026 5:32pm

Request Review

Adds React Doctor GitHub Action to scan for React security, performance,
correctness, and accessibility issues on PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
paulbalaji added a commit that referenced this pull request Feb 20, 2026
Fixes from React Doctor analysis (#279):

Errors:
- Add missing alt={title} on <img> in TokenIcon.tsx
- Add missing alt="" on background <img> in og.tsx

Warnings fixed:
- ContentDetailsCard: replace useEffect with render-time state sync for bodyDecodeType
- SearchFilterBar: sync local DatetimeSelector state with prop changes
- CollateralCards: use txHash as stable key instead of array index
- IcaDetailsCard: use destinationAddress in key, change <label> to <span>
- GasDetailsCard: extract default {} to module-level constant, use composite key
- ContentDetailsCard: change unassociated <label> to <span>
- WarpTransferDetailsCard: parallelize 3 independent awaits with Promise.all
- MessageSearch: wrap useState initializers in lazy arrow functions

Skipped (legitimate patterns):
- [messageId].tsx: pages router redirect in useEffect
- useMessageDeliveryStatus: useEffect for toast on error state
- _app.tsx: useIsSsr hook controls SSR/client render split
- MessageSearch: 6 useState calls (independent filter state)
- MessageSearch: 6 setState in hydration useEffect (one-time URL sync)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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 and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

id: react-doctor
uses: millionco/react-doctor@0.0.1
with:
verbose: 'true'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unpinned third-party action execution

Medium Severity

The workflow runs millionco/react-doctor@0.0.1 from a moving ref instead of a commit SHA. If the tag is ever retargeted or the upstream repo is compromised, arbitrary code could execute in CI on PRs with the workflow’s token and repo read access.

Fix in Cursor Fix in Web


- name: Print score
run: |
echo "React Doctor score: ${{ steps.react-doctor.outputs.score }}/100"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Score output may be unset

Low Severity

The log line uses steps.react-doctor.outputs.score, but if the millionco/react-doctor action doesn’t define an output named score (or fails before setting it), the workflow still prints a misleading /100 score with an empty value.

Fix in Cursor Fix in Web

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