From 96a901b014a62f5054751d7551df1596eaf35147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 24 Sep 2026 11:21:50 +0200 Subject: [PATCH] fix(providers): name the simulator HID helper in the fold refusal hints Since #2762 fold poses a foldable iPhone simulator by spawning a HID sender inside a host simulator (simctl spawn), not through Xcode Device Hub. Reword the Limrun and WebDriver refusal hints and the comments that still described the Device Hub path. Refusal reasons and codes are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) --- packages/contracts/src/navigation.ts | 2 +- packages/platform-android/src/runtime.test.ts | 3 ++- packages/platform-web/src/runtime.test.ts | 3 ++- packages/provider-limrun/src/interaction-operations.ts | 7 +++++-- packages/provider-webdriver/src/platform-runtime.ts | 2 +- .../provider-scenarios/provider-device-runtime.fixtures.ts | 3 ++- .../provider-ios-runner-transport.test.ts | 6 +++--- 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/packages/contracts/src/navigation.ts b/packages/contracts/src/navigation.ts index 3d5c6c1d62..fca6600b99 100644 --- a/packages/contracts/src/navigation.ts +++ b/packages/contracts/src/navigation.ts @@ -52,7 +52,7 @@ export type OrientationCommandResult = { * `fold` — `{ action: 'fold', pose, hingeAngleDegrees, screen?, message }`. * * Unlike `orientation`, there is no unconfirmed variant: the Apple owner reads the hinge angle - * back from CoreDevice after pressing the Device Hub pose control, and reports a pose only when + * back from CoreDevice after the simulator HID helper sends the pose, and reports a pose only when * that reading agrees with the request. `screen` names the panel the device lights afterwards and * that panel's native point size (ADR 0025); it is the panel's geometry, not the app viewport, so a * caller must take a fresh snapshot before placing a tap. diff --git a/packages/platform-android/src/runtime.test.ts b/packages/platform-android/src/runtime.test.ts index bb0d47b805..011afb24f9 100644 --- a/packages/platform-android/src/runtime.test.ts +++ b/packages/platform-android/src/runtime.test.ts @@ -225,7 +225,8 @@ test('Android refuses the fold fact on every kind', async () => { createAndroidPlatformRuntime(androidNavigationHost()), runtimeDevice, ); - // A foldable hinge is posed through Xcode Device Hub; no adb surface poses one. + // fold drives only foldable iPhone simulators; the Android emulator posture control is not + // driven yet. expect(binding.facts.operations.setFoldPose).toEqual({ available: false, reason: 'unsupported-platform-leaf', diff --git a/packages/platform-web/src/runtime.test.ts b/packages/platform-web/src/runtime.test.ts index f25bccc885..5ba868a300 100644 --- a/packages/platform-web/src/runtime.test.ts +++ b/packages/platform-web/src/runtime.test.ts @@ -214,7 +214,8 @@ test('clipboard, the app switcher, app events, settings and alerts carry no web 'appSwitcher', // The Action Button is iPhone/iPad hardware with no web analogue at all. 'actionButton', - // A foldable hinge is posed through Xcode Device Hub; the web target has none. + // A foldable hinge is posed through the host's iOS simulator HID helper; the web target has + // none. 'setFoldPose', 'triggerAppEvent', // R58/R59: the retired `settings` and `alert` descriptors declared no web leaf either. diff --git a/packages/provider-limrun/src/interaction-operations.ts b/packages/provider-limrun/src/interaction-operations.ts index 1c5796bc30..18a0acb9da 100644 --- a/packages/provider-limrun/src/interaction-operations.ts +++ b/packages/provider-limrun/src/interaction-operations.ts @@ -341,11 +341,14 @@ export function limrunSystemButtonOperationFacts( }); } -/** A foldable hinge is posed through the host's Xcode Device Hub, which no Limrun session has. */ +/** + * `fold` sends a HID hinge event through a helper the daemon host spawns inside one of its own iOS + * simulators with `simctl spawn`; a Limrun session's device is not a host simulator. + */ export const LIMRUN_FOLD_UNAVAILABLE = Object.freeze({ available: false, reason: 'unsupported-provider-mode', - hint: 'fold poses a foldable iPhone simulator through Xcode Device Hub on the host, which no Limrun session exposes.', + hint: 'fold runs a HID helper through simctl spawn inside a foldable iPhone simulator on the daemon host; a Limrun session has no such simulator.', } as const); /** The fold refusal both Limrun legs share. */ diff --git a/packages/provider-webdriver/src/platform-runtime.ts b/packages/provider-webdriver/src/platform-runtime.ts index 5302e3d955..ae377d493b 100644 --- a/packages/provider-webdriver/src/platform-runtime.ts +++ b/packages/provider-webdriver/src/platform-runtime.ts @@ -245,7 +245,7 @@ const systemButtonUnavailable = Object.freeze({ const foldUnavailable = Object.freeze({ available: false, reason: 'unsupported-provider-mode', - hint: 'fold poses a foldable iPhone simulator through Xcode Device Hub, which no WebDriver backend exposes.', + hint: 'fold runs a HID helper through simctl spawn inside a foldable iPhone simulator on the daemon host; a WebDriver backend has no such simulator.', } as const); /** diff --git a/test/integration/provider-scenarios/provider-device-runtime.fixtures.ts b/test/integration/provider-scenarios/provider-device-runtime.fixtures.ts index 06a4785f7e..e5a6fbe438 100644 --- a/test/integration/provider-scenarios/provider-device-runtime.fixtures.ts +++ b/test/integration/provider-scenarios/provider-device-runtime.fixtures.ts @@ -270,7 +270,8 @@ function providerScenarioRuntimeFacts( // hardware exists on the iPhone/iPad leaf only, so the fixture reads the same kernel rule the // Apple owner's fact reads instead of restating it (#2699). actionButton: hasAppleActionButton(device) ? fakeProviderAvailable : fakeProviderUnavailable, - // A provider session has no Device Hub on the host, so no fixture leg poses a hinge. + // A provider session has no host simulator for the fold HID helper, so no fixture leg poses + // a hinge. setFoldPose: fakeProviderUnavailable, // Provider-owned iOS keyboard actions ride the same runner transport the shared interactor // does (#1297): a fixture scenario that can drive the interactor at all can drive these. diff --git a/test/integration/provider-scenarios/provider-ios-runner-transport.test.ts b/test/integration/provider-scenarios/provider-ios-runner-transport.test.ts index a9094e6f01..d8619d861d 100644 --- a/test/integration/provider-scenarios/provider-ios-runner-transport.test.ts +++ b/test/integration/provider-scenarios/provider-ios-runner-transport.test.ts @@ -132,9 +132,9 @@ test('provider transport carries the Action Button press without an app activati }); }); -// A hinge pose is posed through Xcode Device Hub on the host, which a provider-owned device has no -// access to, so the provider fixture states the refusal cell and admission refuses before anything -// reaches the transport: no runner call, no local Device Hub press. +// A hinge pose is sent by a HID helper the host spawns inside a local iOS simulator, which a +// provider-owned device is not, so the provider fixture states the refusal cell and admission +// refuses before anything reaches the transport. test('provider transport refuses a fold before any runner traffic', async () => { await withProviderScenarioResource(createInteractorSeamWorld, async ({ daemon, calls }) => { const lease = await allocateLease(daemon);