peachsim 0.1.761 → 0.1.763

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.
Files changed (73) hide show
  1. package/README.md +5 -0
  2. package/cli/bridge-flow-runner.ts +3 -4
  3. package/cli/commands/inspect/settling.ts +193 -162
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/agent-identity.cjs +1 -1
  7. package/dist-lib/agent-sessions.cjs +1 -1
  8. package/dist-lib/attached-projects.cjs +1 -1
  9. package/dist-lib/auth/shared-session.cjs +1 -1
  10. package/dist-lib/backend-origin.cjs +1 -1
  11. package/dist-lib/beta.cjs +1 -1
  12. package/dist-lib/beta.mjs +1 -1
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.mjs +1 -1
  16. package/dist-lib/bridge-contract.cjs +1 -1
  17. package/dist-lib/bridge-contract.mjs +1 -1
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cli-constants.cjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/detox/index.cjs +1 -1
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +44 -37
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +191 -159
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +1 -1
  48. package/dist-lib/native-app-identity.cjs +1 -1
  49. package/dist-lib/native-app-identity.mjs +1 -1
  50. package/dist-lib/native-firebase-metadata.cjs +1 -1
  51. package/dist-lib/native-firebase-metadata.mjs +1 -1
  52. package/dist-lib/plist.cjs +1 -1
  53. package/dist-lib/plist.mjs +1 -1
  54. package/dist-lib/profiles.cjs +1 -1
  55. package/dist-lib/public-brand.cjs +1 -1
  56. package/dist-lib/react-native-host-modules.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.mjs +1 -1
  58. package/dist-lib/render-mode.cjs +1 -1
  59. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  60. package/dist-lib/sdk.cjs +191 -159
  61. package/dist-lib/sdk.mjs +191 -159
  62. package/dist-lib/skills.cjs +240 -202
  63. package/dist-lib/swift-compile.cjs +1 -1
  64. package/dist-lib/swift-compile.mjs +1 -1
  65. package/dist-lib/swift-package.cjs +1 -1
  66. package/dist-lib/swift-package.mjs +1 -1
  67. package/dist-lib/swift-submit.cjs +1 -1
  68. package/dist-lib/swift-submit.mjs +1 -1
  69. package/dist-lib/swift-toolchain.cjs +1 -1
  70. package/dist-lib/swift.cjs +1 -1
  71. package/dist-lib/vite-swift.cjs +1 -1
  72. package/dist-lib/vite.cjs +1 -1
  73. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -30473,6 +30473,43 @@ function iosDevice(spec) {
30473
30473
  modelName: spec.name
30474
30474
  };
30475
30475
  }
