Skip to content

frontend: fix hooks & purity react-doctor rules#2293

Closed
malinskibeniamin wants to merge 3 commits intoreact-doctor/1-infrastructurefrom
react-doctor/5-hooks-purity
Closed

frontend: fix hooks & purity react-doctor rules#2293
malinskibeniamin wants to merge 3 commits intoreact-doctor/1-infrastructurefrom
react-doctor/5-hooks-purity

Conversation

@malinskibeniamin
Copy link
Copy Markdown
Contributor

Summary

Enable and fix 7 react-doctor rules for hooks quality and component purity.

  • hooks: Fix hook ordering and conditional hook calls
  • refs: Fix ref access patterns (no writes in render)
  • purity: Remove side effects from render path
  • immutability: Replace direct mutations with immutable updates
  • todo: Add useCallback/useMemo where react-doctor flags performance issues
  • error-boundaries: Enable error boundary rule
  • static-components: Extract static JSX outside render functions

React Doctor Score: 100/100

PR 5 of 6 in the react-doctor incremental rollout. Depends on #2289.

Test Plan

  • bun run type:check passes
  • bun run doctor passes with 100/100
  • ACL management pages work correctly
  • Agent details pages work correctly
  • Transcript viewer works correctly

🤖 Generated with Claude Code

malinskibeniamin and others added 2 commits March 11, 2026 14:12
- Add 'use no memo' directives to 60 components using incompatible
  libraries (TanStack Table, react-hook-form, Zustand stores)
- Add React Compiler source filter in rsbuild.config.ts
- Add useApiStoreHook typed wrapper for Zustand store selectors
- Fix type errors in header, sidebar, and require-auth components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable and fix 7 react-doctor rules for hooks, refs, purity, and
component quality:
- hooks: fix hook ordering and conditional hook calls
- refs: fix ref access patterns (no writes in render)
- purity: remove side effects from render path
- immutability: replace direct mutations with immutable updates
- todo: add useCallback/useMemo where flagged
- error-boundaries: enable error boundary patterns
- static-components: extract static JSX outside render

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@secpanda
Copy link
Copy Markdown

secpanda commented Mar 11, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Base automatically changed from react-doctor/2-compiler-compat to react-doctor/1-infrastructure March 11, 2026 14:34
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