Skip to content

Commit b4c2268

Browse files
committed
docs(fork): record RedBox 2.0, Hermes v1 pin, and color follow-ups
1 parent 22d8dea commit b4c2268

1 file changed

Lines changed: 109 additions & 3 deletions

File tree

‎fork.md‎

Lines changed: 109 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ here.
3333
- Upstream remote branch: `upstream/0.87-merge`
3434
- Baseline commit: `d8c588e4a67cbe9d3cdebb27a8909a93448807cd`
3535
- Local branch: `aw/0.87`
36-
- Last functional tip: `f843e0d16764cf58ee2704857f20fac81dda7005`
37-
(`285a66c810` and earlier in the table). Later `docs(fork)` commits sit
38-
on top; `git rev-parse aw/0.87` is the branch HEAD.
36+
- Last functional tip: `22d8dea9e3` (`687571372d` RedBox 2.0, `decd178e6e`
37+
Hermes v1 pin, `22d8dea9e3` color/types, and earlier in the table). Later
38+
`docs(fork)` commits sit on top; `git rev-parse aw/0.87` is the branch HEAD.
3939
- Merge-base check: `git merge-base aw/0.87 upstream/0.87-merge` should print
4040
the baseline commit above.
4141
- Behind `upstream/0.87-merge`: 0 commits. Microsoft 0.87 has nothing further
@@ -50,6 +50,9 @@ here.
5050

5151
| Commit | Date | Message |
5252
| ------------- | ---------- | ------------------------------------------------------------------ |
53+
| `22d8dea9e3` | 2026-08-30 | `fix(js): tighten float color object parsing and VirtualizedList types` |
54+
| `decd178e6e` | 2026-08-30 | `feat(hermes): pin Hermes v1 174344e and fix prebuild include paths` |
55+
| `687571372d` | 2026-08-30 | `feat(macos): port RedBox 2.0 AppKit overlay via RCTUIKit primitives` |
5356
| `285a66c810` | 2026-08-19 | `feat(js): fold float color objects in Animated string interpolation` |
5457
| `c5017f4233` | 2026-08-19 | `feat(js): emit float color objects from oklch()/oklab() and parse color()` |
5558
| `e06759da6b` | 2026-08-19 | `fix(macos): guard Meta tintColor copy and unmount UIView assert` |
@@ -105,6 +108,12 @@ the SHAs here to the new local commits.
105108
`RCTUIView` unmount-assert guards. Provenance is in
106109
`react-native-upstream.md`; these SHAs are local and must survive a
107110
Microsoft rebase.
111+
7. **RedBox 2.0 AppKit overlay** (FX-124 / FX-125): compile and fatal errors
112+
use the structured RedBox 2.0 sheet on macOS (code frame, ANSI highlight,
113+
native Metro `/hot` reload). Adapted from microsoft/react-native-macos#3054
114+
(`c631f745`); do not take #3058. Drop when `0.87-merge` or `main` ships an
115+
equivalent AppKit V2 controller. Fill the local SHA in the table above
116+
when this patch is committed.
108117

109118
Reduce Motion policy lives in the application motion layer, not this fork.
110119
Do not look for it here during rebase.
@@ -130,6 +139,7 @@ fix. Prefer re-applying the intent over preserving the exact hunk.
130139
| `b691d36eb5` | `RCTViewComponentView.mm` | `acceptsFirstResponder` honors interactive `role` / `accessibilityRole`. `needsPanelToBecomeKey` stays false. | iOS Full Keyboard Access / `canBecomeFocused` ports |
131140
| `be9f567c4a` | `RCTUIKitCompat.h` | `UIFontDescriptorAttributeName` aliases to `NSFontDescriptorAttributeName`. | Apple variable-font / `RCTFontUtils` |
132141
| `e06759da6b` | `RCTTextInputUtils.mm`, `RCTViewComponentView.mm` | `tintColor` copy stays iOS-only; unmount assert uses `RCTUIView`, not `UIView`. | TextInput backing-view swap; unmount index assert |
142+
| FX-124 | `RCTUITableView.{h,m}`, `RCTUIButton.{h,m}`, `RCTUILabel.m`, `RCTUIKit.h`, `RCTRedBox.mm`, `RCTRedBox2Controller.mm`, `RCTRedBox2AnsiParser*` | macOS RedBox uses V2 (`TARGET_OS_OSX` or `redBoxV2IOS()`). Keep table/button primitives and the AppKit controller. Restore iOS `autoRetryTick` background guard. Do not restore `!TARGET_OS_OSX` compile-outs on the V2 controller. | microsoft#3054 landing on `main`/`0.87-merge`; RCTUIKit table/button additions |
133143

