[0.83] Backport initial implementation of RedBox 2.0 for iOS#56572
Closed
motiz88 wants to merge 11 commits intofacebook:0.83-stablefrom
Closed
[0.83] Backport initial implementation of RedBox 2.0 for iOS#56572motiz88 wants to merge 11 commits intofacebook:0.83-stablefrom
motiz88 wants to merge 11 commits intofacebook:0.83-stablefrom
Conversation
Cherry-pick of d6ed561 with feature flag files regenerated for the 0.83-stable branch.
Summary: Pull Request resolved: facebook#56509 Moves the `RCTRedBoxController` class, previously inlined in `RCTRedBox.mm`, into its own implementation and header files (`RCTRedBoxController.mm`, `RCTRedBoxController+Internal.h`). An upcoming diff will fork these files for the experimental RedBox 2.0. Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D101484586 fbshipit-source-id: 0b0c80caa790ee5286c48adfce5c22d22bef47b6
Summary: Pull Request resolved: facebook#56550 Replace the legacy red-on-black RedBox design with a LogBox-inspired design for RedBox 2.0: charcoal background, salmon header bar, structured call stack, 3-button footer, full-screen view with no animated transition. Gated behind `redBoxV2IOS`. This diff is just for the low-hanging fruit - setting up the split implementation and borrowing the broad visual style of LogBox. Further up this stack we will port more functionality and improve on this baseline. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D98115368 fbshipit-source-id: 7c14137c94c812f42b6af0c376762e068cfcdaaa
Summary: Pull Request resolved: facebook#56553 Add a platform-independent C++ library (`ReactCommon/react/debug/redbox/`) for error message parsing and ANSI escape sequence rendering, shared by both iOS and Android. `RedBoxErrorParser` — C++ port of `parseLogBoxException`. Classifies Metro errors, Babel transform errors, bundle loading errors, and code frame errors into a structured `ParsedError`. `AnsiParser` — converts ANSI SGR sequences into styled spans with foreground/background colors using the Afterglow theme. Uses `facebook::react::unstable_redbox` namespace to exclude from C++ API snapshots. Changelog: [Internal] Reviewed By: robhogan Differential Revision: D101357709 fbshipit-source-id: d2ecf9d12897e00f9590e1bec57ecf5d5895fcd5
Summary: Pull Request resolved: facebook#56551 TSIA Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D98113191 fbshipit-source-id: 00b640de69a5a3e48dae624dd24c25a1da3c7548
Summary: Pull Request resolved: facebook#56552 Adds `isRetryable` and `isCompileError` to C++ `ParsedError` and its iOS wrapper, for use in RedBox 2.0. **Currently all errors are assumed to be retryable under RedBox 2.0.** Changelog: [Internal] Reviewed By: robhogan Differential Revision: D101357708 fbshipit-source-id: 6a83b5944e5451a7818c66a321bf8d45a1951970
Summary: Pull Request resolved: facebook#56549 Adds an automatic reload countdown to the RedBox 2.0 overlay for errors marked as retryable by the error parser. (Currently all of them, see D101357708.) Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D98107027 fbshipit-source-id: 9f39491e4ecf5086a76b7f6446c34231a5d4eb0d
…ge (facebook#56554) Summary: Pull Request resolved: facebook#56554 While RedBox is displayed, open a native WebSocket to Metro's `/hot` endpoint. On file change, automatically reload — bridging the gap for bundle loading errors where the JS HMR client is unavailable. Changelog: [Internal] Reviewed By: robhogan Differential Revision: D98350597 fbshipit-source-id: 9d11d99226483d937be45d75be008b0f9f25572b
Summary: Pull Request resolved: facebook#56565 Stack frame file paths in RedBox 2.0 were displaying as truncated jsc-safe-url fragments (e.g. `dev=true` instead of `index.bundle`). This happened because `lastPathComponent` treats the `//&` path-encoded query as additional path segments. Here, we port the `jsc-safe-url` npm package to shared C++ (matching the JS implementation line-for-line, including the RFC 3986 appendix B regex) and use it to normalize stack frame URLs before extracting filenames. Query strings are also stripped after normalization. Changelog: [Internal] Reviewed By: robhogan Differential Revision: D101796395 fbshipit-source-id: 38d5a8ccb111e78f847be4a551e359dd075e6a0f
Summary: Pull Request resolved: facebook#56568 `separatorStyle` and `UITableViewCellSeparatorStyleNone` are unavailable on tvOS, causing the airwave-tvos-appletvos build to fail. Wrap them with `#if !TARGET_OS_TV`, matching the existing pattern in `RCTRedBoxController.mm`. Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D102001404 fbshipit-source-id: 383e1cc64070000c258b71a60aa4b4ef6453206e
…ebook#56569) Summary: Pull Request resolved: facebook#56569 `RCTRedBox2Controller+Internal.h` used a C++ `using` type alias, which fails when compiled as plain Objective-C. This header is currently included in the `React-Core` umbrella header (via the `CoreModulesHeaders` subspec), so it gets compiled in a pure-ObjC context and breaks the RNTester iOS CI build. Here, we replace the `using` with an equivalent `typedef`. NOTE: The underlying issue is that this `+Internal.h` header should not be in the umbrella header at all. I will follow up to make the RedBox 2.0 internal headers private at the CocoaPods level. Changelog: [Internal] ___ overriding_review_checks_triggers_an_audit_and_retroactive_review Oncall Short Name: react_native landed-with-radar-review Reviewed By: sbuggay Differential Revision: D102005814 fbshipit-source-id: d0a5727ee47ea5148a371074bc74e42e503c20f8
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
Contributor
Author
False positive it seems |
Contributor
Author
|
Superseded by #56574. |
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:
TODO
Changelog:
[Internal] - Initial implementation of RedBox 2.0 for iOS behind a feature flag.
Test Plan:
TODO