@@ -8,7 +8,7 @@ import { systemButtonRuntimeOperationFacts } from '@agent-device/contracts/syste
88import { tvRemoteRuntimeOperationFacts } from '@agent-device/contracts/tv-remote-runtime' ;
99import { tvRemoteButtonsForPlatform } from '@agent-device/contracts/tv-remote' ;
1010import {
11- hasAppleActionButton ,
11+ isHandheldAppleDevice ,
1212 isTvOsDevice ,
1313 resolveDeviceAppleOs ,
1414 type DeviceInfo ,
@@ -149,15 +149,15 @@ const actionButtonOsUnavailable = Object.freeze({
149149 hint : 'The Action Button is iPhone and iPad hardware; tvOS, macOS, watchOS and visionOS have no such control.' ,
150150} as const ) ;
151151/**
152- * The leaf reading is {@link hasAppleActionButton }, the same rule a provider owner reads; what this
153- * owner adds is its kind gate. The leaf is the whole claim: which model inside it carries the button
154- * is a hardware question the runner answers with `hasHardwareButton(.action)`, never a guess here.
155- * iPhone and iPad is deliberately not { @link appleMobileInputEligible}, which is `orientation`'s
156- * reading and admits visionOS — a headset has a Digital Crown and no Action Button .
152+ * The leaf reading is {@link isHandheldAppleDevice }, the same rule a provider owner reads; what
153+ * this owner adds is its kind gate. `DeviceInfo` records no model identifier, so which iPhone or
154+ * iPad carries the button is a hardware question the runner answers with
155+ * `hasHardwareButton(.action)`. iPhone and iPad is deliberately not
156+ * { @link appleMobileInputEligible}, which is `orientation`'s reading and admits visionOS .
157157 */
158158function appleActionButtonFact ( device : DeviceInfo ) : RuntimeOperationFact {
159159 if ( device . kind !== 'simulator' && device . kind !== 'device' ) return actionButtonKindUnavailable ;
160- return hasAppleActionButton ( device ) ? available : actionButtonOsUnavailable ;
160+ return isHandheldAppleDevice ( device ) ? available : actionButtonOsUnavailable ;
161161}
162162
163163const volumeButtonOsUnavailable = Object . freeze ( {
@@ -173,11 +173,11 @@ const volumeButtonSimulatorUnavailable = Object.freeze({
173173/**
174174 * `XCUIDevice.press(.volumeUp/.volumeDown)` is simulator-unavailable in the XCUITest header, so
175175 * the local runner presses volume on a physical iPhone or iPad only. The iPhone/iPad leaf read is
176- * {@link hasAppleActionButton }; tvOS, macOS, watchOS and visionOS have no volume key to press and
177- * hear that refusal, not the simulator one (#3848 review) .
176+ * {@link isHandheldAppleDevice }; tvOS, macOS, watchOS and visionOS have no volume key to press and
177+ * hear that refusal, not the simulator one.
178178 */
179179function appleVolumeButtonFact ( device : DeviceInfo ) : RuntimeOperationFact {
180- if ( ! hasAppleActionButton ( device ) ) return volumeButtonOsUnavailable ;
180+ if ( ! isHandheldAppleDevice ( device ) ) return volumeButtonOsUnavailable ;
181181 if ( device . kind !== 'device' ) return volumeButtonSimulatorUnavailable ;
182182 return available ;
183183}
0 commit comments