30476
+ function ipadProDevice(model, name2, width, height, diagonalInches) {
30477
+ return iosDevice({
30478
+ model,
30479
+ name: name2,
30480
+ // iPad Pro 11-inch (M5) 12GB, iOS 27.0, simulator DBD4B183, UIKit probe
30481
+ // scenario `metrics`. portrait UIScreen.bounds 834×1210, scale 2,
30482
+ // nativeBounds 1668×2420. the window matched the screen.
30483
+ width,
30484
+ height,
30485
+ scale: 2,
30486
+ // portrait statusBarFrame was 834×32 at the top, and safeAreaInsets.top
30487
+ // was 32. landscape statusBarFrame stayed 32 tall while safeAreaInsets.top
30488
+ // was 10; this field is the portrait bar.
30489
+ statusBarHeight: 32,
30490
+ landscapeStatusBarHeight: 32,
30491
+ // portrait and landscape safeAreaInsets.bottom were both 20. the probe
30492
+ // has no separate home-indicator height.
30493
+ homeIndicatorHeight: 20,
30494
+ // UIScreen _displayCornerRadius, both orientations. the framebuffer
30495
+ // mask's tangent extent was not measured separately.
30496
+ cornerRadius: cornerRadii(30),
30497
+ continuousCornerRadius: cornerRadii(30),
30498
+ // housing is unsourced. the frame is the display until it is measured.
30499
+ frameInsets: uniformFrameInsets(0),
30500
+ dynamicIsland: null,
30501
+ // portrait safeAreaInsets. landscape was top 10, left 0, bottom 20, right 0.
30502
+ safeAreaInsets: { top: 32, bottom: 20, left: 0, right: 0 },
30503
+ iosVersion: "27.0",
30504
+ // portrait docked keyboard, UIKeyboardFrameEndUserInfoKey
30505
+ // {0, 870, 834, 340}. landscape posted a zero-height frame.
30506
+ keyboardPanelHeights: { qwerty: 333, pad: 333, emoji: 427 },
30507
+ // hypot(1668, 2420) / 11, measured native pixels over the device type's
30508
+ // 11-inch name. not a separate density read.
30509
+ physicalPPI: Math.hypot(width * 2, height * 2) / diagonalInches,
30510
+ hardwareButtons: modernButtons([0, 0], [0, 0], [0, 0], [0, 0])
30511
+ });
30512
+ }
30476
30513
  function resolveDevicePosture(model, posture) {
30477
30514
  const supported = devices[model].supportedPostures;
30478
30515
  return posture && supported?.includes(posture) ? posture : supported?.[0] ?? "closed";
@@ -30523,7 +30560,7 @@ function rotateDevice(device, side) {
30523
30560
  const barrelProtrusion = device.housing?.hingeBarrel?.protrusion ?? 0;
30524
30561
  if (side === "left") insets.top += barrelProtrusion;
30525
30562
  else insets.bottom += barrelProtrusion;
30526
- const safeArea = device.model === "ipad-pro-11" ? { top: 10, bottom: 20, left: 0, right: 0 } : device.model === "iphone-duo" ? { top: 0, bottom: 34, left: 0, right: 84 } : device.platform === "ios" && device.homeIndicatorHeight > 0 ? {
30563
+ const safeArea = isPadIdiom(device) ? { top: 10, bottom: 20, left: 0, right: 0 } : device.model === "iphone-duo" ? { top: 0, bottom: 34, left: 0, right: 84 } : device.platform === "ios" && device.homeIndicatorHeight > 0 ? {
30527
30564
  top: 0,
30528
30565
  bottom: 20,
30529
30566
  left: device.safeAreaInsets.top,
@@ -30566,6 +30603,9 @@ function rotateDevice(device, side) {
30566
30603
  function defaultLandscapeSide(model, posture) {
30567
30604
  return model === "iphone-duo" && resolveDevicePosture(model, posture) === "closed" ? "right" : "left";
30568
30605
  }
30606
+ function isPadIdiom(spec) {
30607
+ return spec.model === "ipad-pro-11" || spec.model === "ipad-pro-13";
30608
+ }
30569
30609
  function getDevice(model, posture, orientation, landscapeSide) {
30570
30610
  const device = devices[model];
30571
30611
  const side = landscapeSide ?? defaultLandscapeSide(model, posture);
@@ -31142,42 +31182,9 @@ var init_devices = __esm({
31142
31182
  // frame and hardware buttons are not sourced yet, so this stays off the
31143
31183
  // shipping picker the same way the duo does.
31144
31184
  developmentOnly: true,
31145
- ...iosDevice({
31146
- model: "ipad-pro-11",
31147
- name: "iPad Pro 11-inch (M5)",
31148
- // iPad Pro 11-inch (M5) 12GB, iOS 27.0, simulator DBD4B183, UIKit probe
31149
- // scenario `metrics`. portrait UIScreen.bounds 834×1210, scale 2,
31150
- // nativeBounds 1668×2420. the window matched the screen.
31151
- width: 834,
31152
- height: 1210,
31153
- scale: 2,
31154
- // portrait statusBarFrame was 834×32 at the top, and safeAreaInsets.top
31155
- // was 32. landscape statusBarFrame stayed 32 tall while safeAreaInsets.top
31156
- // was 10; this field is the portrait bar.
31157
- statusBarHeight: 32,
31158
- landscapeStatusBarHeight: 32,
31159
- // portrait and landscape safeAreaInsets.bottom were both 20. the probe
31160
- // has no separate home-indicator height.
31161
- homeIndicatorHeight: 20,
31162
- // UIScreen _displayCornerRadius, both orientations. the framebuffer
31163
- // mask's tangent extent was not measured separately.
31164
- cornerRadius: cornerRadii(30),
31165
- continuousCornerRadius: cornerRadii(30),
31166
- // housing is unsourced. the frame is the display until it is measured.
31167
- frameInsets: uniformFrameInsets(0),
31168
- dynamicIsland: null,
31169
- // portrait safeAreaInsets. landscape was top 10, left 0, bottom 20, right 0.
31170
- safeAreaInsets: { top: 32, bottom: 20, left: 0, right: 0 },
31171
- iosVersion: "27.0",
31172
- // portrait docked keyboard, UIKeyboardFrameEndUserInfoKey
31173
- // {0, 870, 834, 340}. landscape posted a zero-height frame.
31174
- keyboardPanelHeights: { qwerty: 333, pad: 333, emoji: 427 },
31175
- // hypot(1668, 2420) / 11, measured native pixels over the device type's
31176
- // 11-inch name. not a separate density read.
31177
- physicalPPI: 267.19578360606573,
31178
- hardwareButtons: modernButtons([0, 0], [0, 0], [0, 0], [0, 0])
31179
- })
31185
+ ...ipadProDevice("ipad-pro-11", "iPad Pro 11-inch (M5)", 834, 1210, 11)
31180
31186
  },
31187
+ "ipad-pro-13": ipadProDevice("ipad-pro-13", "iPad Pro 13-inch (M5)", 1032, 1376, 13),
31181
31188
  "pixel-8": {
31182
31189
  model: "pixel-8",
31183
31190
  platform: "android",
@@ -44579,179 +44586,211 @@ async function waitForSootsimIdle({
44579
44586
  const start = Date.now()
44580
44587
  const deadline = start + ${Math.max(0, Math.round(maxMs))}
44581
44588
  const pollMs = ${Math.max(1, Math.round(pollMs))}
44582
- const requiredStillMs = ${Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs))}
44583
- const minimumStablePolls = ${Math.min(2, Math.max(1, Math.round(stablePolls)))}
44584
44589
  const strict = ${strict ? "true" : "false"}
44585
44590
  const paintStill = ${paintStill ? "true" : "false"}
44591
+ const requiredStillMs = paintStill ? 0 : ${Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs))}
44592
+ const minimumStablePolls = paintStill ? 1 : ${Math.min(2, Math.max(1, Math.round(stablePolls)))}
44586
44593
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
44587
-
44588
- // route-aware settle: a tap that pushes/pops a screen is async \u2014 the
44589
- // old screen still renders for a moment, then the new one mounts and
44590
- // its content loads. a pure layout-hash check reports "idle" on the
44591
- // outgoing screen or on the incoming skeleton, so a driver re-taps
44592
- // and stacks duplicate navigations. drain any in-flight screen
44593
- // transition FIRST, bounded by the overall budget. when no
44594
- // transition is happening this returns in ~80ms (startWindowMs), so
44595
- // a plain button tap barely pays for it.
44594
+ const composite = paintStill ? window.SootSim?.bridges?.liveComposite : null
44595
+ if (paintStill && !composite) {
44596
+ return { settled: false, elapsed: Date.now() - start, blockedBy: 'screen pixels unavailable' }
44597
+ }
44598
+ // subscribe to presented frames; authoritative screenshots force a
44599
+ // worker render, which changes the very counter we used to inspect.
44600
+ const unsubscribe = composite?.subscribe(() => {})
44601
+ let pixelFrameToken = -1
44602
+ let screenPixels = null
44596
44603
  try {
44597
- const wfst = window.__sootsimTest?.waitForScreenTransitions
44598
- if (typeof wfst === 'function') {
44599
- const remaining = deadline - Date.now()
44600
- if (remaining > 120) {
44601
- await wfst({
44602
- timeoutMs: Math.min(remaining - 80, 4000),
44603
- settleMs: 64,
44604
- startWindowMs: 80,
44605
- })
44606
- }
44607
- }
44608
- } catch {}
44609
44604
 
44610
- const readSnapshot = async () => {
44611
- let animating = false
44612
- let layoutDirty = false
44613
- let pendingFetches = 0
44614
- let requestTotal = 0
44615
- let requestInFlight = 0
44616
- let renderStatsAvailable = false
44617
- let frameCount = -1
44618
- let shellAnimating = false
44619
- // strict also waits out shell motion: a system alert, sheet or menu
44620
- // animates in the shell worker while the app's own stats read still,
44621
- // so its presentation is complete only once the shell's list empties.
44622
- if (strict) {
44623
- try {
44624
- const motion = await window.__sootsimTest?.listAnimations?.()
44625
- shellAnimating = Array.isArray(motion) && motion.some((anim) => anim.realm === 'shell')
44626
- } catch {}
44627
- }
44605
+ // route-aware settle: a tap that pushes/pops a screen is async \u2014 the
44606
+ // old screen still renders for a moment, then the new one mounts and
44607
+ // its content loads. a pure layout-hash check reports "idle" on the
44608
+ // outgoing screen or on the incoming skeleton, so a driver re-taps
44609
+ // and stacks duplicate navigations. drain any in-flight screen
44610
+ // transition FIRST, bounded by the overall budget. when no
44611
+ // transition is happening this returns in ~80ms (startWindowMs), so
44612
+ // a plain button tap barely pays for it.
44628
44613
  try {
44629
- const stats = await window.__sootsimRenderHost?.queryStats?.()
44630
- if (stats) {
44631
- renderStatsAvailable = true
44632
- frameCount = typeof stats.frameCount === 'number' ? stats.frameCount : -1
44633
- animating =
44634
- stats.hasActiveAnims === true ||
44635
- stats.hasActiveNativeAnimations === true ||
44636
- stats.hasPendingAnimationFrames === true
44637
- layoutDirty =
44638
- stats.layoutDirty === true && stats.renderRequested === true
44639
- // a freshly-pushed screen showing a skeleton is layout-stable
44640
- // but not actually settled \u2014 its data/images are still in
44641
- // flight. treat bounded image-loader fetches as not-idle so
44642
- // settle waits for real content, capped by the budget.
44643
- const pf = stats.memory && stats.memory.imageLoader
44644
- ? stats.memory.imageLoader.pendingFetches
44645
- : 0
44646
- pendingFetches = typeof pf === 'number' ? pf : 0
44614
+ const wfst = window.__sootsimTest?.waitForScreenTransitions
44615
+ if (typeof wfst === 'function') {
44616
+ const remaining = deadline - Date.now()
44617
+ if (remaining > 120) {
44618
+ await wfst({
44619
+ timeoutMs: Math.min(remaining - 80, 4000),
44620
+ settleMs: 64,
44621
+ startWindowMs: 80,
44622
+ })
44623
+ }
44647
44624
  }
44648
44625
  } catch {}
44649
- try {
44650
- const counts = await window.__sootsimTest?.getRequestCounts?.()
44651
- requestTotal = typeof counts?.total === 'number' ? counts.total : 0
44652
- requestInFlight = typeof counts?.inFlight === 'number' ? counts.inFlight : 0
44653
- } catch {}
44654
- const root = window.__sootsimRoot
44655
- const nodes = []
44656
- if (root) {
44657
- const walk = (n) => {
44658
- if (n.layout && n.layout.width > 0) {
44659
- nodes.push(Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width))
44626
+
44627
+ const readSnapshot = async () => {
44628
+ let animating = false
44629
+ let layoutDirty = false
44630
+ let pendingFetches = 0
44631
+ let requestTotal = 0
44632
+ let requestInFlight = 0
44633
+ let renderStatsAvailable = false
44634
+ let shellAnimating = false
44635
+ // strict also waits out shell motion: a system alert, sheet or menu
44636
+ // animates in the shell worker while the app's own stats read still,
44637
+ // so its presentation is complete only once the shell's list empties.
44638
+ if (strict) {
44639
+ try {
44640
+ const motion = await window.__sootsimTest?.listAnimations?.()
44641
+ shellAnimating = Array.isArray(motion) && motion.some((anim) => anim.realm === 'shell')
44642
+ } catch {}
44643
+ }
44644
+ try {
44645
+ const stats = await window.__sootsimRenderHost?.queryStats?.()
44646
+ if (stats) {
44647
+ renderStatsAvailable = true
44648
+ animating =
44649
+ stats.hasActiveAnims === true ||
44650
+ stats.hasActiveNativeAnimations === true ||
44651
+ stats.hasPendingAnimationFrames === true
44652
+ layoutDirty =
44653
+ stats.layoutDirty === true && stats.renderRequested === true
44654
+ // a freshly-pushed screen showing a skeleton is layout-stable
44655
+ // but not actually settled \u2014 its data/images are still in
44656
+ // flight. treat bounded image-loader fetches as not-idle so
44657
+ // settle waits for real content, capped by the budget.
44658
+ const pf = stats.memory && stats.memory.imageLoader
44659
+ ? stats.memory.imageLoader.pendingFetches
44660
+ : 0
44661
+ pendingFetches = typeof pf === 'number' ? pf : 0
44662
+ }
44663
+ } catch {}
44664
+ try {
44665
+ const counts = await window.__sootsimTest?.getRequestCounts?.()
44666
+ requestTotal = typeof counts?.total === 'number' ? counts.total : 0
44667
+ requestInFlight = typeof counts?.inFlight === 'number' ? counts.inFlight : 0
44668
+ } catch {}
44669
+ const root = window.__sootsimRoot
44670
+ const nodes = []
44671
+ if (root) {
44672
+ const walk = (n) => {
44673
+ if (n.layout && n.layout.width > 0) {
44674
+ nodes.push(Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width))
44675
+ }
44676
+ for (const c of n.children || []) walk(c)
44677
+ }
44678
+ walk(root)
44679
+ }
44680
+ if (paintStill) {
44681
+ const canvas = composite.getCanvas()
44682
+ const token = composite.getFrameToken()
44683
+ if (!canvas || canvas.width <= 1 || canvas.height <= 1) {
44684
+ screenPixels = null
44685
+ } else if (token !== pixelFrameToken || canvas.width !== screenPixels?.width || canvas.height !== screenPixels?.height) {
44686
+ const context = canvas.getContext('2d')
44687
+ const image = context?.getImageData(0, 0, canvas.width, canvas.height)
44688
+ screenPixels = image ? { width: image.width, height: image.height, data: new Uint32Array(image.data.buffer) } : null
44689
+ pixelFrameToken = token
44660
44690
  }
44661
- for (const c of n.children || []) walk(c)
44662
44691
  }
44663
- walk(root)
44692
+ return { layout: nodes.join(';'), screenPixels, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
44664
44693
  }
44665
- return { layout: nodes.join(';'), frameCount, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
44666
- }
44667
44694
 
44668
- // how long generic background network is allowed to keep us waiting AFTER
44669
- // the screen is otherwise visually settled. apps with continuous traffic
44670
- // (polling, realtime sockets, a tap that fires 20-50 fetches) never reach
44671
- // requestInFlight===0 / a stable requestTotal, so requiring full network
44672
- // quiet burns the ENTIRE budget on every command \u2014 the leading idle that
44673
- // failed PR-preview recordings for network-heavy apps (3pc fight-pulse).
44674
- // layout-stability + the image-loader already prove visible content
44675
- // loaded (a data load changes layout; an image load shows in the loader),
44676
- // so the generic request counters are a courtesy, not a gate: honor them
44677
- // only within this grace once the screen is visually still.
44678
- const networkQuietGraceMs = 1200
44679
- let lastLayout = ''
44680
- let lastFrameCount = -2
44681
- let paintedPolls = 0
44682
- let lastRequestTotal = -1
44683
- let stable = 0
44684
- let visuallyStillSince = 0
44685
- // counts across the whole budget: a flag that is true on every poll is a
44686
- // different bug from one that is true intermittently, and the two need
44687
- // opposite fixes (engine vs budget).
44688
- let polls = 0
44689
- let dirtyPolls = 0
44690
- let animatingPolls = 0
44691
- let layoutChangedPolls = 0
44692
- while (Date.now() < deadline) {
44693
- const snapshot = await readSnapshot()
44694
- polls++
44695
- if (snapshot.layoutDirty) dirtyPolls++
44696
- if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
44697
- if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
44698
- const painted = paintStill && snapshot.frameCount !== lastFrameCount
44699
- if (polls > 1 && painted) paintedPolls++
44700
- const strictOk =
44701
- !strict ||
44702
- (snapshot.renderStatsAvailable &&
44703
- !snapshot.animating &&
44704
- !snapshot.shellAnimating &&
44705
- !snapshot.layoutDirty)
44706
- // visually settled: no animations, no image content loading, layout
44707
- // unchanged since the last poll.
44708
- const visuallyStill =
44709
- strictOk &&
44710
- !painted &&
44711
- snapshot.pendingFetches === 0 &&
44712
- snapshot.layout === lastLayout
44713
- // generic network quiet: nothing in flight and no new requests issued.
44714
- const networkQuiet =
44715
- snapshot.requestInFlight === 0 && snapshot.requestTotal === lastRequestTotal
44716
- if (visuallyStill) {
44717
- stable++
44718
- if (visuallyStillSince === 0) visuallyStillSince = Date.now()
44719
- // settle once the screen has held still long enough AND either the
44720
- // network is genuinely quiet OR it has refused to quiet within the
44721
- // grace (continuous background traffic must not block forever).
44722
- if (
44723
- stable >= minimumStablePolls &&
44724
- Date.now() - visuallyStillSince >= requiredStillMs &&
44725
- (networkQuiet || Date.now() - visuallyStillSince >= networkQuietGraceMs)
44726
- ) {
44727
- return { settled: true, elapsed: Date.now() - start, blockedBy: '' }
44728
- }
44729
- } else {
44730
- stable = 0
44731
- visuallyStillSince = 0
44732
- }
44733
- lastLayout = snapshot.layout
44734
- lastFrameCount = snapshot.frameCount
44735
- lastRequestTotal = snapshot.requestTotal
44736
- await sleep(pollMs)
44737
- }
44738
- const last = await readSnapshot()
44739
- const blockers = []
44740
- if (strict && !last.renderStatsAvailable) blockers.push('render stats unavailable')
44741
- if (last.animating) blockers.push('animations still running')
44742
- if (last.shellAnimating) blockers.push('shell animations still running')
44743
- if (last.layoutDirty) blockers.push('layout still dirty')
44744
- if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
44745
- if (last.layout !== lastLayout) blockers.push('layout still changing')
44746
- if (paintStill && last.frameCount !== lastFrameCount) blockers.push('still painting')
44747
- if (last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
44748
- return {
44749
- settled: false,
44750
- elapsed: Date.now() - start,
44751
- blockedBy:
44752
- (blockers.length ? blockers.join(', ') : 'unknown') +
44753
- ' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
44754
- 'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, painted ' + paintedPolls + 'x)',
44695
+ // how long generic background network is allowed to keep us waiting AFTER
44696
+ // the screen is otherwise visually settled. apps with continuous traffic
44697
+ // (polling, realtime sockets, a tap that fires 20-50 fetches) never reach
44698
+ // requestInFlight===0 / a stable requestTotal, so requiring full network
44699
+ // quiet burns the ENTIRE budget on every command \u2014 the leading idle that
44700
+ // failed PR-preview recordings for network-heavy apps (3pc fight-pulse).
44701
+ // layout-stability + the image-loader already prove visible content
44702
+ // loaded (a data load changes layout; an image load shows in the loader),
44703
+ // so the generic request counters are a courtesy, not a gate: honor them
44704
+ // only within this grace once the screen is visually still.
44705
+ const networkQuietGraceMs = 1200
44706
+ let lastLayout = ''
44707
+ let lastScreenPixels = null
44708
+ let screenChangedPolls = 0
44709
+ let lastRequestTotal = -1
44710
+ let stable = 0
44711
+ let visuallyStillSince = 0
44712
+ // counts across the whole budget: a flag that is true on every poll is a
44713
+ // different bug from one that is true intermittently, and the two need
44714
+ // opposite fixes (engine vs budget).
44715
+ let polls = 0
44716
+ let dirtyPolls = 0
44717
+ let animatingPolls = 0
44718
+ let layoutChangedPolls = 0
44719
+ const screenUnchanged = (pixels) => {
44720
+ if (!pixels || !lastScreenPixels || pixels.width !== lastScreenPixels.width || pixels.height !== lastScreenPixels.height) return false
44721
+ if (pixels === lastScreenPixels) return true
44722
+ for (let i = 0; i < pixels.data.length; i++) {
44723
+ if (pixels.data[i] !== lastScreenPixels.data[i]) return false
44724
+ }
44725
+ return true
44726
+ }
44727
+ while (Date.now() < deadline) {
44728
+ const snapshot = await readSnapshot()
44729
+ polls++
44730
+ if (snapshot.layoutDirty) dirtyPolls++
44731
+ if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
44732
+ if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
44733
+ const screenChanged = paintStill && !screenUnchanged(snapshot.screenPixels)
44734
+ if (polls > 1 && screenChanged) screenChangedPolls++
44735
+ const strictOk =
44736
+ !strict ||
44737
+ (snapshot.renderStatsAvailable &&
44738
+ !snapshot.animating &&
44739
+ !snapshot.shellAnimating &&
44740
+ !snapshot.layoutDirty)
44741
+ // visually settled: no animations, no image content loading, layout
44742
+ // unchanged since the last poll.
44743
+ const visuallyStill =
44744
+ strictOk &&
44745
+ !screenChanged &&
44746
+ snapshot.pendingFetches === 0 &&
44747
+ snapshot.layout === lastLayout
44748
+ // generic network quiet: nothing in flight and no new requests issued.
44749
+ const networkQuiet =
44750
+ snapshot.requestInFlight === 0 && snapshot.requestTotal === lastRequestTotal
44751
+ if (visuallyStill) {
44752
+ stable++
44753
+ if (visuallyStillSince === 0) visuallyStillSince = Date.now()
44754
+ // settle once the screen has held still long enough AND either the
44755
+ // network is genuinely quiet OR it has refused to quiet within the
44756
+ // grace (continuous background traffic must not block forever).
44757
+ if (
44758
+ stable >= minimumStablePolls &&
44759
+ Date.now() - visuallyStillSince >= requiredStillMs &&
44760
+ (networkQuiet || Date.now() - visuallyStillSince >= networkQuietGraceMs)
44761
+ ) {
44762
+ return { settled: true, elapsed: Date.now() - start, blockedBy: '' }
44763
+ }
44764
+ } else {
44765
+ stable = 0
44766
+ visuallyStillSince = 0
44767
+ }
44768
+ lastLayout = snapshot.layout
44769
+ lastScreenPixels = snapshot.screenPixels
44770
+ lastRequestTotal = snapshot.requestTotal
44771
+ await sleep(pollMs)
44772
+ }
44773
+ const last = await readSnapshot()
44774
+ const blockers = []
44775
+ if (strict && !last.renderStatsAvailable) blockers.push('render stats unavailable')
44776
+ if (last.animating) blockers.push('animations still running')
44777
+ if (last.shellAnimating) blockers.push('shell animations still running')
44778
+ if (last.layoutDirty) blockers.push('layout still dirty')
44779
+ if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
44780
+ if (last.layout !== lastLayout) blockers.push('layout still changing')
44781
+ if (paintStill && !last.screenPixels) blockers.push('screen pixels unavailable')
44782
+ else if (paintStill && !screenUnchanged(last.screenPixels)) blockers.push('screen pixels still changing')
44783
+ if (last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
44784
+ return {
44785
+ settled: false,
44786
+ elapsed: Date.now() - start,
44787
+ blockedBy:
44788
+ (blockers.length ? blockers.join(', ') : 'unknown') +
44789
+ ' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
44790
+ 'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, screen changed ' + screenChangedPolls + 'x)',
44791
+ }
44792
+ } finally {
44793
+ unsubscribe?.()
44755
44794
  }
44756
44795
  })()`
44757
44796
  },
@@ -47076,9 +47115,9 @@ var init_bridge_flow_runner = __esm({
47076
47115
  // maestro waits around taps for the screen to stop changing, up to
47077
47116
  // its ios driver's 3 s settle budget, comparing screenshots, so an action
47078
47117
  // still in flight (a submit spinner, a sheet closing) finishes before the
47079
- // next command resolves its target. an app can take a few hundred ms to
47080
- // react to a press, so stillness must hold about half a second, and it
47081
- // counts painted frames because a spinner repaints without moving layout.
47118
+ // next command resolves its target. compare consecutive screen pixels,
47119
+ // rather than requiring frame publications to stop for half a second:
47120
+ // a focused input keeps repainting its native blinking caret.
47082
47121
  // a screen that never stops proceeds when the budget runs out, as there,
47083
47122
  // and names what kept it moving: every such step pays the whole budget.
47084
47123
  async waitForAppToSettle() {
@@ -47087,7 +47126,6 @@ var init_bridge_flow_runner = __esm({
47087
47126
  simId: this.opts.simId,
47088
47127
  maxMs: 3e3,
47089
47128
  pollMs: 32,
47090
- stablePolls: 16,
47091
47129
  strict: true,
47092
47130
  paintStill: true
47093
47131
  });
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2, execFileSync } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.761 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.761",
3
+ "version": "0.1.763",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",