feat(macos): port RedBox 2.0 to AppKit#3047
Draft
Saadnajmi wants to merge 2 commits into
Draft
Conversation
Based on react#56640. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Targets
0.85-mergewith two focused commits:[0.85] Backport RedBox 2.0 for iOS react/react-native#56640.
visionOS behavior.
This draft introduces the canonical RedBox2/AppKit implementation before the
0.86 fork merge. It does not rebase any existing stack branch.
Structural sync
The upstream aggregate adds the RedBox feature flags, extracted controllers,
C++ ANSI/error/JscSafeUrl support and tests, HMR support, CocoaPods ownership,
SwiftPM ownership, and feature-flag generated output.
The duplicate produced 20 conflicted paths:
RCTRedBox.mmplus 19 generatedfeature-flag files. The coordinator/controller resolution follows the existing
0.85 stable structural precedent, while generated outputs were regenerated
from
ReactNativeFeatureFlags.config.js.AppKit delta
The AppKit commit changes five files. It:
redBoxV2IOS()selection on macOS while retaining the legacycontroller when the flag is false;
NSTableViewRedBox2 UI, AppKit footer buttons/key equivalents,NSPasteboardcopy support, and sheet lifecycle;blocks and additive clauses.
The old
a87eee7legacy-controller blob and stale ANSI adapter blob areexcluded. The target-version C++ parser, ErrorParser, HMR client, JscSafeUrl,
and later-compatible legacy-controller carve-outs remain authoritative.
Validation
Passed:
[macOS]diff tags and iOS projection parity (5/5);source-attributed diagnostics;
git diff --check, graph/ref freeze, and cleanJujutsu working copy.
Native validation used a fresh no-local Git clone at exact AppKit commit
4ed3fb225714a6809cc69b8afdeffb88c0f8c80f. CocoaPods codegen ran first andgenerated the required FBReactNativeSpec/AppSpecs headers.
The API comparison tool reports a pre-existing unrelated VirtualizedList delta
even for byte-identical base/candidate snapshots; the RedBox change contains no
JavaScript API delta.
Manual merge gate
Before merging this draft, manually enable
redBoxV2IOS, trigger a JavaScripterror, and verify:
NSTableViewrows/source/call stack;NSPasteboard;The feature defaults to false and RNTester has no native override, so this GUI
smoke was not performed by the validation-only executor.
Stack follow-up
After the manual GUI gate and explicit approval:
rebases;
All current
stack/*bookmarks remain unchanged by this PR.