Skip to content

Commit 1b31bee

Browse files
thymikeeclaude
andauthored
fix(providers): name the simulator HID helper in the fold refusal hints (#2873)
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) <noreply@anthropic.com>
1 parent 5c19230 commit 1b31bee

7 files changed

Lines changed: 16 additions & 10 deletions

File tree

‎packages/contracts/src/navigation.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export type OrientationCommandResult = {
5252
* `fold` — `{ action: 'fold', pose, hingeAngleDegrees, screen?, message }`.
5353
*
5454
* Unlike `orientation`, there is no unconfirmed variant: the Apple owner reads the hinge angle
55-
* back from CoreDevice after pressing the Device Hub pose control, and reports a pose only when
55+
* back from CoreDevice after the simulator HID helper sends the pose, and reports a pose only when
5656
* that reading agrees with the request. `screen` names the panel the device lights afterwards and
5757
* that panel's native point size (ADR 0025); it is the panel's geometry, not the app viewport, so a
5858
* caller must take a fresh snapshot before placing a tap.

‎packages/platform-android/src/runtime.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ test('Android refuses the fold fact on every kind', async () => {
225225
createAndroidPlatformRuntime(androidNavigationHost()),
226226
runtimeDevice,
227227
);
228-
// A foldable hinge is posed through Xcode Device Hub; no adb surface poses one.
228+
// fold drives only foldable iPhone simulators; the Android emulator posture control is not
229+
// driven yet.
229230
expect(binding.facts.operations.setFoldPose).toEqual({
230231
available: false,
231232
reason: 'unsupported-platform-leaf',

‎packages/platform-web/src/runtime.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ test('clipboard, the app switcher, app events, settings and alerts carry no web
214214
'appSwitcher',
215215
// The Action Button is iPhone/iPad hardware with no web analogue at all.
216216
'actionButton',
217-
// A foldable hinge is posed through Xcode Device Hub; the web target has none.
217+
// A foldable hinge is posed through the host's iOS simulator HID helper; the web target has
218+
// none.
218219
'setFoldPose',
219220
'triggerAppEvent',
220221
// R58/R59: the retired `settings` and `alert` descriptors declared no web leaf either.

‎packages/provider-limrun/src/interaction-operations.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,14 @@ export function limrunSystemButtonOperationFacts(
341341
});
342342
}
343343

344-
/** A foldable hinge is posed through the host's Xcode Device Hub, which no Limrun session has. */
344+
/**
345+
* `fold` sends a HID hinge event through a helper the daemon host spawns inside one of its own iOS
346+
* simulators with `simctl spawn`; a Limrun session's device is not a host simulator.
347+
*/
345348
export const LIMRUN_FOLD_UNAVAILABLE = Object.freeze({
346349
available: false,
347350
reason: 'unsupported-provider-mode',
348-
hint: 'fold poses a foldable iPhone simulator through Xcode Device Hub on the host, which no Limrun session exposes.',
351+
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.',
349352
} as const);
350353

351354
/** The fold refusal both Limrun legs share. */

‎packages/provider-webdriver/src/platform-runtime.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const systemButtonUnavailable = Object.freeze({
245245
const foldUnavailable = Object.freeze({
246246
available: false,
247247
reason: 'unsupported-provider-mode',
248-
hint: 'fold poses a foldable iPhone simulator through Xcode Device Hub, which no WebDriver backend exposes.',
248+
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.',
249249
} as const);
250250

251251
/**

‎test/integration/provider-scenarios/provider-device-runtime.fixtures.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ function providerScenarioRuntimeFacts(
270270
// hardware exists on the iPhone/iPad leaf only, so the fixture reads the same kernel rule the
271271
// Apple owner's fact reads instead of restating it (#2699).
272272
actionButton: hasAppleActionButton(device) ? fakeProviderAvailable : fakeProviderUnavailable,
273-
// A provider session has no Device Hub on the host, so no fixture leg poses a hinge.
273+
// A provider session has no host simulator for the fold HID helper, so no fixture leg poses
274+
// a hinge.
274275
setFoldPose: fakeProviderUnavailable,
275276
// Provider-owned iOS keyboard actions ride the same runner transport the shared interactor
276277
// does (#1297): a fixture scenario that can drive the interactor at all can drive these.

‎test/integration/provider-scenarios/provider-ios-runner-transport.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ test('provider transport carries the Action Button press without an app activati
132132
});
133133
});
134134

135-
// A hinge pose is posed through Xcode Device Hub on the host, which a provider-owned device has no
136-
// access to, so the provider fixture states the refusal cell and admission refuses before anything
137-
// reaches the transport: no runner call, no local Device Hub press.
135+
// A hinge pose is sent by a HID helper the host spawns inside a local iOS simulator, which a
136+
// provider-owned device is not, so the provider fixture states the refusal cell and admission
137+
// refuses before anything reaches the transport.
138138
test('provider transport refuses a fold before any runner traffic', async () => {
139139
await withProviderScenarioResource(createInteractorSeamWorld, async ({ daemon, calls }) => {
140140
const lease = await allocateLease(daemon);

0 commit comments

Comments
 (0)