test(test-app): add a perf lab with seeded React render problems

Merged
TH
6h ago
+382-0

Summary

Adds a Perf lab screen to the test-app: seven seeded JavaScript render problems for the built-in React profiler in #3613 / #3618. Each scenario renders one culprit and a Run button that replays the slow interaction as a fixed burst, then sets perf-status to done. Open one with agent-device-test-app://perf-lab?scenario=<id>.

ScenarioSeeded problem
expensive-renderthe component recomputes on every render
memo-defeatedmemoized rows get a new callback and style each render
context-cascadea fast-changing counter shares one context with a stable field
parent-cascadetyping re-renders unmemoized rows
render-storma 16 ms state timer
effect-chainderived state is copied in an effect
eager-list1,200 tiles mount in one commit, on every Run

PerfLabScreen.tsx imports only React and React Native, so it can be copied into bare apps to check other RN versions. The README lists the finding each scenario should produce. Touches 4 files under examples/test-app (380 lines).

Validation

At c51097fd1d, pnpm check:affected --run passes and the test-app tsc --noEmit passes.

Live runs on RN 0.88-rc Android used deep links of the agent-device-test-app://perf-lab?scenario=<id> form, opened both with agent-device open and adb am start. The same file, copied into bare RN 0.74, 0.76, 0.80 and 0.83 apps, produced each scenario's expected first finding on Android and on the RN 0.83 iOS simulator (results in #3613).