add host-target architecture and native harnesses - #587
Conversation
commit: |
Performance report — this PR vs base branch🔴 4 regressions · 🟢 3 improvements across 77 scenarios.
A metric counts as changed only past per-metric thresholds sized to measured shared-runner variance on identical code: interaction latency ±10% and 16ms (measured in 8ms steps), frame times ±30%, long-task/LoAF sums ±10% and 500ms, memory ±25% and 512KB / 60 nodes, process CPU ±20% and 10 points, GPU-process CPU ±20% and 3 points, animation ticks ±20% and 3/s, draws/tick ±20% and 0.05, hardware GPU ±20% and 10 points, compositor production ±20% and 3fps / 5 duty-cycle points, composited layers ±20% and 2 layers / 0.5 viewport areas, rendering stages ±20% and 1ms; any ms metric with a ≥100ms baseline needs ±30%. All 73 standard scenarios (full numbers)
All 5 animation scheduling controls (full numbers)
Commit 0e24a15 · full reports in the |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f326b12. Configure here.
823bbb5 to
0e24a15
Compare

What changed
HostTargetcapability model with opaque identity, geometry, descriptions, hierarchy, and optional React metadataElementaccess behind the renderer boundary@react-grab/nativepackage with explicit target registration, native measurement and hit testing, and a native selection overlayArchitecture
Fiber is not the source of truth. Selection starts from renderer-owned host targets and the capabilities they support. React metadata is an optional enrichment layer that can be added later when a renderer exposes it safely.
The current DOM controller remains unchanged in this vertical slice. The new web adapter establishes the migration boundary; the native package proves the same target contract can drive measurement, hierarchy, hit testing, and presentation without a DOM or Fiber dependency.
Playwright cannot drive native iOS views directly. Reuse happens at the behavior-contract layer: Expo and bare React Native expose the same fixture IDs and run the same Detox spec, analogous to the existing shared web framework contract.
Validation
nr buildnr test: 1,068 passed, 24 skipped, 4 passed on retry under the saturated perf matrixnr lintnr typechecknr formatni --frozen-lockfilenr bundle:iosnr bundle:iosactionlint .github/workflows/test-native.ymlGitHub Actions owns the final iOS simulator proof for both runtimes.
Note
Medium Risk
Large new packages, public API surface, and flaky-prone macOS/iOS CI; core web selection behavior is unchanged in this vertical slice, but the architectural direction affects future grab refactors.
Overview
This PR adds a renderer-neutral selection boundary so grab can work off opaque host targets instead of assuming DOM/Fiber.
react-grabnow exports a sharedHostTargetcapability contract (react-grab/targets) plus a web adapter (react-grab/web-target-adapter) that maps elements to targets while keepingElementaccess behind the adapter. The existing DOM grab controller is not rewired here; the adapter defines the migration edge.It also ships an experimental
@react-grab/nativepackage: explicitReactGrabTargetregistration, native measurement/hit-testing via a registry adapter, stacking/parent hierarchy, and a modal Grab overlay (ReactGrabNative) that selects registered views without React metadata.E2E and CI: matching Expo and bare React Native harness apps (shared counter fixture and test IDs) run the same Detox spec from
packages/native-e2e. A newtest-nativeGitHub Actions workflow builds both iOS sim apps (with Metro, CocoaPods, app-binary, and Detox framework caching) and runs the matrix on macOS.Supporting changes include
detoxin pnpmonlyBuiltDependencies, unit tests for the web adapter and native registry, and monorepo Metro/Xcode tweaks for the bare RN app (e.g. fmt/Xcode 26 Podfile patch).Reviewed by Cursor Bugbot for commit 0e24a15. Bugbot is set up for automated code reviews on this repo. Configure here.