feat: enable release profiling#1
Merged
Merged
Conversation
…tive-release-inspector into feat/release-profiler
There was a problem hiding this comment.
Pull request overview
Introduces the initial implementation of react-native-release-inspector (runtime hook + Metro integration) and a new CLI that launches matching React DevTools, enabling profiling/inspection when running React Native apps in Release mode.
Changes:
- Add a new workspace package
@callstack/react-native-release-inspector-cliand wire it into root lint/typecheck scripts. - Implement
@callstack/react-native-release-inspectorruntime side-effect entrypoint plus a Metro config wrapper to inject it early and rewrite Fabric prod implementation to profiling. - Update the example app to import the inspector, adjust Metro config, and run iOS Release by default; remove unused native TurboModule scaffolding.
Reviewed changes
Copilot reviewed 31 out of 35 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Adds new workspace CLI + Metro config deps; updates lockfile resolutions. |
| packages/react-native-release-inspector/tsconfig.json | Adds DOM lib and excludes lib/ from TS program. |
| packages/react-native-release-inspector/src/react-devtools-core.d.ts | Adds a local type shim for react-devtools-core. |
| packages/react-native-release-inspector/src/NativeReleaseInspector.ts | Removes TurboModule stub. |
| packages/react-native-release-inspector/src/multiply.tsx | Removes old non-native placeholder API. |
| packages/react-native-release-inspector/src/multiply.native.tsx | Removes old native multiply wrapper. |
| packages/react-native-release-inspector/src/metro/index.ts | Adds Metro wrapper to inject inspector and rewrite Fabric prod module. |
| packages/react-native-release-inspector/src/logging.ts | Adds basic prefixed logging helpers. |
| packages/react-native-release-inspector/src/index.tsx | Removes old entrypoint export. |
| packages/react-native-release-inspector/src/index.ts | Adds runtime hook + websocket connect to DevTools on import. |
| packages/react-native-release-inspector/ReleaseInspector.podspec | Removes iOS podspec (native module removed). |
| packages/react-native-release-inspector/package.json | Switches entrypoints, adds ./metro export and an inspector bin; adds CLI dependency + peer dep on react-devtools-core. |
| packages/react-native-release-inspector/ios/ReleaseInspector.mm | Removes iOS native module implementation. |
| packages/react-native-release-inspector/ios/ReleaseInspector.h | Removes iOS native module header. |
| packages/react-native-release-inspector/bin/inspector.js | Adds bin stub that delegates to the CLI package. |
| packages/react-native-release-inspector/android/src/main/java/com/releaseinspector/ReleaseInspectorPackage.kt | Removes Android native package. |
| packages/react-native-release-inspector/android/src/main/java/com/releaseinspector/ReleaseInspectorModule.kt | Removes Android native module. |
| packages/react-native-release-inspector/android/src/main/AndroidManifest.xml | Removes Android manifest (native module removed). |
| packages/react-native-release-inspector/android/build.gradle | Removes Android library build config. |
| packages/cli/tsconfig.json | Adds CLI TS config (NodeNext, strict). |
| packages/cli/tsconfig.build.json | Adds CLI build TS config emitting declarations + JS into lib/. |
| packages/cli/src/spinner.ts | Adds a minimal CLI spinner utility. |
| packages/cli/src/index.ts | Adds Commander-based CLI program + exported runners. |
| packages/cli/src/core.ts | Adds logic to resolve RN’s devtools version and launch react-devtools via npx. |
| packages/cli/src/cli.ts | Adds CLI bin entry. |
| packages/cli/package.json | Adds CLI package metadata, scripts, dependencies, and inspector bin. |
| packages/cli/eslint.config.mjs | Adds ESLint config for CLI workspace. |
| package.json | Updates root lint/typecheck to include the CLI workspace. |
| apps/example/src/App.tsx | Removes old multiply usage and simplifies UI. |
| apps/example/react-native.config.js | Removes local native dependency override (no native module now). |
| apps/example/package.json | Runs iOS via Release mode by default. |
| apps/example/metro.config.js | Switches to monorepo Metro config helper and applies inspector Metro wrapper. |
| apps/example/ios/ReleaseInspectorExample.xcodeproj/xcshareddata/xcschemes/ReleaseInspectorExample.xcscheme | Sets Xcode scheme to launch Release configuration. |
| apps/example/ios/Podfile.lock | Removes ReleaseInspector pod entry (native module removed). |
| apps/example/index.js | Adds side-effect import to initialize the inspector runtime. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description:
This introduces the core logic for
react-native-release-inspectorandcli. The usage is as simple as:Install package:
Add import statement to the top of
index.jsConfigure metro
Start the inspector
That is pretty much it. Build and run the application in release mode. The app should auto connect to the profiler.
Test Plan
Screen.Recording.2026-05-18.at.4.06.53.PM.mov