Skip to content

docs: add CLAUDE.md with build commands and architecture overview - #1222

Merged
Naturalclar merged 1 commit into
masterfrom
claude/init-yfdkki
Aug 16, 2026
Merged

docs: add CLAUDE.md with build commands and architecture overview#1222
Naturalclar merged 1 commit into
masterfrom
claude/init-yfdkki

Conversation

@Naturalclar

Copy link
Copy Markdown
Member

Overview

Adds a CLAUDE.md at 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.tsx is a thin wrapper (recursive processColor + actionsHash), and why actionsHash exists — the new architecture receives actions as a C++ struct array that is impractical to deep-compare, so native code compares the hash string instead.
  • The two type definitions are deliberate: src/types.ts is the public API, while src/NativeModuleSpecs/UIMenuNativeComponent.ts is the codegen spec whose inline SubAction/MenuAction duplication must not be refactored away. Adding a prop means touching both, plus ios/MenuViewManager.mm.
  • The iOS Shared / NewArch / OldArch layout, with FabricViewImplementationProtocol as the seam and the iOS 13 action-sheet fallback.
  • The Android three-way manager split — MenuViewManagerBase, the per-architecture MenuViewManagerSpec, and the RN-version-patched MenuViewManager selected via sourceSets because of the setBorderColor signature change — plus new arch being force-enabled at RN >= 0.82. This mirrors the versioning guidance already in CONTRIBUTING.md.
  • That example/ is generated by react-native-test-app, which is why yarn bootstrap is 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:

  • Every command documented was read directly from package.json scripts, .github/workflows/ci.yml, and CONTRIBUTING.md rather than assumed.
  • Architecture claims were checked against the files they describe: src/index.tsx, src/utils.ts, src/types.ts, src/NativeModuleSpecs/UIMenuNativeComponent.ts, the three src/UIMenuView*.tsx variants, 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, both MenuViewManagerSpec.kt variants, and both reactNativeVersionPatch copies of MenuViewManager.kt (the setBorderColor difference was confirmed by diffing them).
  • CI on this PR should stay green — lint, tsc, and the Android/iOS builds do not read Markdown.

Generated by Claude Code

@Naturalclar
Naturalclar merged commit b3842a8 into master Aug 16, 2026
9 of 10 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