Skip to content

Commit efc5ad0

Browse files
committed
docs: address review — scope physical-device claim, add SkillGym coverage
- Limit the SpringBoard claim to verified iOS simulator support; #1296 explicitly leaves physical-iPhone SpringBoard unverified. Applied to both the CLI help topic and website/docs/docs/commands.md, with a link to the tracking issue. - Add a SkillGym skill-guidance case (ios-system-ui-springboard-widget-add) covering opening SpringBoard, fresh-snapshot label discovery, the two bounded coordinate fallbacks, reopening the app, and session cleanup.
1 parent 093cc00 commit efc5ad0

4 files changed

Lines changed: 33 additions & 2 deletions

File tree

‎src/cli/parser/__tests__/cli-help-topics.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,10 @@ test('usageForCommand resolves ios-system-ui help topic', async () => {
490490
assert.match(help, /agent-device open com\.apple\.springboard --platform ios/);
491491
assert.match(help, /longpress <x> <y> on an empty area of the home screen/);
492492
assert.match(help, /discover them from the current snapshot/);
493+
assert.match(
494+
help,
495+
/verified on iOS simulator; physical-iPhone SpringBoard support is not yet verified/,
496+
);
493497
assert.match(help, /Do not hard-code Edit\/Done\/Add Widget or other SpringBoard label text/);
494498
assert.match(help, /Reopen the app bundle under test/);
495499
});

‎src/cli/parser/cli-help.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ For iOS SpringBoard, widget, or other system-UI surfaces, read agent-device help
850850
851851
Use this when a task needs iOS SpringBoard (home screen), widget add/edit/remove, or other system-UI surfaces instead of the app under test.
852852
853-
This works today by opening SpringBoard as the session app; there is no separate widget/system command. System labels vary by iOS version and locale, so discover them from the current snapshot instead of relying on the literal strings shown below.
853+
This works today by opening SpringBoard as the session app; there is no separate widget/system command. System labels vary by iOS version and locale, so discover them from the current snapshot instead of relying on the literal strings shown below. This workflow is verified on iOS simulator; physical-iPhone SpringBoard support is not yet verified.
854854
855855
Core loop:
856856
1. Reach the app state you want to prepare (for example, arrange the widget/Live Activity data the app should show) with normal app automation, then agent-device open com.apple.springboard --platform ios. From an existing app session, agent-device home first also lands on the home screen, but open com.apple.springboard is what actually binds the session to SpringBoard for selector-driven commands.

‎test/skillgym/suites/agent-device-smoke-suite.ts‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,33 @@ Do not combine final commands with shell operators such as &&, ||, pipes, or sem
26242624
],
26252625
forbiddenOutputs: [plannedCommand('longpress'), RAW_COORDINATE_TARGET, /--surface menubar/i],
26262626
}),
2627+
makeCase({
2628+
id: 'ios-system-ui-springboard-widget-add',
2629+
contract: [
2630+
'Platform: iOS',
2631+
'App name: Agent Device Tester',
2632+
'Bundle identifier: com.callstack.agentdevicelab',
2633+
'Session: catalog',
2634+
'Agent Device Tester is already open on this session; its widget-ready state is prepared',
2635+
'agent-device open com.apple.springboard --platform ios binds the session to SpringBoard for selector-driven commands; there is no separate widget/system command',
2636+
'Entering SpringBoard edit mode needs one deliberate empty-space long-press on the home screen; there is no selector for it',
2637+
'The widget-gallery search-result row for "Calendar" currently returns an unlabeled accessibility node, so select it by coordinates read from a screenshot',
2638+
'SpringBoard control labels vary by iOS version and locale; discover them from a fresh snapshot -i instead of assuming fixed English strings',
2639+
],
2640+
task: 'Plan the commands to open SpringBoard, enter edit mode, search the widget gallery for "Calendar", add it using the documented coordinate fallback for the unlabeled search-result row, reopen Agent Device Tester to resume app automation, and close the session.',
2641+
outputs: [
2642+
plannedCommand('open com.apple.springboard'),
2643+
/--platform ios/i,
2644+
/snapshot\b[^\n]*-i\b/i,
2645+
plannedCommand('longpress'),
2646+
/(?:^|\n)(?:agent-device\s+)?screenshot\b/i,
2647+
RAW_COORDINATE_TARGET,
2648+
/label=["']Add Widget["']/i,
2649+
plannedCommand('open com.callstack.agentdevicelab'),
2650+
plannedCommand('close'),
2651+
],
2652+
forbiddenOutputs: [plannedCommandAlternatives(['widget', 'widget add']), /widget\s+add/i],
2653+
}),
26272654
makeCase({
26282655
id: 'replay-maintenance-update',
26292656
contract: [

‎website/docs/docs/commands.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ For CLI-discoverable setup guidance, run `agent-device help physical-device`.
10391039
10401040
For CLI-discoverable workflow guidance, run `agent-device help ios-system-ui`.
10411041
1042-
- `agent-device open com.apple.springboard --platform ios` binds the session to SpringBoard on a simulator or physical device today; there is no separate widget/system command.
1042+
- `agent-device open com.apple.springboard --platform ios` binds the session to SpringBoard today; this is verified on iOS simulator only. Physical-iPhone SpringBoard support is not yet verified — see [#1296](https://github.com/callstack/agent-device/issues/1296).
10431043
- The full widget add/edit/remove flow is selector-driven from a fresh `snapshot -i`, except two coordinate-based steps: the empty-space long-press that enters edit mode, and (until fixed) the widget-gallery search-result rows, which currently return unlabeled accessibility nodes.
10441044
- SpringBoard labels vary by iOS version and locale; discover them from the current snapshot rather than hard-coding strings like `Edit` or `Add Widget`.
10451045
- Reopen the app bundle under test to return to normal app automation after a SpringBoard step.

0 commit comments

Comments
 (0)