Sync fork with chromium/7827#261
Draft
huntie wants to merge 5813 commits into
Draft
Conversation
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.
Summary
Syncs the
react-native-devtools-frontendfork with the upstreamchromium/7827branch (most recent stable from https://chromiumdash.appspot.com/branches).There were a total of ~171 conflicts. The ~80 translated
core/i18n/locales/*.jsonfiles were taken from upstream (generated artifacts, no RN strings). The remaining source conflicts were resolved as below.Notable resolutions
Experiments (
ExperimentNamerefactor)ExperimentNamefromcore/root/Runtime.tsinto a newcore/root/ExperimentNames.ts. We re-export it fromRuntime.tsso the fork's pervasiveRoot.Runtime.ExperimentName.*references keep resolving, add the React Native experiments toExperimentNames.ts, and register them for tests in upstream's newtesting/RuntimeHelpers.ts.RNExperimentName/ConditionNamestay inRuntime.ts.Rollup build (⚠️ build-strategy change)
@rollup/wasm-nodewith nativerollup, with platform binaries synced from cipd (infra/3pp/tools/rollup_libs) via a newDEPSentry +sync_rollup_libsgclient hook. Adopted the upstream native-rollup approach (per maintainer decision).gclient syncprovides the binaries.rehydrated_devtools_appentrypoint (entrypoints/rehydrated_devtools_app/in favour of its newtrace_app. The RN debugger opensrehydrated_devtools_app.htmlby name, so the entrypoint was restored (kept alongside upstream'strace_app). The rehydrating connection accepts both viaisTraceApp() || getPathName().includes('rehydrated_devtools_app').Content Security Policy
'unsafe-eval'(required by the React DevTools panels and consumed by thern_fuseboxworker-srcinjection ingenerate_html_entrypoint.js), reverting upstream's stricter multi-line CSP — consistent with prior syncs.Connection layer
Connection→ConnectionTransport/WebSocketConnection→WebSocketTransport/RehydratingConnection→RehydratingConnectionTransportrenames and the newTraceObject-based hydration flow, while preserving the fork's richerconnectionLostDetails({reason, code, errorType}) callback used byRemoteDebuggingTerminatedScreenand the hosted-mode WebSocket URL handling.Removed/renamed upstream APIs (re-applied in RN files)
UI.XLink/<x-link>removed →<devtools-link>(UI kit);UIUtils.createInlineButtonremoved → inlined;i18n.getFormatLocalizedString→ui/i18n;SimpleView/VBoxoptions-object constructors;Trace.Handlers.Types.ParsedTrace→Trace.TraceModel.ParsedTrace(handler data now under.data);*.css.jsimports are brandedCSSInJSstrings (dropped.cssText);getRegisteredViewExtensionsis now aViewManagerinstance method;UserMetrics.panelShownInLocationremoved upstream (no callers).Other necessary changes
RNPerfMetricsclass (TypeScript 6.0TS4094on the re-exported singleton).check-license-headerESLint rule to ESM (the rules dir is now ESM).BUILD.gndeps (ui/components/adorners,ui/components/icon_button,ui/kit) and a droppedRootimport inNetworkLogView.ts; converted lantern metric testit()callbacks tofunction()sothisis the Mocha context.nanoid/serialize-javascript/wsdependency overrides (superseded by upstream's newer tree).no-lit-render-outside-of-view/no-imperative-dom-api/no-adopted-style-sheetslint rules pending a proper view-function migration.UserActionRow.test.ts,application/components/StackTrace.ts,elements/components/LayoutPane.ts, ande2e/issues/client-hint-issues_test.ts(fork changes there were incidental formatting / a disabled test).Post-merge regression fixes (panel audit)
entrypoints/rn_fusebox/rn_fusebox.ts: upstream's newDevToolsContextholds theTargetManagersingleton, andMainImplswaps the global context in during bootstrap.FuseboxAppMetadataObserver/FuseboxFeatureObserverconstructed during entrypoint eval therefore bound to an orphanedTargetManagerand never observed theReactNativeApplicationmodel. Construct them inside aregisterEarlyInitializationRunnableso they attach to the liveTargetManager— and, being registered synchronously, beforeInspectorMaincreates the main target.Cannot find registered action with ID 'timeline.record-reload') —panels/timeline/TimelinePanel.ts: resolveisNode/isReactNativebefore constructing the panel and setrecordReloadAction = nullfor React Native, where the reload action is intentionally not registered.entrypoints/main/MainImpl.ts: upstream gated Protocol Monitor behind a Chromium-flagregisterHostExperiment; restored it as a regular UI-toggleableexperiments.registerso enabling it shows the panel.[FB-only]Network banner in the empty-list state —panels/network/NetworkLogView.ts: keep the single persistent banner added in the constructor; drop the duplicate prepended inshowRecordingHint.panels/timeline/ReactNativeTimelineLandingPage.ts: re-inline the record-button styling lost when upstream removedUIUtils.createInlineButton, so the button renders inline within the sentence.Test plan
npm run prebuild && npm run build(gn gen + ninja + tsc) completes cleanly;rn_fusebox.html,rehydrated_devtools_app.html, andinspector.htmlentrypoints generate, with the expectedrn_fuseboxCSP ('unsafe-eval'+worker-src 'self' blob:).npm run lint -- --fix=falseon the changed files reports no problems.Smoke test on
rn_fusebox.html(to complete before merge) — using the plan from #172:Upstreaming plan
devtools-frontendrepo.