Skip to content

feat(reconciler): reveal independent synchronous transitions - #37

Closed
christopher-buss wants to merge 32 commits into
Roblox:mainfrom
christopher-buss:backport-react-19-3-independent-transitions
Closed

christopher-buss wants to merge 32 commits into
Roblox:mainfrom
christopher-buss:backport-react-19-3-independent-transitions

Conversation

@christopher-buss

@christopher-buss christopher-buss commented Oct 11, 2026 •

Copy link
Copy Markdown

Summary

A suspended transition currently blocks ready updates on unrelated state queues. Separate scheduled tasks from component entanglements so independent synchronous transitions can reveal ready content.

A suspends, then B becomes ready
  different queues -> keep old A, reveal new B
  same or overlapping queues -> finish together
  concurrent async Actions -> retain the combined pending scope

This branch assembles the existing transition, deferred-value and Actions foundations, then mirrors React 19.3 scheduling and complete relevant upstream test cases. It retains the seven update lanes, two deferred lanes and supported compatibility APIs.

Evidence

  • Before: the pinned different-queue case with parallel transitions enabled cannot reveal B while A remains suspended.
    After: the complete translated case reveals B first, retains old A, and reveals A after its data resolves. Shared-boundary and same/overlapping-queue cases still finish together under both flag settings.
  • The source and verification ledger and complete test ledger record pinned sources and every architectural adaptation.

Merge Danger

Door: two-way

Reverting the branch restores the prior runtime. No persisted data changes.

Blast Radius: React

Scheduling changes affect concurrent roots in the supported Luau renderers. Native full-fork analysis and DEV/release runs require unavailable internal tools and repositories. Three custom-hook inspection assertions fail identically on the assembled foundation and this branch; the ledger distinguishes them from the passing scheduling contract.

References

Prerequisite foundations: #25, #33 and #34. React source: react/react#27505, react/react#35392 and react/react#37290, pinned to React 19.3.0 in the ledger.

Generated with Codex.

christopher-buss and others added 30 commits August 12, 2026 00:14
Adds startTransition, useTransition, and useDeferredValue with transition lane scheduling, queue entanglement, debug inspection, and upstream-derived coverage.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Expose configurable caught, uncaught, and recoverable handlers on ReactRoblox roots and route Fiber errors through the owning root. Preserve React 17 internal renderer throw behavior while public roots use the React 19 global reporting model.

Port the applicable upstream callback tests and document the pinned source ledger and capability exclusions.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Pin stable source links to the annotated v19.2.0 tag commit and distinguish it from its scheduler-version parent.

Co-authored-by: Codex <noreply@openai.com>
Port async transition entanglement, optimistic state, and serialized action-state queues from React 19.2. Add the full renderer-independent Actions and action-state coverage with an upstream/deviation ledger.

Co-authored-by: Codex <noreply@openai.com>
Load the thenable helper inside the two error paths so Studio debug.loadmodule can compile the near-limit WorkLoop chunk.

Co-authored-by: Codex <noreply@openai.com>
Keep React 17's synchronous internal-renderer console and throw contract while public roots retain React 19 error callbacks. Document the upstream deviations and preserve callback error identity.

Co-authored-by: Codex <noreply@openai.com>
Document the React 17 replay and thenable-tracking divergences, correct pinned source ranges, and make the test ledger match the actual port.

Port the fulfilled-thenable regression and preserve observable scheduler yield order across the translated use cases.

Co-authored-by: Codex <noreply@openai.com>
Record that React 17 performs hydration fallback at the retry callers rather than inside the modern recovery helper.

Co-authored-by: Codex <noreply@openai.com>
Keep concurrent transition UI mounted when an Action wakeable has no Suspense boundary.

Co-authored-by: Codex <noreply@openai.com>
Preserve hook traversal and restore interrupted fibers before concurrent Action retries.

Co-authored-by: Codex <noreply@openai.com>
Skip the HostRoot error-capture pass when a concurrent Action suspends without a boundary.

Co-authored-by: Codex <noreply@openai.com>
Store React 19 recovery bookkeeping on the existing private module table and avoid extra WorkLoop imports so Roblox Studio can load the reconciler.

Co-authored-by: Codex <noreply@openai.com>
Allow non-legacy roots to suspend when their update queue throws an Action wakeable.

Co-authored-by: Codex <noreply@openai.com>
Integrate the canonical React 19 root error callback dependency for Actions.

Co-authored-by: Codex <noreply@openai.com>
Restore rendered output, queued dispatch, hook traversal, and source-ledger coverage.

Co-authored-by: Codex <noreply@openai.com>
Integrate the canonical React 19 use dependency for Actions.

Co-authored-by: Codex <noreply@openai.com>
Use the canonical thenable and global reporter seams, restore test parity, and preserve sibling identity.

Co-authored-by: Codex <noreply@openai.com>
Preserve upstream transition error delivery, repair translated renderer and inspection output, and retain React 17's boundaryless retry and fallback timing semantics.

Co-authored-by: Codex <noreply@openai.com>
Backport React 19.2's initial-value contract, reserved deferred tasks, suspended-preview recovery, and committed Debug Tools inspection.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Preserve queue entanglements in component renders while selecting distinct

synchronous transition tasks. The upstream different-queue case passes

both flag variants after the enabled baseline variant failed.

Co-authored-by: Codex <noreply@openai.com>
Match the canonical suspension callback signature when assembling the

Actions foundation. Pending Actions now settle instead of retrying as

render errors. Preserve upstream default-update noninterruption and the

complete shared-boundary independent-transition contract.

Co-authored-by: Codex <noreply@openai.com>
Preserve both complete resolution sequences and renderer outputs for

original-first and deferred-first sibling tasks with both flag settings.

Name React 17's original-pass sibling traversal and absent subsequent

prewarming beside its exact Scheduler assertions.

Co-authored-by: Codex <noreply@openai.com>
Keep the reserved deferred component lanes separate from the root update task when deciding whether useDeferredValue can show its initial preview. Mirror the React 19.3 helper through the existing lane families and root accessor.

Co-authored-by: Codex <noreply@openai.com>
Mirror pinned hook, class, transitive overlapping-queue, and pending-state cases with both independent-transition flag values. Preserve complete resolution and rendered-output assertions; record the observed urgent pending render caused by React 17 discrete priority families.

Co-authored-by: Codex <noreply@openai.com>
Mirror all remaining pinned renderer cases and remove the empty transition placeholders. Retain partial rendering, parent bailout, interleaved update, and normal-priority retry assertions with both flag settings, in source order.

Co-authored-by: Codex <noreply@openai.com>
Run the three changed existing deferred recovery cases with parallel transitions enabled and disabled. Set flags before loading fresh renderer modules, preserving complete scheduling and rendered-output assertions.

Co-authored-by: Codex <noreply@openai.com>
christopher-buss and others added 2 commits October 11, 2026 22:15
Match the fork foreman StyLua 0.18.1 pin for the merged wakeable cast and hook inspection signature. No behavior changes.

Co-authored-by: Codex <noreply@openai.com>
Record the exact runtime archive, complete renderer scope, inherited inspection reproducer, pinned public formatting and lint gates, and unavailable native dependencies.

Co-authored-by: Codex <noreply@openai.com>
@christopher-buss
christopher-buss deleted the backport-react-19-3-independent-transitions branch October 11, 2026 22:12
@christopher-buss
christopher-buss restored the backport-react-19-3-independent-transitions branch October 11, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant