From e85e9ba0913d61493483eef773a51816b5082a5f Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Fri, 30 Oct 2026 18:00:00 +0000 Subject: [PATCH] Remove timeline frames experiment (enable by default) --- .../core/rn_experiments/experimentsImpl.ts | 6 ------ front_end/core/root/Runtime.ts | 2 -- .../rn_fusebox/FuseboxFeatureObserver.ts | 21 +------------------ front_end/global_typings/react_native.d.ts | 2 -- .../TimelineFlameChartDataProvider.ts | 11 +--------- front_end/panels/timeline/TimelinePanel.ts | 4 ++-- front_end/testing/EnvironmentHelpers.ts | 1 - 7 files changed, 4 insertions(+), 43 deletions(-) diff --git a/front_end/core/rn_experiments/experimentsImpl.ts b/front_end/core/rn_experiments/experimentsImpl.ts index adbc8d0c3274..16a607c91f07 100644 --- a/front_end/core/rn_experiments/experimentsImpl.ts +++ b/front_end/core/rn_experiments/experimentsImpl.ts @@ -185,12 +185,6 @@ Instance.register({ enabledByDefault: ({ isReactNativeEntryPoint }) => isReactNativeEntryPoint, }); -Instance.register({ - name: RNExperimentName.ENABLE_TIMELINE_FRAMES, - title: 'Enable performance frames track', - unstable: true, -}); - Instance.register({ name: RNExperimentName.ENABLE_NETWORK_THROTTLING, title: 'Enable network throttling (Network panel)', diff --git a/front_end/core/root/Runtime.ts b/front_end/core/root/Runtime.ts index bd26df42f5df..059bd8dfb49b 100644 --- a/front_end/core/root/Runtime.ts +++ b/front_end/core/root/Runtime.ts @@ -305,7 +305,6 @@ export const experiments = new ExperimentsSupport(); export enum RNExperimentName { REACT_NATIVE_SPECIFIC_UI = 'react-native-specific-ui', JS_HEAP_PROFILER_ENABLE = 'js-heap-profiler-enable', - ENABLE_TIMELINE_FRAMES = 'enable-timeline-frames', ENABLE_NETWORK_THROTTLING = 'enable-network-throttling', } @@ -341,7 +340,6 @@ export const enum ExperimentName { JS_HEAP_PROFILER_ENABLE = RNExperimentName.JS_HEAP_PROFILER_ENABLE, REACT_NATIVE_SPECIFIC_UI = RNExperimentName.REACT_NATIVE_SPECIFIC_UI, NOT_REACT_NATIVE_SPECIFIC_UI = '!' + RNExperimentName.REACT_NATIVE_SPECIFIC_UI, - ENABLE_TIMELINE_FRAMES = RNExperimentName.ENABLE_TIMELINE_FRAMES, ENABLE_NETWORK_THROTTLING = RNExperimentName.ENABLE_NETWORK_THROTTLING, } diff --git a/front_end/entrypoints/rn_fusebox/FuseboxFeatureObserver.ts b/front_end/entrypoints/rn_fusebox/FuseboxFeatureObserver.ts index 96ce7a996448..a39b6e59190b 100644 --- a/front_end/entrypoints/rn_fusebox/FuseboxFeatureObserver.ts +++ b/front_end/entrypoints/rn_fusebox/FuseboxFeatureObserver.ts @@ -35,12 +35,6 @@ const UIStrings = { */ reloadRequiredForNetworkThrottlingMessage: 'Network throttling is now available in the Network panel. Please reload to enable.', - /** - * @description Message for the "settings changed" banner shown when a reload - * is required for frame timings in the Performance panel. - */ - reloadRequiredForTimelineFramesMessage: - 'Frame timings and screenshots are now available in the Performance panel. Please reload to enable.', /** * @description Detail message shown when a feature is disabled due to multiple React Native hosts. */ @@ -87,8 +81,7 @@ export class FuseboxFeatureObserver implements #handleMetadataUpdated( event: Common.EventTarget.EventTargetEvent): void { // eslint-disable-next-line @typescript-eslint/naming-convention - const {unstable_isProfilingBuild, unstable_networkInspectionEnabled, unstable_frameRecordingEnabled, unstable_networkThrottlingEnabled} = - event.data; + const {unstable_isProfilingBuild, unstable_networkInspectionEnabled, unstable_networkThrottlingEnabled} = event.data; if (unstable_isProfilingBuild) { FuseboxWindowTitleManager.instance().setSuffix('[PROFILING]'); @@ -101,10 +94,6 @@ export class FuseboxFeatureObserver implements this.#hideNetworkPanel(); } - if (unstable_frameRecordingEnabled) { - void this.#ensureTimelineFramesEnabled(); - } - if (unstable_networkThrottlingEnabled) { void this.#ensureNetworkThrottlingEnabled(); } @@ -153,14 +142,6 @@ export class FuseboxFeatureObserver implements }); } - async #ensureTimelineFramesEnabled(): Promise { - if (!Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES)) { - Root.Runtime.experiments.setEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES, true); - UI.InspectorView?.InspectorView?.instance()?.displayReloadRequiredWarning( - i18nString(UIStrings.reloadRequiredForTimelineFramesMessage)); - } - } - async #ensureNetworkThrottlingEnabled(): Promise { if (!Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_NETWORK_THROTTLING)) { Root.Runtime.experiments.setEnabled(Root.Runtime.RNExperimentName.ENABLE_NETWORK_THROTTLING, true); diff --git a/front_end/global_typings/react_native.d.ts b/front_end/global_typings/react_native.d.ts index 275a1092d5ca..26b61ab8b9dc 100644 --- a/front_end/global_typings/react_native.d.ts +++ b/front_end/global_typings/react_native.d.ts @@ -16,8 +16,6 @@ declare global { // eslint-disable-next-line no-var var enableDisplayingFullDisconnectedReason: boolean|undefined; // eslint-disable-next-line no-var - var enableTimelineFrames: boolean|undefined; - // eslint-disable-next-line no-var var reactNativeOpenInEditorButtonImage: string|undefined; // eslint-disable-next-line no-var,@typescript-eslint/naming-convention var FB_ONLY__reactNativeFeedbackLink: string|undefined; diff --git a/front_end/panels/timeline/TimelineFlameChartDataProvider.ts b/front_end/panels/timeline/TimelineFlameChartDataProvider.ts index 0e11347f5913..42bbad7f1e50 100644 --- a/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +++ b/front_end/panels/timeline/TimelineFlameChartDataProvider.ts @@ -106,8 +106,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectWrapper implements PerfUI.FlameChart.FlameChartDataProvider { - private isReactNative = false; - private droppedFramePatternCanvas: HTMLCanvasElement; private partialFramePatternCanvas: HTMLCanvasElement; private timelineDataInternal: PerfUI.FlameChart.FlameChartTimelineData|null = null; @@ -145,11 +143,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW constructor() { super(); - // [RN] Used to scope down available features for React Native targets - this.isReactNative = Root.Runtime.experiments.isEnabled( - Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI, - ); - this.reset(); this.droppedFramePatternCanvas = document.createElement('canvas'); @@ -615,9 +608,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW // In CPU Profiles the trace data will not have frames nor // screenshots, so we can keep this call as it will be a no-op in // these cases. - if (Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES) || !this.isReactNative) { - this.#appendFramesAndScreenshotsTrack(); - } + this.#appendFramesAndScreenshotsTrack(); const weight = (track: {type?: string, forMainFrame?: boolean, appenderName?: TrackAppenderName}): number => { switch (track.appenderName) { diff --git a/front_end/panels/timeline/TimelinePanel.ts b/front_end/panels/timeline/TimelinePanel.ts index 45e3c43a8ee2..7fc6480e9240 100644 --- a/front_end/panels/timeline/TimelinePanel.ts +++ b/front_end/panels/timeline/TimelinePanel.ts @@ -539,7 +539,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod this.captureSelectorStatsSetting.setTitle(i18nString(UIStrings.enableSelectorStats)); this.showScreenshotsSetting = - Common.Settings.Settings.instance().createSetting('timeline-show-screenshots', isNode || isReactNative ? false : true); + Common.Settings.Settings.instance().createSetting('timeline-show-screenshots', isNode ? false : true); this.showScreenshotsSetting.setTitle(i18nString(UIStrings.screenshots)); this.showScreenshotsSetting.addChangeListener(this.updateMiniMap, this); @@ -1189,7 +1189,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod // View this.panelToolbar.appendSeparator(); - if (!isNode && (Root.Runtime.experiments.isEnabled(Root.Runtime.RNExperimentName.ENABLE_TIMELINE_FRAMES) || !isReactNative)) { + if (!isNode) { this.showScreenshotsToolbarCheckbox = this.createSettingCheckbox(this.showScreenshotsSetting, i18nString(UIStrings.captureScreenshots)); this.panelToolbar.appendToolbarItem(this.showScreenshotsToolbarCheckbox); diff --git a/front_end/testing/EnvironmentHelpers.ts b/front_end/testing/EnvironmentHelpers.ts index c0ffc4020b19..0e893a4aa4b6 100644 --- a/front_end/testing/EnvironmentHelpers.ts +++ b/front_end/testing/EnvironmentHelpers.ts @@ -130,7 +130,6 @@ const REGISTERED_EXPERIMENTS = [ Root.Runtime.ExperimentName.TIMELINE_ALTERNATIVE_NAVIGATION, Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI, Root.Runtime.ExperimentName.NOT_REACT_NATIVE_SPECIFIC_UI, - Root.Runtime.ExperimentName.ENABLE_TIMELINE_FRAMES, Root.Runtime.ExperimentName.ENABLE_NETWORK_THROTTLING, ];