Skip to content

Commit cb4fc1a

Browse files
committed
fix: cache metadata UIAppearance setters
1 parent 45c6df6 commit cb4fc1a

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

HANDOFF.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,31 @@ During this thread `agent-device` was version `0.18.0`; the npm package is
111111

112112
## Current Verified State
113113

114+
Update from 2026-06-29 09:00 EDT:
115+
116+
- Simulator-only rule remains active. Do not use physical iPhone/iPad devices.
117+
- GitHub Actions run `28372181901` on `45c6df65` kept builds and macOS tests
118+
green, but still failed iOS only in `ApiTests.js Appearance`:
119+
`UILabel.appearance().textColor` read back `undefined`.
120+
- Narrow follow-up runtime fix in progress:
121+
- The remaining gap was the metadata-backed native property setter path on
122+
UIAppearance proxy objects. It returned before the class-scoped
123+
UIAppearance value cache used by the runtime-discovered setter path.
124+
- Metadata-backed property setters now write the same UIAppearance
125+
class-scoped expando after a successful native setter call, so future
126+
reads can return the set value even when the native proxy getter is not
127+
readable.
128+
- Local verification after this patch:
129+
- Runtime RN JS tests passed:
130+
`for f in packages/react-native/test/*.test.js; do node "$f" || exit 1; done`.
131+
- `npm run check:ffi-boundaries` passed.
132+
- `git diff --check` passed.
133+
- `npm run build:macos-cli` passed.
134+
- Not done:
135+
- Commit/push this metadata-backed UIAppearance setter-cache fix and watch
136+
fresh PR CI.
137+
- If CI turns green, resume the dedicated simulator-only RNS parity sweep.
138+
114139
Update from 2026-06-29 08:28 EDT:
115140

116141
- Simulator-only rule remains active. Do not use physical iPhone/iPad devices.

NativeScript/ffi/shared/bridge/HostObjects.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,6 +1778,12 @@ throw JSError(
17781778
Value args[] = {Value(runtime, value)};
17791779
callObjCSelector(runtime, bridge_, object_, false,
17801780
setterMember.selectorName, &setterMember, args, 1);
1781+
if (Class appearanceClass =
1782+
taggedAppearanceProxyClass(runtime, bridge_, object_)) {
1783+
bridge_->setObjectExpando(
1784+
runtime, appearanceClass,
1785+
appearanceProxyExpandoPropertyKey(property), value);
1786+
}
17811787
NATIVE_API_SET_RETURN(true);
17821788
}
17831789
}

PROGRESS.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,33 @@ TypeScript/UI worklets.
1717

1818
## Latest Update - 2026-06-29
1919

20+
### 2026-06-29 09:00 EDT - cached metadata-backed UIAppearance setters
21+
22+
- Goal:
23+
- Keep PR #46 on the generic runtime primitive path and unblock the final
24+
simulator-only RN Screens parity sweep; no physical devices were used.
25+
- CI finding:
26+
- GitHub Actions run `28372181901` on `45c6df65` kept builds and macOS tests
27+
green, but still failed iOS `ApiTests.js Appearance` only:
28+
`UILabel.appearance().textColor` read back as `undefined`.
29+
- That means static `appearance*` result tagging was not enough by itself:
30+
the proxy was tagged, but the setter path still skipped the cache.
31+
- Changes:
32+
- Metadata-backed native property setters on UIAppearance proxy objects now
33+
populate the same target-class-scoped appearance expando cache as
34+
runtime-discovered setters.
35+
- This keeps the fix generic to UIKit UIAppearance proxies and avoids
36+
broad get-time Objective-C probing.
37+
- Verification:
38+
- Runtime RN JS tests passed:
39+
`for f in packages/react-native/test/*.test.js; do node "$f" || exit 1; done`.
40+
- `npm run check:ffi-boundaries` passed.
41+
- `git diff --check` passed.
42+
- `npm run build:macos-cli` passed.
43+
- Still next:
44+
- Commit/push the setter-cache fix, watch fresh PR CI, then return to the
45+
dedicated simulator-only RNS parity sweep if CI is green.
46+
2047
### 2026-06-29 08:28 EDT - patched static UIAppearance selector result tagging
2148

2249
- Goal:

0 commit comments

Comments
 (0)