Skip to content

Export compatible Fantom integration tests - #60480

Open
rubennorte wants to merge 4 commits into
react:mainfrom
rubennorte:export-D135632951
Open

rubennorte wants to merge 4 commits into
react:mainfrom
rubennorte:export-D135632951

Conversation

@rubennorte

Copy link
Copy Markdown
Member

Summary:

Context

Several Fantom suites were kept internal while the OSS Fabric renderer lagged behind. The refreshed renderer passes the full LogBox and ReactFabric-Suspense suites with public React, and both can now be exported with the pinned OSS Flow library.

Changes

Remove the .fb suffix from these two existing suites so OSS test runs include their 29 cases. Make the 14 LogBox components that finish without a rendered value explicitly return null, so they satisfy the public React component type instead of inferring void. Preserve all assertions and feature-flag dimensions.

The ViewTransition-Degradation and ViewTransition-Suspense suites remain FB-only: their runtime checks pass, but the pinned public Flow React library has no ViewTransition declaration. No replacement React declarations, casts, or suppressions were added to work around that missing public contract.

Changelog: [Internal]

Differential Revision: D135632951

Summary:
Pull Request resolved: react#60475

## Context
The public `findNodeHandle` export is a direct alias of `ReactFabric.findNodeHandle`. Its inferred `typeof` declaration pulls the whole private Fabric interface into the generated API snapshot, so internal renderer changes appear as changes to the public React Native API.

## Changes
Give the alias a self-contained projection of its existing method signature and regenerate the API snapshot without the private Fabric object and its supporting declarations. The projection preserves the type generator's existing method-level nullable-to-undefined convention; a standalone function annotation would otherwise change the generated public nullability. Keep the runtime alias unchanged and preserve the public call signature.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D135632950
Summary:
Pull Request resolved: react#60479

This just adds the definition of flushSync to the generated types, but the actual implementation will land in a different PR shortly.

Changelog: [internal]

Reviewed By: javache

Differential Revision: D135611937
Summary:
Pull Request resolved: react#60470

## Context
The Fabric source now includes `flushSync`, but the generated OSS renderer bundles must be refreshed before the new export is available to React Native.

## Changes
Sync `ReactFabric-dev.js`, `ReactFabric-prod.js`, and `ReactFabric-profiling.js` from React commit `7d301100cea02e3232f92f180fb6853191d0d16d`, using the stable-channel `RN_OSS_DEV`, `RN_OSS_PROD`, and `RN_OSS_PROFILING` build outputs. Apply the standard generated header and SignedSource signatures. Leave the renderer revision, dependencies, shims, and internal bundles unchanged.

## Major renderer changes
Compared with the previous OSS bundles from React revision `dc9aed364252a34966f4f2c4a98272317fdddb60`, this refresh includes more than the new `flushSync` export:

- Remove the legacy event-dispatching pipeline, including its synthetic-event pooling, event-plugin registry, responder plugin, and touch-history implementation. Native events use the modern dispatching pipeline maintained in React Native instead.
- Remove legacy-root reconciliation and the `disableLegacyMode` flag. Fabric's `render` entry point now requires a concurrent root and rejects the unsupported legacy-root API.
- Add `flushSync` to all three OSS Fabric exports, including transition/priority restoration and flushing pending synchronous work when the callback throws.

The large generated diff includes these substantive deletions as well as the resulting function reordering and temporary-variable renumbering by Closure Compiler; it is not a `flushSync`-only change.

## Released React compatibility
Verified the shared-internals contract against the unmodified public npm packages `react@19.3.0` (the pinned version) and `react@19.3.1` (the current released latest), with released `scheduler@0.28.0`. The OSS bundles obtain shared internals from `React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`; no internal React build, replacement internals object, or special shared-internals global was supplied. Every shared-internals field accessed by each bundle exists in the corresponding released React development or production build, including `H`, `A`, `T`, `S`, and the required development-only fields.

All six released-React/renderer combinations passed runtime checks for hook dispatch, context, IDs, synchronous state commits, `flushSync` return values and throw-path flushing, transition opt-out/restoration, async `startTransition`, async `useActionState`, and unmounting. The development combinations also passed released `React.act` checks for `actQueue`, `asyncTransitions`, and `thrownErrors`; development and profiling combinations exercised profiler callbacks. React and Scheduler were not mocked or patched; only the native Fabric bridge was mocked, so these checks verify the JavaScript shared-internals contract rather than full native integration.

Changelog: [Internal]

Reviewed By: javache, christophpurrer

Differential Revision: D135614630
Summary:
## Context
Several Fantom suites were kept internal while the OSS Fabric renderer lagged behind. The refreshed renderer passes the full LogBox and ReactFabric-Suspense suites with public React, and both can now be exported with the pinned OSS Flow library.

## Changes
Remove the `.fb` suffix from these two existing suites so OSS test runs include their 29 cases. Make the 14 LogBox components that finish without a rendered value explicitly return `null`, so they satisfy the public React component type instead of inferring `void`. Preserve all assertions and feature-flag dimensions.

The ViewTransition-Degradation and ViewTransition-Suspense suites remain FB-only: their runtime checks pass, but the pinned public Flow React library has no `ViewTransition` declaration. No replacement React declarations, casts, or suppressions were added to work around that missing public contract.

Changelog: [Internal]

Differential Revision: D135632951
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 2, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Dec 2, 2026
@meta-codesync

meta-codesync Bot commented Dec 2, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D135632951.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

@javache javache left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants