docs: add CLAUDE.md with build commands and architecture overview - #1222
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWYKHSVSNoLM8Hquum8CuD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds a
CLAUDE.mdat the repo root so AI coding agents (Claude Code and similar) start with accurate context about this repository instead of rediscovering it each session.It captures two things:
Commands — the Yarn 4 script set, how to run a single Jest test, and a note that linting/formatting is Biome (
biome.json, tabs + double quotes) even though the CI step is named "ESLint Checks". It also records that the JS test suite is a placeholder and the real CI validation is native compilation for both architectures.Architecture — the parts that only become clear after reading several files together:
src/index.tsxis a thin wrapper (recursiveprocessColor+actionsHash), and whyactionsHashexists — the new architecture receivesactionsas a C++ struct array that is impractical to deep-compare, so native code compares the hash string instead.src/types.tsis the public API, whilesrc/NativeModuleSpecs/UIMenuNativeComponent.tsis the codegen spec whose inlineSubAction/MenuActionduplication must not be refactored away. Adding a prop means touching both, plusios/MenuViewManager.mm.Shared/NewArch/OldArchlayout, withFabricViewImplementationProtocolas the seam and the iOS 13 action-sheet fallback.MenuViewManagerBase, the per-architectureMenuViewManagerSpec, and the RN-version-patchedMenuViewManagerselected viasourceSetsbecause of thesetBorderColorsignature change — plus new arch being force-enabled at RN >= 0.82. This mirrors the versioning guidance already inCONTRIBUTING.md.example/is generated byreact-native-test-app, which is whyyarn bootstrapis a prerequisite rather than a convenience.Docs only — no source, build, or configuration files are changed.
Test Plan
Nothing to exercise at runtime; the change adds a single Markdown file and touches no code paths.
Verification performed:
package.jsonscripts,.github/workflows/ci.yml, andCONTRIBUTING.mdrather than assumed.src/index.tsx,src/utils.ts,src/types.ts,src/NativeModuleSpecs/UIMenuNativeComponent.ts, the threesrc/UIMenuView*.tsxvariants,ios/MenuViewManager.mm,ios/NewArch/MenuView.mm,ios/NewArch/FabricViewImplementationProtocol.swift,ios/Shared/MenuViewImplementation.swift,android/build.gradle,android/src/main/java/com/reactnativemenu/MenuViewManagerBase.kt, bothMenuViewManagerSpec.ktvariants, and bothreactNativeVersionPatchcopies ofMenuViewManager.kt(thesetBorderColordifference was confirmed by diffing them).lint,tsc, and the Android/iOS builds do not read Markdown.Generated by Claude Code