You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 922d57f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(network): bound, drain, and redact the in-app capture precisely
Address review findings on the React Native network capture:
- Eviction counts ride the drain result so buffered and dropped notes can
never disagree with what a dump returned.
- The in-app body cap takes the dump's payload budget; header values are
capped at 512 characters across 64 entries at every capture seam.
- JSON-quoted secrets with escaped quotes mask whole; the unquoted rule
keeps masking 'api_key=value'; truncation markers count against the
payload budget.
- Drain JSON parsing fails with a typed reason instead of throwing raw.
- whatwg-fetch-on-XHR double capture is suppressed by a synchronous URL
claim held across the fetch() call.
- The 2048 payload budget is one contract constant, shared by the daemon
and the RN transport.
- The test-app network lab is a registered route with README coverage.
Copy file name to clipboardExpand all lines: examples/test-app/README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ It is intentionally small, but each surface is dense with durable accessibility
19
19
-`Automation lab`: long-press, alert-result, app-event, app-state, appearance, orientation, permission-recovery, log canaries, a flattened (`accessible={true}`) text input, and an Apple Pay sheet hosted in `com.apple.PassbookUIService`
20
20
-`WebView accessibility`: a deterministic semantic fixture plus live websites with varied HTML for native accessibility snapshot verification
21
21
-`Perf lab`: seeded JavaScript render problems for `react-devtools profile`, one per scenario (see [Perf lab](#perf-lab))
22
+
-`Network lab`: deterministic `fetch` and `XMLHttpRequest` traffic for `network dump` verification (see [Network lab](#network-lab))
22
23
-`Heavy feed`: a Bluesky-shaped home feed whose accessibility tree is deeper than 65 levels (see [Heavy feed](#heavy-feed))
23
24
24
25
Navigation uses Expo Router native bottom tabs, so the tab bar itself is also part of the test surface.
@@ -53,6 +54,7 @@ These are the main case families this app can support without adding more screen
53
54
- retryable error banners
54
55
- cart counters and quantity changes
55
56
- screenshot and recording proof capture
57
+
- in-app `network dump` on real `fetch` and `XMLHttpRequest` traffic from the network lab
`src/screens/PerfLabScreen.tsx` imports only React and React Native, so it can be copied into a bare React Native app to check the profiler on other React Native versions.
264
266
267
+
## Network lab
268
+
269
+
`agent-device-test-app://network-lab` fires one real request per press: **Run fetch** (`network-fetch`)
270
+
GETs `httpbin.org/json`, **Run post** (`network-post`) POSTs a JSON body to `httpbin.org/post`, and
271
+
**Run XHR** (`network-xhr`) GETs through `XMLHttpRequest`. `network-lab-status` reports
272
+
`fetch:200:<bytes>` once a request settles. Use it to verify an in-app `network dump`:
273
+
274
+
```bash
275
+
agent-device open "agent-device-test-app://network-lab" --platform ios
276
+
agent-device network dump # first dump arms the in-app capture
277
+
agent-device click 'id="network-fetch"'
278
+
agent-device network dump --include all # reports the GET with status, headers, bodies
279
+
```
280
+
265
281
## Heavy feed
266
282
267
283
**Settings → Open heavy feed** (`open-heavy-feed`) opens a JavaScript-only reproduction of a heavy
0 commit comments