peachsim 0.1.571 → 0.1.573
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +106 -106
- package/cli/app-config.ts +1 -1
- package/cli/app-fonts.ts +4 -4
- package/cli/auth.ts +11 -11
- package/cli/bin.ts +4 -4
- package/cli/bridge-flow-runner.ts +13 -13
- package/cli/browser-evals.ts +2 -2
- package/cli/cli-update.ts +6 -6
- package/cli/cloud-client.ts +16 -16
- package/cli/cloud-dispatch.ts +2 -2
- package/cli/cloud-session.ts +12 -12
- package/cli/cloud-test-tunnel.ts +4 -4
- package/cli/command-registry.ts +7 -7
- package/cli/commands/agent-wrapper.ts +7 -7
- package/cli/commands/agent.ts +16 -16
- package/cli/commands/app-fonts.ts +3 -3
- package/cli/commands/assert.ts +10 -10
- package/cli/commands/auth.ts +5 -5
- package/cli/commands/box/checkout-plane.ts +1 -1
- package/cli/commands/box/plane-share.ts +2 -2
- package/cli/commands/box/rnx-command.ts +5 -5
- package/cli/commands/box.ts +38 -38
- package/cli/commands/camera.ts +13 -13
- package/cli/commands/cleanup.ts +13 -13
- package/cli/commands/compat.ts +7 -7
- package/cli/commands/config.ts +5 -5
- package/cli/commands/control.ts +63 -63
- package/cli/commands/cpu-profile.ts +11 -11
- package/cli/commands/daemon-mac-app.ts +10 -10
- package/cli/commands/daemon.ts +29 -27
- package/cli/commands/debug.ts +35 -35
- package/cli/commands/desktop.ts +3 -3
- package/cli/commands/detox.ts +33 -33
- package/cli/commands/device.ts +9 -9
- package/cli/commands/diagnose.ts +17 -17
- package/cli/commands/do-chain.ts +4 -4
- package/cli/commands/electron.ts +9 -9
- package/cli/commands/film.ts +9 -9
- package/cli/commands/flow.ts +49 -49
- package/cli/commands/inspect/core.ts +12 -12
- package/cli/commands/inspect/count.ts +1 -1
- package/cli/commands/inspect/describe.ts +1 -1
- package/cli/commands/inspect/env.ts +2 -2
- package/cli/commands/inspect/find.ts +2 -2
- package/cli/commands/inspect/get-layout.ts +2 -2
- package/cli/commands/inspect/keyboard.ts +1 -1
- package/cli/commands/inspect/list.ts +4 -4
- package/cli/commands/inspect/memory.ts +1 -1
- package/cli/commands/inspect/resolve-target.ts +1 -1
- package/cli/commands/inspect/screens.ts +1 -1
- package/cli/commands/inspect/shared.ts +1 -1
- package/cli/commands/inspect/tree.ts +1 -1
- package/cli/commands/inspect/url.ts +1 -1
- package/cli/commands/inspect/wait-event.ts +5 -5
- package/cli/commands/inspect.ts +82 -82
- package/cli/commands/install-cli.ts +16 -16
- package/cli/commands/install-desktop.ts +26 -26
- package/cli/commands/login.ts +11 -11
- package/cli/commands/maestro-generate.ts +10 -10
- package/cli/commands/maestro.ts +77 -67
- package/cli/commands/mode.ts +4 -4
- package/cli/commands/no-bridge-hint.ts +12 -12
- package/cli/commands/perf.ts +11 -11
- package/cli/commands/permissions.ts +5 -5
- package/cli/commands/platform.ts +21 -21
- package/cli/commands/preview.ts +5 -5
- package/cli/commands/profile.ts +12 -12
- package/cli/commands/react.ts +15 -15
- package/cli/commands/record.ts +31 -31
- package/cli/commands/report-issue.ts +4 -4
- package/cli/commands/reset.ts +2 -2
- package/cli/commands/runtime.ts +23 -23
- package/cli/commands/screenshot-command.ts +2 -2
- package/cli/commands/screenshot-layers.ts +5 -5
- package/cli/commands/screenshot-mode.ts +7 -7
- package/cli/commands/screenshot.ts +24 -24
- package/cli/commands/screenshots-capture.ts +13 -13
- package/cli/commands/screenshots.ts +6 -6
- package/cli/commands/serve.ts +12 -12
- package/cli/commands/setup.ts +25 -25
- package/cli/commands/skills.ts +30 -23
- package/cli/commands/slides.ts +20 -20
- package/cli/commands/state.ts +2 -2
- package/cli/commands/storage.ts +3 -3
- package/cli/commands/telemetry.ts +2 -2
- package/cli/commands/test.ts +15 -15
- package/cli/commands/three-mode.ts +17 -17
- package/cli/commands/timeline.ts +12 -12
- package/cli/commands/upgrade.ts +11 -11
- package/cli/commands/upload.ts +26 -26
- package/cli/commands/version.ts +7 -7
- package/cli/commands/what-happened.ts +20 -20
- package/cli/current-sim.ts +3 -3
- package/cli/desktop-companion.ts +16 -16
- package/cli/drivers/electron.ts +4 -4
- package/cli/drivers/playwright-sim-host.ts +7 -7
- package/cli/drivers/playwright.ts +4 -4
- package/cli/drivers/registry.ts +1 -1
- package/cli/drivers/types.ts +5 -5
- package/cli/flow-export.ts +1 -1
- package/cli/flow-file.ts +5 -5
- package/cli/flow-session.ts +1 -1
- package/cli/help-core.ts +13 -13
- package/cli/hints.ts +14 -14
- package/cli/inspect-notice-state.ts +1 -1
- package/cli/internal-child.ts +2 -2
- package/cli/maestro-js.ts +4 -4
- package/cli/maestro-report.ts +1 -1
- package/cli/main.ts +14 -14
- package/cli/outbound-endpoints.ts +30 -30
- package/cli/parse-args.ts +7 -7
- package/cli/privacy.ts +1 -1
- package/cli/recording-access.ts +10 -10
- package/cli/resolve-assets.ts +2 -2
- package/cli/rnx-in-process.ts +5 -5
- package/cli/run-registry.ts +1 -1
- package/cli/run-rnx-core.ts +3 -3
- package/cli/run-rnx.ts +1 -1
- package/cli/runtime-notes.ts +1 -1
- package/cli/self-invocation.ts +1 -1
- package/cli/send-to-box.ts +1 -1
- package/cli/shell-init.ts +40 -40
- package/cli/ui.ts +1 -1
- package/cli/ws-bridge.ts +22 -22
- package/detox/config-loader.ts +1 -1
- package/detox/index.ts +28 -28
- package/detox/navigation.ts +2 -2
- package/dist-lib/agent-daemon-client.cjs +12 -12
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +2 -2
- package/dist-lib/agent-sessions.cjs +12 -12
- package/dist-lib/attached-projects.cjs +4 -4
- package/dist-lib/auth/shared-session.cjs +4 -4
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +4 -4
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +2 -2
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +42 -42
- package/dist-lib/cloud.mjs +42 -42
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/detox/index.cjs +29 -29
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +12 -12
- package/dist-lib/host/bridge-host.cjs +72 -71
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +6 -6
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +48 -48
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/menu.cjs +5 -5
- package/dist-lib/menu.mjs +5 -5
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +15 -15
- package/dist-lib/profiles.cjs +4 -4
- package/dist-lib/public-brand.cjs +3 -3
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +2 -1
- package/dist-lib/sdk.cjs +9 -9
- package/dist-lib/sdk.mjs +9 -9
- package/dist-lib/skills.cjs +416 -415
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite.cjs +24 -24
- package/package.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -3
- package/skills/contrast/SKILL.md +75 -75
- package/skills/{rnx-debug → peach-debug}/SKILL.md +90 -90
- package/skills/{rnx-perf → peach-perf}/SKILL.md +13 -13
- package/skills/{rnx-setup → peach-setup}/SKILL.md +60 -60
- package/skills/{rnx-test → peach-test}/SKILL.md +44 -44
- package/skills/{rnx-visual → peach-visual}/SKILL.md +26 -26
- package/src/agent-daemon-client.ts +5 -5
- package/src/agent-events.ts +1 -1
- package/src/agent-identity.ts +1 -1
- package/src/agent-sessions.ts +13 -13
- package/src/attached-projects.ts +1 -1
- package/src/auth/shared-session.ts +1 -1
- package/src/bridge-constants.ts +3 -3
- package/src/bridge-contract-input.ts +1 -1
- package/src/bridge-contract.ts +3 -3
- package/src/cli-version.ts +6 -6
- package/src/cloud.ts +40 -40
- package/src/config.ts +1 -1
- package/src/connect.ts +6 -6
- package/src/dev-server-open.ts +8 -8
- package/src/disk-cleanup.ts +3 -3
- package/src/home-paths.ts +26 -26
- package/src/host/agent-host.ts +3 -3
- package/src/host/bridge-host.ts +33 -33
- package/src/host/fetch-proxy-handler.ts +1 -1
- package/src/host/plane-host.ts +2 -2
- package/src/host/replacement-module-handler.ts +2 -2
- package/src/menu.ts +2 -2
- package/src/metro-plugin.ts +7 -7
- package/src/metro-production-bundle.ts +2 -2
- package/src/native-dev-bundle-url.ts +2 -2
- package/src/playwright-host-log.ts +1 -1
- package/src/public-brand.ts +2 -2
- package/src/react-native-host-modules.ts +1 -1
- package/src/rolldown-plugin-swift.ts +3 -3
- package/src/runtime-assets.ts +11 -11
- package/src/runtime-delivery.ts +6 -6
- package/src/screenshots/orchestrate.ts +1 -1
- package/src/screenshots/org-deck.ts +1 -1
- package/src/screenshots/schema.ts +2 -2
- package/src/sim-client.ts +1 -1
- package/src/skills/builtin/compat-check.ts +2 -2
- package/src/vite-plugin-one.ts +8 -8
- package/src/vite-plugin-swift.ts +3 -3
- package/src/vite-plugin.ts +6 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Debug rendering, animation, gesture, performance, and accessibility issues in a React Native app running under Peach. Reach for this whenever an animation looks wrong (janky, stutters, snaps, only updates once, or doesn't move at all), a swipe/transition/gesture misbehaves or feels broken, scrolling drops frames or feels slow, the UI renders the wrong tree/props, or a screen reader can't reach something — and drive the
|
|
2
|
+
name: peach-debug
|
|
3
|
+
description: Debug rendering, animation, gesture, performance, and accessibility issues in a React Native app running under Peach. Reach for this whenever an animation looks wrong (janky, stutters, snaps, only updates once, or doesn't move at all), a swipe/transition/gesture misbehaves or feels broken, scrolling drops frames or feels slow, the UI renders the wrong tree/props, or a screen reader can't reach something — and drive the peach CLI debug tooling first, not screenshots or ad-hoc logging.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Peach debug
|
|
@@ -10,15 +10,15 @@ covers debugging, performance, and accessibility — three branches that
|
|
|
10
10
|
share the same CLI primitives, the same auto-settling contract, and the
|
|
11
11
|
same diff/snapshot workflow. start here for any rendering, interaction,
|
|
12
12
|
event-order, or correctness question. for pixel-level rendering fidelity
|
|
13
|
-
load `/
|
|
13
|
+
load `/peach-visual` instead.
|
|
14
14
|
|
|
15
|
-
> needs a connected, pinned sim. if `
|
|
16
|
-
> `/
|
|
15
|
+
> needs a connected, pinned sim. if `peach describe` errors, load
|
|
16
|
+
> `/peach-setup` first.
|
|
17
17
|
|
|
18
18
|
## principle — drive the CLI, don't probe by hand
|
|
19
19
|
|
|
20
20
|
for any rendering, animation, gesture, or interaction bug, reach for the
|
|
21
|
-
|
|
21
|
+
peach CLI debug tooling **first** — `describe` and `find` to read the
|
|
22
22
|
tree, `debug snapshot` + `debug diff` to capture before/after, `debug
|
|
23
23
|
recent` on a channel and `perf shell` for frame-by-frame stats, and the
|
|
24
24
|
timeline for "what just happened". **do not** debug these by eye with
|
|
@@ -44,13 +44,13 @@ regression test. a pile of ad-hoc logs helps no one and gets deleted.
|
|
|
44
44
|
- "screen reader can't find this / wrong label / tap target too small" → [accessibility](#branch--accessibility)
|
|
45
45
|
- "I want to see what just happened" (ephemeral toast, async navigation,
|
|
46
46
|
fetch + alert sequence) → [the timeline](#the-timeline-what-happened)
|
|
47
|
-
- "I want pixel-level fidelity to iOS" → load `/
|
|
48
|
-
- "I want to author a test" → load `/
|
|
47
|
+
- "I want pixel-level fidelity to iOS" → load `/peach-visual`
|
|
48
|
+
- "I want to author a test" → load `/peach-test`
|
|
49
49
|
|
|
50
50
|
## anti-patterns (apply to every branch)
|
|
51
51
|
|
|
52
52
|
- **`a1`/`a2`/`b0` style ids mean Peach sims, never browser tabs.** when a user
|
|
53
|
-
says "look at a3", that's the `
|
|
53
|
+
says "look at a3", that's the `peach list` sim id. do not open chrome
|
|
54
54
|
MCP unless the user explicitly says "use chrome" — the canvas has no
|
|
55
55
|
DOM to inspect anyway.
|
|
56
56
|
- **the CLI auto-settles. don't add `sleep`.** every read waits up to
|
|
@@ -62,10 +62,10 @@ regression test. a pile of ad-hoc logs helps no one and gets deleted.
|
|
|
62
62
|
changes, and duplicate strings. add `testID` during implementation and
|
|
63
63
|
query against it.
|
|
64
64
|
- **pin a sim once.** if more than one is live, an unpinned command
|
|
65
|
-
refuses to choose. run `
|
|
66
|
-
- **keep one sim and reuse its browser tab.** before `
|
|
67
|
-
`
|
|
68
|
-
`
|
|
65
|
+
refuses to choose. run `peach use <id>` at the start of the workflow.
|
|
66
|
+
- **keep one sim and reuse its browser tab.** before `peach open`, run
|
|
67
|
+
`peach list --all`. pin the target and use `peach do reload`; a plain
|
|
68
|
+
`peach open <target>` also navigates the saved sim. reserve `--new` for a
|
|
69
69
|
genuinely concurrent sim. repeated browser trees consume memory and CPU on a
|
|
70
70
|
shared machine.
|
|
71
71
|
- **`debug eval` is an escape hatch.** if a top-level command feels
|
|
@@ -95,13 +95,13 @@ fetches resolve. the timeline records them so you can ask "what
|
|
|
95
95
|
happened" instead of racing the UI with `find`.
|
|
96
96
|
|
|
97
97
|
```sh
|
|
98
|
-
|
|
98
|
+
peach timeline start # arm recording (cheap kinds default-on)
|
|
99
99
|
# reproduce the flow
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
peach what-happened # events since the last CLI call
|
|
101
|
+
peach what-happened --since 10s # absolute window
|
|
102
|
+
peach what-happened --kinds toast,fetch # filter to a few kinds
|
|
103
|
+
peach what-happened --summary # one-line counts
|
|
104
|
+
peach what-happened --flow # section events by screen/route
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
semantic kinds the timeline understands: `keyboard`, `screen`, `route`,
|
|
@@ -109,12 +109,12 @@ semantic kinds the timeline understands: `keyboard`, `screen`, `route`,
|
|
|
109
109
|
`gesture`, `text-input`, `reanimated`, `animation`, `fetch`, `console`,
|
|
110
110
|
`app-launch`, `shell`. cheap kinds record by default; heavier kinds
|
|
111
111
|
(scroll, gesture, text-input, reanimated, animation) opt in via
|
|
112
|
-
`
|
|
112
|
+
`peach timeline start scroll,gesture,…`.
|
|
113
113
|
|
|
114
114
|
every other CLI command also prints a one-line footer for events since
|
|
115
115
|
the last call — that's the headline indicator. when the footer is empty,
|
|
116
116
|
there's nothing new to look at; when it says `since last: 1 error · 1
|
|
117
|
-
toast · 1 screen push`, run `
|
|
117
|
+
toast · 1 screen push`, run `peach what-happened` to see the detail.
|
|
118
118
|
|
|
119
119
|
> reach for the timeline first when the question involves *something
|
|
120
120
|
> that appeared briefly and disappeared*. it's faster than a screenshot
|
|
@@ -135,11 +135,11 @@ need a manual wait when:
|
|
|
135
135
|
(no pulsing dots, no shimmer, no looping Lottie).
|
|
136
136
|
|
|
137
137
|
```sh
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
peach do settle 5 # wait up to 5s for layout stability
|
|
139
|
+
peach wait idle --max-ms 5000 # same thing under the `wait` verb
|
|
140
|
+
peach wait idle --strict # also require animation flags clear
|
|
141
|
+
peach do tap-id play --no-wait # skip auto-settle on one command
|
|
142
|
+
PEACH_NO_AUTO_WAIT=1 peach ... # disable auto-settle for a lane
|
|
143
143
|
```
|
|
144
144
|
|
|
145
145
|
## branch — debugging
|
|
@@ -147,14 +147,14 @@ RNX_NO_AUTO_WAIT=1 rnx ... # disable auto-settle for a lane
|
|
|
147
147
|
the playbook for "wrong tree / wrong props / wrong handler":
|
|
148
148
|
|
|
149
149
|
```sh
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
peach describe # what's on screen now
|
|
151
|
+
peach get errors 5 # any console smoke?
|
|
152
|
+
peach find --testid <node> # locate the suspect
|
|
153
|
+
peach debug snapshot before
|
|
154
154
|
# reproduce
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
peach debug snapshot after
|
|
156
|
+
peach debug diff before after # structural diff: what changed?
|
|
157
|
+
peach what-happened # timeline events during the repro
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
when the repro needs several closely timed inputs, replace the individual
|
|
@@ -162,15 +162,15 @@ write calls with one inline batch so WebSocket scheduling cannot change the
|
|
|
162
162
|
gesture:
|
|
163
163
|
|
|
164
164
|
```sh
|
|
165
|
-
|
|
165
|
+
peach do touch down 200 600 --then sleep 0.03 --then touch move 200 250 --then touch up 200 250
|
|
166
166
|
```
|
|
167
167
|
|
|
168
168
|
for nested scroll ownership or momentum transfer, compare the shell's resolved
|
|
169
169
|
gesture chain with the published scroll registry:
|
|
170
170
|
|
|
171
171
|
```sh
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
peach debug state scroll-input
|
|
173
|
+
peach debug state scroll-mirror
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
reading `describe` output:
|
|
@@ -187,9 +187,9 @@ for transitions, alerts, native UI, or anything spanning the shell ↔
|
|
|
187
187
|
tenant boundary, lean on the timeline before reaching for traces:
|
|
188
188
|
|
|
189
189
|
```sh
|
|
190
|
-
|
|
190
|
+
peach timeline start
|
|
191
191
|
# reproduce the launch / dismiss / alert
|
|
192
|
-
|
|
192
|
+
peach what-happened --kinds shell,alert,screen,animation
|
|
193
193
|
```
|
|
194
194
|
|
|
195
195
|
you're done when:
|
|
@@ -202,10 +202,10 @@ you're done when:
|
|
|
202
202
|
## branch — performance
|
|
203
203
|
|
|
204
204
|
```sh
|
|
205
|
-
|
|
205
|
+
peach perf shell start # arm capture (also clears prior frames)
|
|
206
206
|
# reproduce the slow interaction
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
peach perf shell stop # full report, including worst frames
|
|
208
|
+
peach perf shell stop --json # machine-readable summary
|
|
209
209
|
```
|
|
210
210
|
|
|
211
211
|
`perf shell` output:
|
|
@@ -227,8 +227,8 @@ budget. **p95 >20 ms is visible jank for a scrolling surface.**
|
|
|
227
227
|
profiling a whole flow:
|
|
228
228
|
|
|
229
229
|
```sh
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
peach maestro test .maestro/scroll-feed.yaml --profile # per-step + frame stats
|
|
231
|
+
peach perf cpu --duration 5 --output /tmp/trace.cpuprofile # sampled CPU
|
|
232
232
|
```
|
|
233
233
|
|
|
234
234
|
common patterns → first probe:
|
|
@@ -245,11 +245,11 @@ debug channels that help, but cost 1–3 ms/frame on their own — enable
|
|
|
245
245
|
only what you're investigating:
|
|
246
246
|
|
|
247
247
|
```sh
|
|
248
|
-
|
|
248
|
+
peach debug enable layout,onlayout,render,animated
|
|
249
249
|
# reproduce
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
peach debug recent layout 20 # last 20 layout events
|
|
251
|
+
peach debug recent render 20 # last 20 draw passes
|
|
252
|
+
peach debug disable layout,onlayout,render,animated
|
|
253
253
|
```
|
|
254
254
|
|
|
255
255
|
you're done when: a p95 number for the interaction + named hot path +
|
|
@@ -269,9 +269,9 @@ watch out for:
|
|
|
269
269
|
## branch — accessibility
|
|
270
270
|
|
|
271
271
|
```sh
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
peach get a11y # roles, labels, hints, and target geometry
|
|
273
|
+
peach get layout --styling # boxes, styles, and native pixel contrast
|
|
274
|
+
peach describe --a11y # inline a11y info on every node
|
|
275
275
|
```
|
|
276
276
|
|
|
277
277
|
native styled layout reads rendered pixels rather than inferring contrast from
|
|
@@ -287,9 +287,9 @@ contrast summary format:
|
|
|
287
287
|
finding offenders fast:
|
|
288
288
|
|
|
289
289
|
```sh
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
peach find --no-label # interactive nodes missing label
|
|
291
|
+
peach find --no-role # interactive nodes missing role
|
|
292
|
+
peach find --pressable --max-dim 44 # undersized tap targets
|
|
293
293
|
```
|
|
294
294
|
|
|
295
295
|
what gets checked:
|
|
@@ -298,7 +298,7 @@ what gets checked:
|
|
|
298
298
|
- **missing roles** — `Pressable`/`Touchable` without `accessibilityRole`
|
|
299
299
|
- **missing hints** — complex interactions without `accessibilityHint`
|
|
300
300
|
- **touch target size** — tappable nodes with hitSlop-expanded rect <44×44
|
|
301
|
-
- **contrast** — run `
|
|
301
|
+
- **contrast** — run `peach get layout --styling`; it samples final text and
|
|
302
302
|
text-suppressed background pixels, including gradients and composited opacity
|
|
303
303
|
- **label / visible-text mismatch** — label that reads differently from
|
|
304
304
|
the text VoiceOver would fall back to (often a translation bug)
|
|
@@ -315,11 +315,11 @@ triage order:
|
|
|
315
315
|
fix → verify loop (the same shape as debugging):
|
|
316
316
|
|
|
317
317
|
```sh
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
peach get a11y > before-a11y.txt
|
|
319
|
+
peach get layout --styling --json > before-layout.json
|
|
320
320
|
# apply the fix
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
peach get a11y > after-a11y.txt
|
|
322
|
+
peach get layout --styling --json > after-layout.json
|
|
323
323
|
diff before-a11y.txt after-a11y.txt
|
|
324
324
|
diff before-layout.json after-layout.json
|
|
325
325
|
```
|
|
@@ -371,7 +371,7 @@ type names sneak in).
|
|
|
371
371
|
## recovery — common failure modes
|
|
372
372
|
|
|
373
373
|
- **`describe` returns nothing** — no sim pinned, or the app isn't
|
|
374
|
-
loaded. load `/
|
|
374
|
+
loaded. load `/peach-setup` and re-confirm.
|
|
375
375
|
- **`find` returns multiple matches** — narrow with `--testid`,
|
|
376
376
|
`--visible`, or both.
|
|
377
377
|
- **`perf shell` reports zero frames** — you didn't run `perf shell start`
|
|
@@ -390,45 +390,45 @@ type names sneak in).
|
|
|
390
390
|
### finding and interacting
|
|
391
391
|
|
|
392
392
|
```sh
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
393
|
+
peach describe # all visible elements with styles
|
|
394
|
+
peach describe button # filter by text/role/label/testID
|
|
395
|
+
peach describe --testid foo # only the subtree under a testID
|
|
396
|
+
peach describe --verbose # include every style property
|
|
397
|
+
|
|
398
|
+
peach find "Sign in" # by text content
|
|
399
|
+
peach find --testid loginButton
|
|
400
|
+
peach find --role button
|
|
401
|
+
peach find --pressable
|
|
402
|
+
peach find --visible # only on-screen nodes
|
|
403
|
+
|
|
404
|
+
peach do tap-id loginButton # tap by testID (preferred)
|
|
405
|
+
peach do tap-text "Submit" # tap by text
|
|
406
|
+
peach do tap 196 400 # tap at coordinates
|
|
407
|
+
peach do type "hello world" # type into focused input
|
|
408
|
+
peach do type-into emailInput "a@b" # focus then type
|
|
409
|
+
peach do key return # special key (return, backspace, …)
|
|
410
|
+
peach do scroll feed-list 0 500 # scroll a testID to absolute x/y offsets
|
|
411
|
+
peach do swipe feed-list left # directional swipe
|
|
412
|
+
peach do long-press messageRow 800 # ms hold
|
|
413
413
|
```
|
|
414
414
|
|
|
415
415
|
### errors and requests
|
|
416
416
|
|
|
417
417
|
```sh
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
418
|
+
peach get errors 5 # last 5 console errors
|
|
419
|
+
peach get warnings 5
|
|
420
|
+
peach get requests 5 # recent failed requests
|
|
421
|
+
peach logs --since 30s # recent console output
|
|
422
|
+
peach network --since 30s # recent network traffic
|
|
423
423
|
```
|
|
424
424
|
|
|
425
425
|
### snapshots and diff
|
|
426
426
|
|
|
427
427
|
```sh
|
|
428
|
-
|
|
428
|
+
peach debug snapshot before
|
|
429
429
|
# interact
|
|
430
|
-
|
|
431
|
-
|
|
430
|
+
peach debug snapshot after
|
|
431
|
+
peach debug diff before after # added / removed / changed nodes
|
|
432
432
|
```
|
|
433
433
|
|
|
434
434
|
### debug channels
|
|
@@ -437,7 +437,7 @@ useful: `animated`, `layout`, `onlayout`, `render`, `sheets`, `portals`,
|
|
|
437
437
|
`gesture`, `scroll`, `text`, `image`.
|
|
438
438
|
|
|
439
439
|
```sh
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
peach debug enable animated,layout,sheets,portals
|
|
441
|
+
peach debug recent layout 20 # last 20 events on the channel
|
|
442
|
+
peach debug disable animated,layout,sheets,portals
|
|
443
443
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Optimize Peach engine and app performance — scroll jank, dropped frames, slow animation, idle CPU, memory growth, and "smooth normally but laggy under load" (video calls, busy machines). Covers measuring on the right thread with the right browser, proving each perf tier actually engages via its counters, a CPU-contention test harness, and the map of existing perf machinery so you improve it instead of reinventing it. For general app debugging load /
|
|
2
|
+
name: peach-perf
|
|
3
|
+
description: Optimize Peach engine and app performance — scroll jank, dropped frames, slow animation, idle CPU, memory growth, and "smooth normally but laggy under load" (video calls, busy machines). Covers measuring on the right thread with the right browser, proving each perf tier actually engages via its counters, a CPU-contention test harness, and the map of existing perf machinery so you improve it instead of reinventing it. For general app debugging load /peach-debug first.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Peach performance
|
|
@@ -11,8 +11,8 @@ this engine followed the same loop — measure on the right thread, read the
|
|
|
11
11
|
counters that prove machinery engaged, fix the one thing the counters
|
|
12
12
|
indict, remeasure — and every wasted week came from skipping a step.
|
|
13
13
|
|
|
14
|
-
> needs a connected, pinned sim (`/
|
|
15
|
-
> triage lives in `/
|
|
14
|
+
> needs a connected, pinned sim (`/peach-setup`). general "what's wrong"
|
|
15
|
+
> triage lives in `/peach-debug`; this skill goes deeper on perf only.
|
|
16
16
|
|
|
17
17
|
## the four laws (each paid for by a real incident)
|
|
18
18
|
|
|
@@ -56,7 +56,7 @@ indict, remeasure — and every wasted week came from skipping a step.
|
|
|
56
56
|
|
|
57
57
|
### presentation proof must stay outside the simulator
|
|
58
58
|
|
|
59
|
-
Performance acceptance must not use `
|
|
59
|
+
Performance acceptance must not use `peach record`, `liveComposite`,
|
|
60
60
|
`captureBitmaps`, Chrome screencast, or another in-page frame-copy path. Those
|
|
61
61
|
paths add work to the simulator or browser and can change the cadence being
|
|
62
62
|
measured. Record the visible window with the operating system's native screen
|
|
@@ -112,10 +112,10 @@ property on the transform owner can move the whole trajectory to the browser's
|
|
|
112
112
|
main thread. Paint stable decoration once or give it a distinct layer.
|
|
113
113
|
|
|
114
114
|
```sh
|
|
115
|
-
|
|
115
|
+
peach perf shell start # arm shell frame capture (clears prior)
|
|
116
116
|
# reproduce — e.g. 8 fling swipes:
|
|
117
|
-
# for i in {1..8}; do
|
|
118
|
-
|
|
117
|
+
# for i in {1..8}; do peach do swipe 196 650 196 250 8 8 --no-wait; sleep 0.9; done
|
|
118
|
+
peach perf shell stop # report (add --json for scripting)
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
the report and how to read it:
|
|
@@ -244,13 +244,13 @@ identify from its own output is not evidence.
|
|
|
244
244
|
deeper tools when the frame report isn't enough:
|
|
245
245
|
|
|
246
246
|
```sh
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
peach maestro test .maestro/scroll.yaml --profile # per-step + frame stats
|
|
248
|
+
peach perf cpu --duration 5 --output /tmp/t.cpuprofile # sampled CPU
|
|
249
|
+
peach open 8089 --new --driver playwright --cdp-port 9222 # cpu-profile a driveable sim
|
|
250
|
+
peach debug enable layout,render && peach debug recent layout 40
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
`
|
|
253
|
+
`peach perf cpu` writes one profile for the page and one for every attached
|
|
254
254
|
worker, plus a manifest that labels shell, compositor, tenant, worklet, and
|
|
255
255
|
unknown workers. exit zero requires page, shell, compositor, and tenant plus
|
|
256
256
|
every other discovered target, with each covering at least 99% of the requested
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: peach-setup
|
|
3
3
|
description: Get Peach connected to your React Native app with no project setup
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,48 +9,48 @@ you want to drive a React Native app with Peach from the CLI. this skill
|
|
|
9
9
|
takes you from a running development server to a connected, pinned sim that
|
|
10
10
|
every other Peach skill assumes exists. Peach requires no project setup or per-app
|
|
11
11
|
install. if
|
|
12
|
-
`
|
|
13
|
-
returns a tree, you're past this skill — load `/
|
|
14
|
-
debugging or `/
|
|
12
|
+
`peach describe` already
|
|
13
|
+
returns a tree, you're past this skill — load `/peach-debug` for
|
|
14
|
+
debugging or `/peach-test` for writing tests.
|
|
15
15
|
|
|
16
16
|
## anti-patterns (read first)
|
|
17
17
|
|
|
18
|
-
- **never `
|
|
18
|
+
- **never `peach claim --force` a sim held by another CLI.** the lease
|
|
19
19
|
exists for a reason. forcing strands the other agent and corrupts the
|
|
20
|
-
bridge state. use `
|
|
21
|
-
- **don't switch sims mid-investigation.** pin once with `
|
|
20
|
+
bridge state. use `peach open --new` to start a fresh sim instead.
|
|
21
|
+
- **don't switch sims mid-investigation.** pin once with `peach use
|
|
22
22
|
<id>` and keep it pinned. an unpinned command refuses to choose when more
|
|
23
23
|
than one driveable sim is live.
|
|
24
|
-
- **an empty `
|
|
24
|
+
- **an empty `peach list` is not "broken Peach".** it usually means the
|
|
25
25
|
daemon is down, the dev server port is wrong, or the runtime is missing.
|
|
26
26
|
walk the recovery checklist before reinstalling.
|
|
27
|
-
- **keep one sim for your whole session.** the first `
|
|
27
|
+
- **keep one sim for your whole session.** the first `peach open <port>`
|
|
28
28
|
launches Chrome for Testing with an isolated profile. later opens reuse the
|
|
29
|
-
saved sim and navigate it in place. use `
|
|
29
|
+
saved sim and navigate it in place. use `peach do reload` when the target
|
|
30
30
|
has not changed:
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
peach open 8086 # first call creates your isolated sim
|
|
34
|
+
peach open 8090 # same sim, different app
|
|
35
|
+
peach do reload # same sim, same app
|
|
36
|
+
peach close <id> # dispose it when you are done
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
`--new`, `--profile`, and `--ephemeral` create another isolated browser
|
|
40
40
|
tree. use them only when separate storage or a genuinely concurrent sim is
|
|
41
41
|
required. repeated new trees consume enough memory and CPU to starve other
|
|
42
42
|
work on a shared machine.
|
|
43
|
-
- **pin the sim before driving it.** `
|
|
43
|
+
- **pin the sim before driving it.** `peach open` records the new sim for the
|
|
44
44
|
current CLI identity. read its id and pin it explicitly before a longer flow:
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
peach open 8086
|
|
48
|
+
peach list
|
|
49
|
+
peach use <id>
|
|
50
|
+
peach describe --sim <id>
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
- **never retry-loop `
|
|
53
|
+
- **never retry-loop `peach open` against a wedged or slow stack.** a
|
|
54
54
|
connect timeout means diagnose the stack. do not retry. if the first launch
|
|
55
55
|
never connects, each retry can create another browser tree before there is a
|
|
56
56
|
saved sim to reuse. verify the development server and Peach runtime, then
|
|
@@ -59,57 +59,57 @@ debugging or `/rnx-test` for writing tests.
|
|
|
59
59
|
## first move
|
|
60
60
|
|
|
61
61
|
```sh
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
peach daemon status # the persistent service makes agent commands much faster
|
|
63
|
+
peach daemon install # enable it when missing on a supported personal machine
|
|
64
|
+
peach compat --json # scan the app's native package compatibility
|
|
65
|
+
peach open 8081 # load a metro/expo dev server
|
|
66
|
+
peach list # confirm exactly one sim is reachable
|
|
67
|
+
peach use <id> # pin it for the rest of the workflow
|
|
68
|
+
peach describe # smoke test — should print a render tree
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
the background service keeps the local bridge and runtime ready between
|
|
72
72
|
commands. without it, Peach still works by starting an on-demand bridge, but
|
|
73
73
|
inspect, interaction, and test commands pay repeated startup cost. if the user
|
|
74
|
-
declined it during onboarding, `
|
|
74
|
+
declined it during onboarding, `peach daemon install` is the direct way to enable
|
|
75
75
|
it. CI does not need or install the service.
|
|
76
76
|
|
|
77
|
-
bare `
|
|
78
|
-
scripts should use `
|
|
77
|
+
bare `peach` opens ConnectRN for a human to choose among local apps. agents and
|
|
78
|
+
scripts should use `peach open <port-or-url>` so the target is explicit.
|
|
79
79
|
|
|
80
|
-
if you do not know the port, run `
|
|
80
|
+
if you do not know the port, run `peach open` with no target and pick from
|
|
81
81
|
the detected dev servers. for hosted or unusual targets, pass the URL
|
|
82
82
|
explicitly:
|
|
83
83
|
|
|
84
84
|
```sh
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
peach open 8081 # load a metro dev server
|
|
86
|
+
peach open https://my-app.local # load a hosted bundle
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
## you're done when
|
|
90
90
|
|
|
91
|
-
- `
|
|
92
|
-
- `
|
|
93
|
-
- the same sim id appears in `
|
|
91
|
+
- `peach list` shows your sim and no orphans
|
|
92
|
+
- `peach describe` returns a render tree, not an error
|
|
93
|
+
- the same sim id appears in `peach describe`, `peach find`, and
|
|
94
94
|
every subsequent command
|
|
95
|
-
- `
|
|
95
|
+
- `peach get errors 5` and `peach get requests 5` are quiet (or the
|
|
96
96
|
warnings are ones you understand)
|
|
97
97
|
- the compatibility scan's partial, unsupported, unknown, and version-mismatched
|
|
98
98
|
packages have been summarized without treating its aggregate score as a pass/fail gate
|
|
99
99
|
|
|
100
100
|
## compatibility feedback requires approval
|
|
101
101
|
|
|
102
|
-
run `
|
|
102
|
+
run `peach compat --json` from the app project root during setup. if the scan
|
|
103
103
|
identifies a plausible missing Peach seam, or the running app gives concrete
|
|
104
104
|
evidence that behavior is missing or broken specifically in Peach, summarize
|
|
105
105
|
the package, expected behavior, actual behavior, and runtime evidence for the
|
|
106
|
-
user. then offer to send that finding with `
|
|
106
|
+
user. then offer to send that finding with `peach report-issue`.
|
|
107
107
|
|
|
108
108
|
**never submit a report automatically or behind the user's back.** wait for an
|
|
109
109
|
explicit yes. only then run this from the app project root:
|
|
110
110
|
|
|
111
111
|
```sh
|
|
112
|
-
|
|
112
|
+
peach report-issue --yes "<package; expected behavior; actual behavior; runtime evidence>"
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
the command automatically attaches the local compatibility scan plus bounded
|
|
@@ -121,33 +121,33 @@ it records the user's approval after the offer.
|
|
|
121
121
|
|
|
122
122
|
## recovery — common failure modes
|
|
123
123
|
|
|
124
|
-
**`
|
|
124
|
+
**`peach list` is empty.** walk this checklist in order:
|
|
125
125
|
|
|
126
126
|
```sh
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
peach daemon status # is the bridge daemon up?
|
|
128
|
+
peach runtime list # is at least one engine runtime installed?
|
|
129
|
+
peach open <port> # does loading explicitly work?
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
if the daemon is not installed: run `
|
|
133
|
-
daemon is down, run `
|
|
134
|
-
a foreground bridge. if no runtime is installed, `
|
|
132
|
+
if the daemon is not installed: run `peach daemon install`. if the registered
|
|
133
|
+
daemon is down, run `peach daemon restart`, or `peach serve` in another shell for
|
|
134
|
+
a foreground bridge. if no runtime is installed, `peach open` installs it
|
|
135
135
|
before launching. if open errors with "port unreachable": confirm your dev
|
|
136
136
|
server is actually serving — the bundler has to be up before Peach can
|
|
137
137
|
attach.
|
|
138
138
|
|
|
139
|
-
**two sims appear unexpectedly.** an earlier `
|
|
139
|
+
**two sims appear unexpectedly.** an earlier `peach claim` didn't
|
|
140
140
|
release on exit. close the orphan explicitly:
|
|
141
141
|
|
|
142
142
|
```sh
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
peach list # note the stale id
|
|
144
|
+
peach close <id> # release it cleanly
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
**`
|
|
148
|
-
Run `
|
|
147
|
+
**`peach open` errors with "no runtime".** the engine binary isn't installed.
|
|
148
|
+
Run `peach runtime install`, then retry `peach open <port>`.
|
|
149
149
|
|
|
150
|
-
**`
|
|
150
|
+
**`peach open` times out ("timed out waiting for opened sim to connect").**
|
|
151
151
|
do not retry in a loop. verify the development server first: `__soot/` must
|
|
152
152
|
respond and the engine watchers must be running. inspect the driver diagnostic
|
|
153
153
|
path printed by the failed command. restart the broken development stack at its
|
|
@@ -155,18 +155,18 @@ supervisor, then retry once. Peach owns the isolated browser profile and its
|
|
|
155
155
|
process tree; do not open the shell URL through an operating-system browser.
|
|
156
156
|
|
|
157
157
|
**bridge disconnects mid-sim.** the WebSocket dropped (laptop slept,
|
|
158
|
-
network blip). re-pin: `
|
|
158
|
+
network blip). re-pin: `peach use <id>`. the daemon retries reconnection
|
|
159
159
|
automatically; you usually just need to re-issue the command.
|
|
160
160
|
|
|
161
161
|
**"sim held by another CLI".** another agent or your own previous CLI
|
|
162
|
-
process has the lease. find it (`
|
|
163
|
-
<id>`), or start a clean sim (`
|
|
164
|
-
`
|
|
162
|
+
process has the lease. find it (`peach list`), close it (`peach close
|
|
163
|
+
<id>`), or start a clean sim (`peach open --new`) — do **not**
|
|
164
|
+
`peach claim --force`.
|
|
165
165
|
|
|
166
166
|
## related
|
|
167
167
|
|
|
168
|
-
- `/
|
|
168
|
+
- `/peach-debug` — once setup is good, this is where you debug
|
|
169
169
|
rendering, performance, and accessibility issues.
|
|
170
|
-
- `/
|
|
170
|
+
- `/peach-test` — write or run automated flows against the connected
|
|
171
171
|
sim.
|
|
172
|
-
- `/
|
|
172
|
+
- `/peach-visual` — pixel-level rendering comparisons.
|