Skip to content

fix: clear React Doctor Critical findings (46 → 100) - #146

Merged
SimeonGriggs merged 3 commits into
mainfrom
cursor/react-doctor-critical-fixes-a333
Aug 11, 2026
Merged

fix: clear React Doctor Critical findings (46 → 100)#146
SimeonGriggs merged 3 commits into
mainfrom
cursor/react-doctor-critical-fixes-a333

Conversation

@SimeonGriggs

@SimeonGriggs SimeonGriggs commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Installed React Doctor and repaired every confirmed diagnostic that was driving the Critical health score.

Baseline → after

  • Before: 46 / 100 Critical (50 warnings)
  • After: 100 / 100 Great (0 diagnostics)

Install

  • Cursor skill at .agents/skills/react-doctor
  • pnpm script doctor
  • GitHub Actions workflow .github/workflows/react-doctor.yml
  • Non-blocking staged scan in .husky/pre-commit
  • pnpm-workspace.yaml supply-chain hardening (minimumReleaseAge, trustPolicy, blockExoticSubdeps)

Notable fixes

  • Security: window.open(..., "noopener,noreferrer")
  • Bugs: response.ok checks, chroma.valid guards, useMemo deps, parent sync without useEffect
  • A11y: labels on Demo theme toggle + Swatch controls
  • Maintainability/perf: unused export cleanup, Set lookups, single-pass swatch iteration, Palette split into smaller components

Merge note

Rebased/merged latest main after #145. Conflicts were simple (TODO.md keep-both + regenerated pnpm-lock.yaml). package.json auto-merged cleanly (security bumps + react-doctor).

Verification

  • pnpm test — 18/18 ✅
  • pnpm audit — no known vulnerabilities
  • pnpm exec react-doctor --scope full100 / Great
Open in Web Open in Cursor 

Install the React Doctor skill/CI hook and repair all confirmed
diagnostics: pnpm supply-chain hardening, fetch/chroma safety,
a11y labels, parent sync without effects, and related cleanup.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tints-dev 4ba98c4 Commit Preview URL

Branch Preview URL
Aug 11 2026, 04:25 PM

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

React Doctor found 2 new issues in 2 files · 2 warnings · score 60 / 100 (Needs work) · 31 fixed · vs main

2 warnings

app/components/Generator.tsx

  • ⚠️ L94 Manual memoization in compiler-managed code react-compiler-no-manual-memoization

app/components/Palette.tsx

  • ⚠️ L58 Manual memoization in compiler-managed code react-compiler-no-manual-memoization

Reviewed by React Doctor for commit 4ba98c4. See inline comments for fixes.

@SimeonGriggs
SimeonGriggs marked this pull request as ready for review August 11, 2026 16:13
Keep both TODO sections and regenerate pnpm-lock.yaml from the
auto-merged package.json (security bumps + react-doctor).
}, [palette, paletteState, updateGlobal]);
// Commit local palette changes and notify parent from the event path
// (not an effect) when name + value are valid.
const commitPalette = useCallback(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

React Doctor · react-doctor/react-compiler-no-manual-memoization (warning)

React Compiler can cache this function automatically. Verify that removing useCallback preserves behavior before simplifying it.

Fix → Profile compiler-managed code and remove useMemo, useCallback, or memo only when the manual cache no longer carries behavioral or performance intent.

Docs

@SimeonGriggs
SimeonGriggs merged commit e2303fc into main Aug 11, 2026
2 of 3 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.

2 participants