Skip to content

Commit f9acee9

Browse files
committed
fix(ios): name iPadOS in observe-only refusal messages
1 parent f008951 commit f9acee9

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandDispatch.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ extension RunnerTests {
516516
))
517517
#else
518518
return .response(Response(ok: false, error: ErrorPayload(
519-
code: "UNSUPPORTED_OPERATION", message: "observe-only snapshot is supported on iOS only"
519+
code: "UNSUPPORTED_OPERATION", message: "observe-only snapshot is supported on iOS and iPadOS only"
520520
)))
521521
#endif
522522
}

‎packages/contracts/src/snapshot-runtime.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ async function assertSnapshotObservationOwner(
159159
if (input.options?.observeOnly !== true) return;
160160
const { isHandheldAppleDevice } = await import('@agent-device/kernel/device');
161161
if (params.ownership === 'local' && isHandheldAppleDevice(params.device)) return;
162-
throw new AppError('UNSUPPORTED_OPERATION', 'observe-only snapshot requires a local iOS runner.');
162+
throw new AppError(
163+
'UNSUPPORTED_OPERATION',
164+
'observe-only snapshot requires a local iOS or iPadOS runner.',
165+
);
163166
}
164167

165168
export function bindLocalSnapshotInteractor(

‎packages/platform-apple/src/interactor.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ async function captureAppleSnapshot(
234234
helper: MacOsHelperSurface | undefined,
235235
) {
236236
if (options?.observeOnly === true && !isHandheldAppleDevice(device)) {
237-
throw new AppError('UNSUPPORTED_OPERATION', 'observe-only snapshot is supported on iOS only.');
237+
throw new AppError(
238+
'UNSUPPORTED_OPERATION',
239+
'observe-only snapshot is supported on iOS and iPadOS only.',
240+
);
238241
}
239242
if (helper) {
240243
return await captureMacOsSurfaceSnapshot({ ...options, surface: helper }, options?.signal);

‎src/daemon/snapshot-runtime-binding.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export async function resolveBoundSnapshotCaptureRuntime(
150150
) {
151151
throw new AppError(
152152
'UNSUPPORTED_OPERATION',
153-
'observe-only snapshot requires an iOS app session.',
153+
'observe-only snapshot requires an iOS or iPadOS app session.',
154154
);
155155
}
156156
const resolvedScope = resolveSnapshotScope(req.flags?.snapshotScope, session);

0 commit comments

Comments
 (0)