Skip to content

Fix React Doctor findings#44

Draft
FiberJW wants to merge 1 commit into
senpaifrom
codex/react-doctor-cleanup
Draft

Fix React Doctor findings#44
FiberJW wants to merge 1 commit into
senpaifrom
codex/react-doctor-cleanup

Conversation

@FiberJW

@FiberJW FiberJW commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Why

React Doctor reported correctness, performance, and maintainability issues across the app. The highest-impact items were:

  • .expo was not fully ignored, which risks committing machine-specific simulator/device history and dev-server settings. This is repo hygiene rather than a user-facing bug, but it can create noisy or misleading diffs.
  • Several FlatList screens rebuilt renderItem callbacks on every screen render. On real devices that can make rows do extra work, which shows up as avoidable list jank on larger lists or slower phones.
  • Image-heavy screens used Image from react-native, which does not provide Expo Image's caching behavior. Users can see more reloads, flicker, and repeated image fetches while browsing anime, character, profile, and landing-page imagery.

After fixing those, I continued through the remaining React Doctor output so the full scan is clean instead of leaving follow-up warnings in the same branch.

How

  • Ignored the whole .expo/ directory.
  • Installed and configured expo-image, then migrated app and website image usage from react-native image components to Expo Image where React Doctor flagged caching-sensitive usage.
  • Stabilized FlatList callbacks and key extractors in the related anime, character, profile, discover, and anime list flows.
  • Removed list item key props that were duplicating list-owned keys.
  • Cleaned up React correctness issues found by the full scan, including async effects, async forEach, prop-to-state sync effects, constructed context values, manual memoization that was no longer needed, index keys in skeleton lists, dynamic ScrollView padding, and unsupported React Native shadow styling.
  • Split the large details screen into smaller module-level components so it no longer trips the giant component rule.
  • Moved GraphQL operations/fragments from TS modules into .graphql documents, regenerated graphql/generated.ts, and added a small codegen postprocess step that keeps generated-only helpers module-private when the app does not import them.
  • Removed stale generated/source GraphQL files, unused constants/declarations, and no-longer-needed dependencies.

Test Plan

  • bun run gql
  • bun run lint
  • npx tsc --noEmit
  • git diff --check
  • npx react-doctor@latest --verbose
    • Result: No issues found!
    • Score: 100 / 100

Manual simulator QA was not run in this pass; validation was focused on React Doctor plus local static checks.


Summary by cubic

Fixes React Doctor findings across the app to improve performance and maintainability. Lists scroll smoother, images cache by default, and GraphQL code is simpler; the scan now passes with 100/100.

  • Performance

    • Replaced react-native images with expo-image across app and website to enable caching and reduce flicker.
    • Stabilized FlatList renderItem/keyExtractor functions and removed duplicate item keys to cut re-renders.
  • Refactors

    • Moved GraphQL fragments/queries/mutations to .graphql, regenerated graphql/generated.ts, and added tasks/trim-generated-graphql-exports.cjs to keep helper exports local.
    • Split the oversized details screen into smaller components; fixed async effects, prop-to-state sync, index keys, and unsupported shadows.
    • Fully ignored .expo/; removed stale/generated files and unused dependencies; added expo-image plugin and dropped graphql-tag.

Written for commit 34d6ff1. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
goodweebs Ready Ready Preview, Comment Jun 1, 2026 10:39pm

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c345cb94-2c7d-4dec-a13d-6204a9011cff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/react-doctor-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@expo-staging

expo-staging Bot commented Jun 1, 2026

Copy link
Copy Markdown

🎉 Your workflow run has finished!

Check out the details below.


Builds

ID Platform Status Actions
09557e4 iOS ❌ Error (logs)
407ad4b Android ❌ Error (logs)

@expo

expo Bot commented Jun 1, 2026

Copy link
Copy Markdown

🎉 Your workflow run has finished!

Check out the details below.


Builds

ID Platform Status Actions
468ee1f Android ❌ Error (logs)
8f57b2d iOS ✅ Success (logs) Install Download

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