134144
Interrupted Core production can leave `packages/react-native/.build` mapped to
135145
the workspace cache. Remove that leftover before the next Core build. Do not
@@ -147,6 +157,102 @@ The committed fork versions stay `1000.0.0`. A dirty `0.87.0-rc.1` overlay is
147157
producer residue, not a patch. Restore with
148158
`git checkout --` those two paths before committing.
149159

160+
## FX-69 source Hermes (Xcode 27 linker)
161+
162+
Source-Hermes Apple framework scripts passed `LINKER:-ld_classic` for every
163+
Xcode ≥ 15. Xcode 27 removed the classic linker, so that flag fails the
164+
source-Hermes lane. Gate it to Xcode 15–16:
165+
166+
- `packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh`
167+
- `packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh`
168+
169+
Prebuilt Maven Hermes is unchanged. This is only for the source-Hermes
170+
compatibility lane (FX-69: rebuild V1 at `static_h` `174344e`).
171+
172+
FX-69 V1 pin: `sdks/.hermes-source-sha` is the 40-hex facebook/hermes
173+
revision (currently `174344e637705bf9bfd036689e3b89ab5f67fd10`).
174+
`sdks/.hermesv1version` stays `hermes-v174344e.0.1` for RN version strings.
175+
176+
`rn-macos native ensure` builds the pinned SHA tarball when it is missing.
177+
The VM is always MinSizeRel + `HERMESVM_ALLOW_JIT=1`, dual-arch macosx, with
178+
`HERMES_ENABLE_DEBUGGER` compiled in (RN still gates the inspector on Debug).
179+
`native ensure` / `pack native` refuse Maven and overlay destroot into consumer
180+
`Pods/hermes-engine` after `pod install`. Advance by changing
181+
`sdks/.hermes-source-sha` and running `native ensure`; roll back the same way.
182+
HBC remains 99.
183+
184+
`static_h` 174344e versioned `_HERMES_CTORCONFIG_STRUCT` (`HERMES_GCCONFIG_VERSION` /
185+
`HERMES_RUNTIME_CONFIG_VERSION`, plus `RuntimeConfig.FinalizerThreadRunner`).
186+
`HermesInstance.cpp` / `HermesExecutorFactory.cpp` must compile against
187+
`destroot/include` from that tarball, not the 260318099 Public headers:
188+
`React-RuntimeHermes` HEADER_SEARCH_PATHS and Package.swift `searchPaths` put
189+
that include first, and both TUs `#error` if the version macros are missing.
190+
Local tarball `HERMES_CLI_PATH` is `destroot/bin/hermesc` (not hermes-compiler npm).
191+
192+
## FX-124 RedBox 2.0 AppKit (microsoft#3054)
193+
194+
macOS Debug compile/fatal overlay. Tracking: FX-124 (parent), FX-125 (this
195+
adaptation).
196+
197+
Provenance is microsoft/react-native-macos#3054 head `c631f745` (tree
198+
`be278997`). Taken:
199+
200+
- RCTUIKit primitives: `RCTUITableView`, `RCTUIButton`, `RCTUILabel`
201+
getter/setter completions, umbrella imports
202+
- RedBox 2.0 AppKit controller + ANSI parser un-gating
203+
- `RCTRedBox.mm` reachability so macOS can instantiate V2
204+
205+
Not taken: #3058 (0.85 RN merge; already an ancestor of `aw/0.87`), #3056 V1
206+
table consumer, native tests, RNTester project wiring.
207+
208+
Local deltas on top of #3054:
209+
210+
- macOS always selects RedBox 2.0 (`TARGET_OS_OSX || redBoxV2IOS()`). The
211+
`redBoxV2IOS` default stays `false` so iOS is unchanged.
212+
- `autoRetryTick` keeps the iOS `UIApplicationStateActive` guard that #3054
213+
dropped for AppKit.
214+
- Parser accepts Metro 0.87 oxc `path: message` syntax errors and
215+
`Unable to resolve module … from …:` frames (not only Babel
216+
`TransformError` / `UnableToResolveError in /path: msg (line:col)`).
217+
Resolve errors expose specifier, importer, and tried paths. Code-frame
218+
`> N |` fills row when Metro omits `(line:col)`.
219+
- macOS overlay is an inspector (kind, location, specifier/tried, source),
220+
not a LogBox red banner. Copy emits that structured report. Clicking the
221+
summary or source opens the file via `/open-stack-frame`.
222+
- AppKit sheet tracks `_sheetPresented` plus the host captured at present
223+
time. Dismiss pairs `presentViewControllerAsSheet:` with
224+
`dismissViewController:` on that host (not `RCTKeyWindow()`, which is
225+
the sheet). `endSheet` alone leaves the VC presented and the next
226+
present asserts. Auto-retry timer is added to `NSModalPanelRunLoopMode`.
227+
- `RCTUILabel` wrapping + `RCTUITableView` automatic row measurement.
228+
Custom RedBox cells call `prepareForCustomContent` so the empty default
229+
`textLabel` does not pin the row to ~2px.
230+
- Single presenter on macOS: DEV JS errors (fatals, component errors,
231+
`console.error`, Metro compile) and native `RCTLog` / bundle-load
232+
failures go to `RCTRedBox2Controller`. Warnings (`Warning:` / `type:
233+
warn`) stay out of the overlay. LogBox's `RCTLogBoxView` sheet is not
234+
shown. Overlay chrome follows Expo LogBox (kind chip, source card,
235+
collapsed ignore-listed frames).
236+
237+
RedBox overlay iteration must not go through APP1 `native ensure` (Core
238+
fingerprint invalidates every selected Pod). Use RNTester-macOS against
239+
this worktree (fork source + pinned Hermes destroot tarball, not Maven):
240+
241+
- Parser: compile `ReactCommon/react/debug/redbox/RedBoxErrorParser.cpp`
242+
with a tiny driver (seconds).
243+
- Overlay GUI: `packages/rn-tester/scripts/run-macos-redbox.sh`. `pods`
244+
sets `HERMES_ENGINE_TARBALL_PATH` from `sdks/.hermes-source-sha`,
245+
`RCT_NEW_ARCH_ENABLED=1`, `RN_PLATFORMS=macOS`, overlays destroot
246+
(`HERMES_GCCONFIG_VERSION`), then Debug-builds. APIs → **RedBox 2.0
247+
overlay**. Canned fatal messages do not rebuild native. Break
248+
`js/RedBoxCompileProbe.js` and save for a real Metro overlay.
249+
- APP1 pack + `native ensure --configuration Debug` only when a batch is
250+
ready to land on the packed consumer.
251+
252+
This invalidates React Core (RCTUIKit + CoreModules). After the fork commit:
253+
pack the npm closure and rebuild native dependency artifacts before a session
254+
can show the new sheet.
255+
150256
## The Hermes 0.87 patch set (`3184529fff`)
151257

152258
24 files, consolidating the fork's runtime changes for the Hermes 0.87 /

0 commit comments

Comments
 (0)