Maestro icon indicating copy to clipboard operation
Maestro copied to clipboard

chore: phased React Doctor cleanup backlog (22 errors, 807 warnings)

Open jeffscottward opened this issue 9 months ago • 5 comments

Summary

Running react-doctor on main surfaced a broad React health backlog that should be handled in phases.

Scan run details:

  • Command: npx react-doctor . --yes --offline --no-ami
  • Date: 2026-02-19
  • Result: 22 errors, 807 warnings across 174/1199 files
  • Diagnostics share: https://www.react.doctor/share?p=maestro&e=22&w=807&f=174

Highest-priority error categories

  • react-doctor/no-derived-state-effect (state reset/derived-state patterns)
  • jsx-a11y/alt-text (missing alt attributes)
  • react/jsx-no-duplicate-props (duplicate prop in test)
  • react-doctor/no-fetch-in-effect (fetch inside effect in mobile history panel)

Proposed phased cleanup

  1. Phase 1: quick win errors
  • fix missing alt attributes
  • remove duplicate JSX props
  1. Phase 2: derived state correctness
  • replace effect-driven state resets with render-time derivation or key-based remounting where appropriate
  1. Phase 3: data fetching and architecture follow-up
  • migrate effect-based fetches to a dedicated data layer approach
  • prioritize high-noise warnings in frequently touched components

Notes

This issue is intentionally broad for tracking and prioritization. Follow-up PRs should be scoped by rule category and kept reviewable.

jeffscottward avatar Feb 19 '26 23:02 jeffscottward

React Doctor cleanup sweep is pushed on branch chore/react-doctor-cleanup-phase-1 (commit 12a3431e).

Current status on this branch:

  • npm run lint passes
  • npx react-doctor . --yes --offline --no-ami: 0 errors, 84 warnings

Please rebase this branch on top of the latest master (after the most recent pushes), then run React Doctor again to verify/update counts:

npx react-doctor . --yes --offline --no-ami

If new diffs come in from master, we should expect warning counts to shift and then do a follow-up cleanup pass.

jeffscottward avatar Feb 20 '26 00:02 jeffscottward

Thanks for the contribution. We just merged it in.

pedramamini avatar Feb 24 '26 00:02 pedramamini

Thanks for the contribution. We just merged it in.

Is there another React doctor issue for the other phases to keep track?

This was only the easy wins that wouldn't affect actual logic.

Maybe adding it to a git hook will stop having to clear out issues this way in the future.

But yea we need to hit the more touchy stuff.

jeffscottward avatar Feb 24 '26 00:02 jeffscottward

Thanks for the contribution. The utility seems to be a nice addon and can actually help streamline minor React issues here and there. I'm going through a major code refactor which involves breaking down and refactoring a lot of React components so once that part stabilize I'll look into incorporating this in the hooks to keep things clean down the line.

reachrazamair avatar Feb 24 '26 01:02 reachrazamair

Awesome that sounds great. Besides using it as a guide to help an AI fix it all automatically I’m sure that you can use it in a read only mode to help surface anything that you want to touch by hand. Glad that it’s helpful!

Sent from iPhone

On Mon, Feb 23, 2026 at 8:26 PM Raza Mair @.***> wrote:

reachraza left a comment (RunMaestro/Maestro#426) https://github.com/RunMaestro/Maestro/issues/426#issuecomment-3948343173

Thanks for the contribution. The utility seems to be a nice addon and can actually help streamline minor React issues here and there. I'm going through a major code refactor which involves breaking down and refactoring a lot of React components so once that part stabilize I'll look into incorporating this in the hooks to keep things clean down the line.

— Reply to this email directly, view it on GitHub https://github.com/RunMaestro/Maestro/issues/426#issuecomment-3948343173, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJUO7TZUHKLV4IBCRDWD4D4NOSFDAVCNFSM6AAAAACVYHBGKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSNBYGM2DGMJXGM . You are receiving this because you authored the thread.Message ID: @.***>

jeffscottward avatar Feb 24 '26 01:02 jeffscottward