Repository navigation
Conversation
RNSentryOnDrawReporter is a legacy view manager, so React Native drops it when RCT_REMOVE_LEGACY_COMPONENT_INTEROP is set, and the TTID and TTFD components silently fall back to a plain View. Add a Fabric component that is only registered under that flag, and use a static view config only when React Native has no interop view config. Other builds stay on the existing path. Refs #7014 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit af5d6cf. Configure here.
📲 Install BuildsAndroid
|
Codegen reads the spec from the published package, and .npmignore lists each spec by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er-without-interop Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…olinking Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing for now. The issue only affects apps that opt in to |
📢 Type of change
📜 Description
Keeps
<Sentry.TimeToInitialDisplay>and<Sentry.TimeToFullDisplay>working on iOS when an app builds React Native withRCT_REMOVE_LEGACY_COMPONENT_INTEROP=1.The Fabric registration is only compiled in under that flag. In JS, the static view config is used whenever React Native doesn't expose its legacy interop view config. That covers apps with the flag on, and may also include custom hosts that start
RCTHostdirectly or override the feature flag, even though they keep interop. Standard apps stay on the existing path.RNSentryOnDrawReporterComponentView(new, New Architecture only): a thin Fabric adapter that forwards props to the existingRNSentryOnDrawReporterView, so the timing logic is unchanged. It registers itself in+load, only under#ifdef RCT_REMOVE_LEGACY_COMPONENT_INTEROP. It is deliberately not inios.componentProvider, because React Native prefers that over interop for every build.timetodisplaynative.tsx: keepsrequireNativeComponentwhile React Native has a native view config. It only uses a static view config whenRN$LegacyInterop_UIManager_getConstantsis absent.RNSentryOnDrawReporterNativeComponent.ts(new): the codegen spec.react-native.config.js: lists the AndroidcomponentDescriptorsexplicitly so autolinking skips this component.excludedPlatformsonly removes the generated Java classes, so without this Android would move off interop too.💡 Motivation and Context
Refs #7014
The reporter is a legacy
RCTViewManager, so on the New Architecture it only exists through React Native's interop layer. With the flag on it isn't registered, and the components silently fall back to a plainView. The flag is opt-in since RN 0.88, and RN says it will become the default in a future release.This doesn't close #7014: with both
RCT_REMOVE_LEGACY_COMPONENT_INTEROPandRCT_REMOVE_LEGACY_MODULE_INTEROP, theRNSentrymodule itself doesn't load. See Next steps.💚 How did you test it?
samples/react-nativeon RN 0.88.1, Release, with RN compiled from source on iOS (RCT_USE_PREBUILT_RNCORE=0), navigating through the Errors, Performance and Tracker screens. iOS ran on an iPhone 16 Pro simulator and Android on a Pixel 8 emulator (API 37).auto.ui.time_to_display, 582 msmanual.ui.time_to_display, 49 msmanual.ui.time_to_display, 48 msmanual.ui.time_to_display, 71 ms"Fix disabled" is this PR with the
+loadregistration compiled out. The Android autolinking output lists only the Mask and Unmask descriptors, so this component stays on interop there.Unit tests cover the view config selection: Old Architecture, interop available, interop removed, and component not registered. Type check, lint, API report and circular dependency checks pass locally.
Not verified yet:
.mmand generated code compile for every New Architecture build, and CI's only older RN jobs (0.71) are Old Architecture.parentSpanIdmapping or recycling.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
RCT_REMOVE_LEGACY_MODULE_INTEROP. A plainmodulesProviderentry crashes at launch, becauseRNSentrydoesn't declareNativeRNSentrySpecconformance and React Native then treats it as a C++ module. Declaring conformance under that flag is the likely fix, separately from this PR.🤖 Generated with Claude Code