You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fc59620
Browse filesBrowse the repository at this point in the historyBrowse files
feat(action-button): press the iPhone Action Button (callstack#2702)
* feat(action-button): press the iPhone Action Button
Add `agent-device action-button` and `client.command.actionButton()`: one
press of the iPhone/iPad Action Button, shaped like `home` rather than
`tv-remote`. XCUITest exposes `XCUIDevice.press(.action)` with no hold
duration, so there is no `long-press` and no `--duration-ms`, and the slide
surface on the same edge belongs to Camera Control, which this command does
not drive.
The press is declared as a runner-lifecycle command on the Swift side so the
app-activation preflight cannot foreground the app the press is meant to
leave alone, and no post-action observation is declared. Which model actually
carries the button is not in `DeviceInfo`, so the Apple fact claims the
iPhone/iPad leaf and the runner answers for the hardware with
`hasHardwareButton(.action)`, reporting a typed `UNSUPPORTED_OPERATION`.
Every other platform states its own refusal cell.
Verified on iOS Simulators: an iPhone 17 Pro press returns
`Pressed Action Button` with no runner activation for that command, and an
iPhone SE (3rd gen) refuses with `UNSUPPORTED_OPERATION` on both the CLI and
the typed client, repeatably and without invalidating the session.
Closescallstack#2699
* chore(gates): register action-button in the exports snapshot and coverage tables
The new export specifier, the six-platform coverage declaration and its evidence
rows, the per-platform classification counts, the generic-route catalog, the
runtime-binding conformance table, and the provider output guard's driven set
all enumerate the public surface, so each one names `action-button`.
* fix(action-button): keep the recorded-failure conversion on the press
`isLifecycle` does two things: it skips the app-activation preflight, and it
exempts the command from turning a recorded XCTest issue into
`XCTEST_RECORDED_FAILURE`. The press joined the lifecycle group for the first
and silently took the second, which matters most here because the press declares
no settle and no post-action observation, so that conversion was the only
evidence it landed.
The press now classifies like `home` and skips activation through
`shouldSkipAppActivationPreflight`, where `.alert` already exempts itself for
the same reason. `pressActionButton` also refuses below iOS 16 instead of
pressing a control that API cannot express there, and two Swift tests pin both
decisions where they are decided.
* refactor(action-button): declare the press through the shared zero-argument group
The press is a zero-argument interactor operation, which is a shape the contracts
already had twice over. Rather than a third module, a package subpath, and a
facts helper, `NoArgumentInteractorOperations` is declared with the other
operations and bound by `bindNoArgumentInteractorOperations` next to the two
interactor sources; owners state their `actionButton` cell the way they state
`ensureReady`, and the catalog gains a row, not an import.
That removes the four eager-closure growths this PR caused and the extra export
surface. Two follow-ups from the same review: the provider fixture now reads the
kernel rule the Apple fact reads instead of restating the iOS/iPadOS compare, and
the runner protocol fixture test checks itself against the trait manifest — the
exhaustive runner-command declaration — instead of a second hand-maintained list
that had already pushed the file past its size tripwire.
* docs(action-button): claim only what a simulator can prove
The description told agents that an assigned Shortcut or App Intent fires
whatever the app's state. Simulators run neither, so nothing in this PR can show
that; the command proves the press was dispatched and that the session app was
not brought forward. The help text, `commands.md`, and a CHANGELOG entry now say
exactly that, and name a physical iPhone as the only place delivery is verifiable.
* chore(gates): drop the contracts action-button export subpath
The generated contracts export snapshot returns to its merge-base enumeration now
that the press declares itself through an export the closures already evaluate.
* refactor(contracts): keep the interactor binding module a leaf
Layering R10 counts the largest type-level cycle, and a type-only import of
`platform-runtime-operations` from `interactor-operation-binding` pulled the six
interactor-backed runtime modules into it (baseline zero). The catalog already
imports that type, so the zero-argument group's binder moves there — the one
module that already knows both the operations catalog and the interactor
sources — and the binding module keeps its two imports.
This commit supersedes the binding placement in 267c5c0, which was never pushed.
0 commit comments