peachsim 0.1.1667 → 0.1.1674
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/README.md +1 -1
- package/cli/bridge-flow-runner.ts +4 -1
- package/cli/commands/coverage-swift.ts +291 -0
- package/cli/commands/coverage.ts +168 -24
- package/cli/commands/diagnose.ts +1 -19
- package/cli/commands/inspect/settling.ts +37 -4
- package/cli/commands/react.ts +3 -18
- package/cli/commands/screenshot.ts +1 -1
- package/cli/commands/screenshots-capture.ts +1 -1
- package/cli/drivers/playwright-provisioning.ts +1 -4
- package/cli/drivers/playwright.ts +15 -1
- package/cli/scene-video.ts +1 -1
- package/cli/ui.ts +20 -0
- package/cli/ws-bridge.ts +7 -36
- package/detox/frame-identity.cjs +21 -0
- package/detox/frame-identity.d.cts +6 -0
- package/detox/index.ts +39 -33
- package/detox/jest-environment.cjs +4 -1
- package/detox/jest-setup-after-env.cjs +0 -4
- package/detox/navigation-lifecycle.ts +2 -2
- package/detox/proof-observer.ts +126 -0
- package/dist-lib/agent-daemon-client.cjs +29 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +10 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- 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 +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +557 -158
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +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 +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +5098 -7344
- package/dist-lib/detox/jest-environment.cjs +4 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +602 -152
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +688 -194
- package/dist-lib/host/fetch-proxy-handler.cjs +6 -3
- 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 +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +247 -11
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- 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 +10 -1
- package/dist-lib/metro-production-bundle.mjs +12 -1
- package/dist-lib/metro.cjs +155 -5
- package/dist-lib/native-app-identity-project.cjs +43 -5
- package/dist-lib/native-app-identity-project.mjs +43 -5
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +21 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +73 -27
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +563 -183
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +964 -0
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +38 -5
- package/dist-lib/sdk.mjs +38 -5
- package/dist-lib/skills.cjs +1031 -530
- package/dist-lib/swift-compile.cjs +298 -86
- package/dist-lib/swift-compile.mjs +298 -86
- package/dist-lib/swift-package.cjs +53 -4
- package/dist-lib/swift-package.mjs +52 -4
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +25 -44
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +603 -114
- package/dist-lib/vite.cjs +65 -3
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/glass-material.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/inspect-outline.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime-kind.d.ts +24 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +4 -2
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +18 -0
- package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +10 -1
- package/dist-types/packages/peach-globals/src/index.d.ts +2 -2
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +54 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +23 -4
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStore.h +439 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreCopySpecific.h +216 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCDynamicStoreKey.h +267 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetwork.h +204 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConfiguration.h +1393 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkConnection.h +568 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCNetworkReachability.h +369 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferences.h +473 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesPath.h +179 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferencesSetSpecific.h +95 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCSchemaDefinitions.h +2395 -0
- package/sdk/ios/System/Library/Frameworks/SystemConfiguration.framework/Headers/SystemConfiguration.h +184 -0
- package/sdk/ios/usr/include/_ctype.h +388 -0
- package/sdk/ios/usr/include/_inttypes.h +296 -0
- package/sdk/ios/usr/include/_locale.h +83 -0
- package/sdk/ios/usr/include/_locale_posix2008.h +65 -0
- package/sdk/ios/usr/include/_time.h +207 -0
- package/sdk/ios/usr/include/ctype.h +70 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +69 -6
- package/sdk/ios/usr/include/inttypes.h +35 -0
- package/sdk/ios/usr/include/libkern/OSByteOrder.h +315 -0
- package/sdk/ios/usr/include/libkern/machine/OSByteOrder.h +147 -0
- package/sdk/ios/usr/include/locale.h +59 -0
- package/sdk/ios/usr/include/runetype.h +118 -0
- package/sdk/ios/usr/include/setjmp.h +99 -0
- package/sdk/ios/usr/include/sys/_types/_clock_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_ct_rune_t.h +33 -0
- package/sdk/ios/usr/include/sys/_types/_rune_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_time_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_wint_t.h +33 -0
- package/sdk/ios/usr/include/sys/cdefs.h +2 -0
- package/sdk/ios/usr/include/time.h +67 -2
- package/src/bridge-contract.ts +42 -0
- package/src/chromium-admission.ts +196 -0
- package/src/host/bridge-host.ts +6 -43
- package/src/host/rolldown-bundle-forward.ts +4 -1
- package/src/launch-deadline.ts +74 -0
- package/src/nitro-adapter.lock.json +3 -3
- package/src/profiles.ts +21 -0
- package/src/react-native-coverage/capability-reference-resolution.ts +402 -0
- package/src/react-native-coverage/capability-source-references.ts +1296 -0
- package/src/react-native-coverage/native-typescript-parser.ts +74 -0
- package/src/react-native-coverage/project-aliases.ts +207 -0
- package/src/react-native-coverage/verified-reach.ts +47 -0
- package/src/reap-browser.ts +1019 -0
- package/src/skills/builtin/a11y-review.ts +1 -1
- package/src/skills/builtin/perf-profile.ts +1 -1
- package/src/skills/builtin/screenshot-all.ts +1 -1
- package/src/skills/builtin/visual-diff.ts +1 -1
- package/src/swift-compile.ts +109 -57
- package/src/swift-coverage/indexdump.ts +80 -0
- package/src/swift-coverage/indexing.ts +147 -0
- package/src/swift-coverage/package.ts +230 -0
- package/src/swift-coverage/provenance.ts +47 -0
- package/src/swift-coverage/reader.ts +81 -0
- package/src/swift-coverage/source.ts +252 -0
- package/src/swift-coverage/types.ts +58 -0
- package/src/swift-coverage/xcode-assets.ts +175 -0
- package/src/swift-coverage/xcode-bridging.ts +160 -0
- package/src/swift-coverage/xcode-packages.ts +251 -0
- package/src/swift-coverage/xcode-strings.ts +78 -0
- package/src/swift-coverage/xcode.ts +656 -0
- package/src/swift-distribution.lock.json +8 -8
- package/src/swift-host.ts +21 -1
- package/src/swift-objc-compile.ts +7 -3
- package/src/swift-objc-import.ts +191 -27
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-standin.ts +9 -2
- package/src/swift-package-manifest.ts +134 -13
- package/src/swift-package.ts +69 -4
- package/src/swift-standins.ts +4 -1
- package/src/swift-submit.ts +2 -1
- package/src/swift-toolchain.ts +36 -61
- package/src/worker-system-chunks.ts +3 -10
- package/src/xcode-project.ts +5 -5
- package/detox/attempt-events.cjs +0 -914
- package/detox/attempt-events.d.cts +0 -113
- package/detox/motion-change.cjs +0 -524
- package/detox/motion-change.d.cts +0 -140
- package/detox/motion-leg-starts.cjs +0 -20
- package/detox/motion-leg-starts.d.cts +0 -8
- package/detox/proof-frame.cjs +0 -190
- package/detox/record-block-execution.cjs +0 -78
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -2001,6 +2001,9 @@ async function waitForSootsimIdle({
|
|
|
2001
2001
|
hierarchy = null
|
|
2002
2002
|
}
|
|
2003
2003
|
const nodes = []
|
|
2004
|
+
// identity beside each geometry entry, from the rows already read,
|
|
2005
|
+
// so a changed layout can name the nodes that moved.
|
|
2006
|
+
const nodeRows = []
|
|
2004
2007
|
const LOADING_TEXT_REGEX = /^(creating webview|loading html|fetching bundle|waiting for first render|starting preview|loading simulator|fetching app code|waiting for native preview|starting design|loading canvas|fetching screens|painting the canvas|waiting for webview|waiting for preview|waiting for canvas|preview stalled)/i
|
|
2005
2008
|
const noteLoading = (state, text) => {
|
|
2006
2009
|
if (state?.busy === true) {
|
|
@@ -2021,7 +2024,9 @@ async function waitForSootsimIdle({
|
|
|
2021
2024
|
// subtree count by their own layout; the rest of the screen
|
|
2022
2025
|
// still catches the fling.
|
|
2023
2026
|
const abs = n.backgroundPlayback ? layout : n.absolute || n.absolutePosition || layout
|
|
2024
|
-
|
|
2027
|
+
const geometry = Math.round(abs.x) + ',' + Math.round(abs.y) + ',' + Math.round(layout.width)
|
|
2028
|
+
nodes.push(geometry)
|
|
2029
|
+
nodeRows.push([String(n.nodeId ?? nodes.length - 1), (n.type || '?') + (n.testId ? '#' + n.testId : ''), geometry])
|
|
2025
2030
|
}
|
|
2026
2031
|
noteLoading(
|
|
2027
2032
|
n.accessibilityState,
|
|
@@ -2033,7 +2038,9 @@ async function waitForSootsimIdle({
|
|
|
2033
2038
|
if (root) {
|
|
2034
2039
|
const walk = (n) => {
|
|
2035
2040
|
if (n.layout && n.layout.width > 0) {
|
|
2036
|
-
|
|
2041
|
+
const geometry = Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width)
|
|
2042
|
+
nodes.push(geometry)
|
|
2043
|
+
nodeRows.push([String(n.id ?? nodes.length - 1), (n.type || '?') + (n.props?.testID ? '#' + n.props.testID : ''), geometry])
|
|
2037
2044
|
}
|
|
2038
2045
|
noteLoading(
|
|
2039
2046
|
n.props?.accessibilityState,
|
|
@@ -2082,7 +2089,7 @@ async function waitForSootsimIdle({
|
|
|
2082
2089
|
pixelFrameToken = token
|
|
2083
2090
|
}
|
|
2084
2091
|
}
|
|
2085
|
-
return { layout: nodes.join(';'), nativeHierarchy, screenPixels, animating, shellAnimating, shellBlockers, layoutDirty, pendingFetches, workerBusy, webViewStarting, webViewBlocker, renderStatsAvailable, requestTotal, requestInFlight, appCommits, nodeCount }
|
|
2092
|
+
return { layout: nodes.join(';'), nodeRows, nativeHierarchy, screenPixels, animating, shellAnimating, shellBlockers, layoutDirty, pendingFetches, workerBusy, webViewStarting, webViewBlocker, renderStatsAvailable, requestTotal, requestInFlight, appCommits, nodeCount }
|
|
2086
2093
|
}
|
|
2087
2094
|
|
|
2088
2095
|
// how long generic background network is allowed to keep us waiting AFTER
|
|
@@ -2098,6 +2105,27 @@ async function waitForSootsimIdle({
|
|
|
2098
2105
|
const networkQuietGraceMs = 1200
|
|
2099
2106
|
let lastNativeHierarchy = null
|
|
2100
2107
|
let lastLayout = ''
|
|
2108
|
+
let lastNodeRows = []
|
|
2109
|
+
// what moved between the last two differing polls, bounded; names the
|
|
2110
|
+
// nodes behind "layout changed" without keeping any poll history.
|
|
2111
|
+
let lastLayoutChange = null
|
|
2112
|
+
const describeLayoutChange = (before, after) => {
|
|
2113
|
+
const previous = new Map(before.map(([key, label, geometry]) => [key, [label, geometry]]))
|
|
2114
|
+
const moved = []
|
|
2115
|
+
const added = []
|
|
2116
|
+
const short = (label, key) => String(label).slice(0, 48) + ' [' + String(key).slice(0, 24) + ']'
|
|
2117
|
+
for (const [key, label, geometry] of after) {
|
|
2118
|
+
const was = previous.get(key)
|
|
2119
|
+
previous.delete(key)
|
|
2120
|
+
if (!was) added.push(short(label, key) + ' ' + geometry)
|
|
2121
|
+
else if (was[1] !== geometry) moved.push(short(label, key) + ' ' + was[1] + '->' + geometry)
|
|
2122
|
+
}
|
|
2123
|
+
const removed = [...previous].map(([key, [label, geometry]]) => short(label, key) + ' ' + geometry)
|
|
2124
|
+
return {
|
|
2125
|
+
moved: moved.length, added: added.length, removed: removed.length,
|
|
2126
|
+
movedSample: moved.slice(0, 3), addedSample: added.slice(0, 3), removedSample: removed.slice(0, 3),
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2101
2129
|
let lastScreenPixels = null
|
|
2102
2130
|
let screenChangedPolls = 0
|
|
2103
2131
|
let lastRequestTotal = -1
|
|
@@ -2176,7 +2204,10 @@ async function waitForSootsimIdle({
|
|
|
2176
2204
|
if (snapshot.layoutDirty) dirtyPolls++
|
|
2177
2205
|
if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
|
|
2178
2206
|
if (snapshot.webViewStarting) webViewStartingPolls++
|
|
2179
|
-
if (polls > 1 && snapshot.layout !== lastLayout)
|
|
2207
|
+
if (polls > 1 && snapshot.layout !== lastLayout) {
|
|
2208
|
+
layoutChangedPolls++
|
|
2209
|
+
lastLayoutChange = describeLayoutChange(lastNodeRows, snapshot.nodeRows)
|
|
2210
|
+
}
|
|
2180
2211
|
const screenChanged = paintStill && !screenUnchanged(snapshot.screenPixels, lastScreenPixels)
|
|
2181
2212
|
if (polls > 1 && screenChanged) screenChangedPolls++
|
|
2182
2213
|
const strictOk =
|
|
@@ -2243,6 +2274,7 @@ async function waitForSootsimIdle({
|
|
|
2243
2274
|
}
|
|
2244
2275
|
lastNativeHierarchy = snapshot.nativeHierarchy
|
|
2245
2276
|
lastLayout = snapshot.layout
|
|
2277
|
+
lastNodeRows = snapshot.nodeRows
|
|
2246
2278
|
lastScreenPixels = snapshot.screenPixels
|
|
2247
2279
|
lastRequestTotal = snapshot.requestTotal
|
|
2248
2280
|
lastAppCommits = snapshot.appCommits
|
|
@@ -2289,6 +2321,7 @@ async function waitForSootsimIdle({
|
|
|
2289
2321
|
blockedBy:
|
|
2290
2322
|
blockers.join(', ') + ' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
|
|
2291
2323
|
'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, webViewStarting ' + webViewStartingPolls + 'x, screen changed ' + screenChangedPolls + 'x)' +
|
|
2324
|
+
(lastLayoutChange ? '; last layout change ' + JSON.stringify(lastLayoutChange) : '') +
|
|
2292
2325
|
(activityHost ? '; tenant activity ' + JSON.stringify({ initial: initialActivity, current: activityHost.getRenderActivity?.(), busySeen, idleSince, transitionEndedAt, startedAt: start }) : ''),
|
|
2293
2326
|
}
|
|
2294
2327
|
} finally {
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1674 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -1895,6 +1895,9 @@ async function waitForSootsimIdle({
|
|
|
1895
1895
|
hierarchy = null
|
|
1896
1896
|
}
|
|
1897
1897
|
const nodes = []
|
|
1898
|
+
// identity beside each geometry entry, from the rows already read,
|
|
1899
|
+
// so a changed layout can name the nodes that moved.
|
|
1900
|
+
const nodeRows = []
|
|
1898
1901
|
const LOADING_TEXT_REGEX = /^(creating webview|loading html|fetching bundle|waiting for first render|starting preview|loading simulator|fetching app code|waiting for native preview|starting design|loading canvas|fetching screens|painting the canvas|waiting for webview|waiting for preview|waiting for canvas|preview stalled)/i
|
|
1899
1902
|
const noteLoading = (state, text) => {
|
|
1900
1903
|
if (state?.busy === true) {
|
|
@@ -1915,7 +1918,9 @@ async function waitForSootsimIdle({
|
|
|
1915
1918
|
// subtree count by their own layout; the rest of the screen
|
|
1916
1919
|
// still catches the fling.
|
|
1917
1920
|
const abs = n.backgroundPlayback ? layout : n.absolute || n.absolutePosition || layout
|
|
1918
|
-
|
|
1921
|
+
const geometry = Math.round(abs.x) + ',' + Math.round(abs.y) + ',' + Math.round(layout.width)
|
|
1922
|
+
nodes.push(geometry)
|
|
1923
|
+
nodeRows.push([String(n.nodeId ?? nodes.length - 1), (n.type || '?') + (n.testId ? '#' + n.testId : ''), geometry])
|
|
1919
1924
|
}
|
|
1920
1925
|
noteLoading(
|
|
1921
1926
|
n.accessibilityState,
|
|
@@ -1927,7 +1932,9 @@ async function waitForSootsimIdle({
|
|
|
1927
1932
|
if (root) {
|
|
1928
1933
|
const walk = (n) => {
|
|
1929
1934
|
if (n.layout && n.layout.width > 0) {
|
|
1930
|
-
|
|
1935
|
+
const geometry = Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width)
|
|
1936
|
+
nodes.push(geometry)
|
|
1937
|
+
nodeRows.push([String(n.id ?? nodes.length - 1), (n.type || '?') + (n.props?.testID ? '#' + n.props.testID : ''), geometry])
|
|
1931
1938
|
}
|
|
1932
1939
|
noteLoading(
|
|
1933
1940
|
n.props?.accessibilityState,
|
|
@@ -1976,7 +1983,7 @@ async function waitForSootsimIdle({
|
|
|
1976
1983
|
pixelFrameToken = token
|
|
1977
1984
|
}
|
|
1978
1985
|
}
|
|
1979
|
-
return { layout: nodes.join(';'), nativeHierarchy, screenPixels, animating, shellAnimating, shellBlockers, layoutDirty, pendingFetches, workerBusy, webViewStarting, webViewBlocker, renderStatsAvailable, requestTotal, requestInFlight, appCommits, nodeCount }
|
|
1986
|
+
return { layout: nodes.join(';'), nodeRows, nativeHierarchy, screenPixels, animating, shellAnimating, shellBlockers, layoutDirty, pendingFetches, workerBusy, webViewStarting, webViewBlocker, renderStatsAvailable, requestTotal, requestInFlight, appCommits, nodeCount }
|
|
1980
1987
|
}
|
|
1981
1988
|
|
|
1982
1989
|
// how long generic background network is allowed to keep us waiting AFTER
|
|
@@ -1992,6 +1999,27 @@ async function waitForSootsimIdle({
|
|
|
1992
1999
|
const networkQuietGraceMs = 1200
|
|
1993
2000
|
let lastNativeHierarchy = null
|
|
1994
2001
|
let lastLayout = ''
|
|
2002
|
+
let lastNodeRows = []
|
|
2003
|
+
// what moved between the last two differing polls, bounded; names the
|
|
2004
|
+
// nodes behind "layout changed" without keeping any poll history.
|
|
2005
|
+
let lastLayoutChange = null
|
|
2006
|
+
const describeLayoutChange = (before, after) => {
|
|
2007
|
+
const previous = new Map(before.map(([key, label, geometry]) => [key, [label, geometry]]))
|
|
2008
|
+
const moved = []
|
|
2009
|
+
const added = []
|
|
2010
|
+
const short = (label, key) => String(label).slice(0, 48) + ' [' + String(key).slice(0, 24) + ']'
|
|
2011
|
+
for (const [key, label, geometry] of after) {
|
|
2012
|
+
const was = previous.get(key)
|
|
2013
|
+
previous.delete(key)
|
|
2014
|
+
if (!was) added.push(short(label, key) + ' ' + geometry)
|
|
2015
|
+
else if (was[1] !== geometry) moved.push(short(label, key) + ' ' + was[1] + '->' + geometry)
|
|
2016
|
+
}
|
|
2017
|
+
const removed = [...previous].map(([key, [label, geometry]]) => short(label, key) + ' ' + geometry)
|
|
2018
|
+
return {
|
|
2019
|
+
moved: moved.length, added: added.length, removed: removed.length,
|
|
2020
|
+
movedSample: moved.slice(0, 3), addedSample: added.slice(0, 3), removedSample: removed.slice(0, 3),
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
1995
2023
|
let lastScreenPixels = null
|
|
1996
2024
|
let screenChangedPolls = 0
|
|
1997
2025
|
let lastRequestTotal = -1
|
|
@@ -2070,7 +2098,10 @@ async function waitForSootsimIdle({
|
|
|
2070
2098
|
if (snapshot.layoutDirty) dirtyPolls++
|
|
2071
2099
|
if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
|
|
2072
2100
|
if (snapshot.webViewStarting) webViewStartingPolls++
|
|
2073
|
-
if (polls > 1 && snapshot.layout !== lastLayout)
|
|
2101
|
+
if (polls > 1 && snapshot.layout !== lastLayout) {
|
|
2102
|
+
layoutChangedPolls++
|
|
2103
|
+
lastLayoutChange = describeLayoutChange(lastNodeRows, snapshot.nodeRows)
|
|
2104
|
+
}
|
|
2074
2105
|
const screenChanged = paintStill && !screenUnchanged(snapshot.screenPixels, lastScreenPixels)
|
|
2075
2106
|
if (polls > 1 && screenChanged) screenChangedPolls++
|
|
2076
2107
|
const strictOk =
|
|
@@ -2137,6 +2168,7 @@ async function waitForSootsimIdle({
|
|
|
2137
2168
|
}
|
|
2138
2169
|
lastNativeHierarchy = snapshot.nativeHierarchy
|
|
2139
2170
|
lastLayout = snapshot.layout
|
|
2171
|
+
lastNodeRows = snapshot.nodeRows
|
|
2140
2172
|
lastScreenPixels = snapshot.screenPixels
|
|
2141
2173
|
lastRequestTotal = snapshot.requestTotal
|
|
2142
2174
|
lastAppCommits = snapshot.appCommits
|
|
@@ -2183,6 +2215,7 @@ async function waitForSootsimIdle({
|
|
|
2183
2215
|
blockedBy:
|
|
2184
2216
|
blockers.join(', ') + ' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
|
|
2185
2217
|
'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, webViewStarting ' + webViewStartingPolls + 'x, screen changed ' + screenChangedPolls + 'x)' +
|
|
2218
|
+
(lastLayoutChange ? '; last layout change ' + JSON.stringify(lastLayoutChange) : '') +
|
|
2186
2219
|
(activityHost ? '; tenant activity ' + JSON.stringify({ initial: initialActivity, current: activityHost.getRenderActivity?.(), busySeen, idleSince, transitionEndedAt, startedAt: start }) : ''),
|
|
2187
2220
|
}
|
|
2188
2221
|
} finally {
|