Repository navigation
Commit f6fc99f
feat(android): hand rotation back to the sensor with orientation auto (#3822)
* feat(android): hand rotation back to the sensor with `orientation auto`
`orientation <rotation>` on Android turns auto-rotate off and nothing turned
it back on, so one rotation left the device locked for the rest of the session
and every later one. A QA step that rotates to landscape for a full-screen
player could not leave the device as it found it, and later checks that the
app follows physical rotation ran against a locked device.
`orientation auto` binds a new `unlockOrientation` runtime
operation that writes `accelerometer_rotation=1`, reads it back, and leaves
`user_rotation` alone. It does not run the display settle loop: the sensor
decides the next rotation, so there is no target to wait for. The mode stays
out of `DeviceRotation`; it is its own argument vocabulary
(`OrientationRequest`) and its own admission cell, so every rotation reader and
provider keeps its one-to-one rotation mapping. Only ADB-backed Android (local
and Limrun) declares the operation; every other owner refuses `auto` with
`UNSUPPORTED_OPERATION` before binding.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YCtjQqvC57Xaa9PMVF34c8
* refactor(orientation): shrink orientation auto to its owning seams
Cut the change to what `orientation auto` needs:
- `orientationRuntimeOperationFacts` refuses `unlock` by default, so only
owners that serve it (ADB-backed Android, local and Limrun) declare it;
Apple, web, HarmonyOS, WebDriver, and Limrun iOS need no edits and the
refusal hint has one owner.
- `parseOrientationRequest` wraps the unchanged `parseDeviceRotation`.
- `unlockAndroidOrientation` is the single `settings put`; the read-back
nobody asked for is gone.
- The daemon adds an `auto` branch and leaves the rotation path untouched.
- Drop the dedicated unlock binder tests the catalog conformance row covers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YCtjQqvC57Xaa9PMVF34c8
* fix(orientation): keep the orientation facet's eager closure type-only
The default unlock refusal and the method guard were static value imports,
so importing `orientation-runtime.ts` evaluated seven more modules than at
the merge-base. Declare the refusal as a frozen literal and reach
`requireInteractorMethod` through a function-scoped import, as the
keyboard, clipboard, alert, and settings facets do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YCtjQqvC57Xaa9PMVF34c8
* fix(orientation): classify the unlock refusal as runner-free on Apple plans
Every Apple leaf refuses orientation auto at admission, so no plan step can
wait on the runner for unlockOrientation. Classify it like sendTelephonyEvent,
which states the same rule, and cover it in the runner-free plan test.
* refactor(orientation): project both orientation intents through one builder
The auto branch restated the appBundleId and execution projection that the
rotation path already owned. One builder, two callers.
* test(orientation): drive the unlock refusal through the conformance matrix
The orientation auto argument is its own admission cell on the orientation
descriptor, so it owes its own conformance row plus a refusal assertion on
each owner that never declares the cell.
* refactor(contracts): keep parseDeviceRotation module-private behind parseOrientationRequest
The facade re-export lost its last production consumer when the orientation
command switched to parseOrientationRequest, so the production-exports gate
flagged it. Fold its tests into the public entry and drop the re-export.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 16d7041 commit f6fc99f
41 files changed
Lines changed: 314 additions & 58 deletions
File tree
- packages
- command-registry/src
- contracts/src
- facades
- daemon/src
- __tests__/support
- core
- execution
- __tests__
- sessions
- __tests__
- handlers/__tests__
- platform-android/src
- __tests__
- platform-apple/src
- platform-harmonyos/src
- platform-vega/src
- platform-web/src
- provider-limrun/src
- provider-webdriver/src
- session-journal/src
- __tests__
- test-kit/src
- src
- commands
- schema
- system
- core/interactors
- mcp/__tests__
- website/docs/docs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
1500 | 1500 | | |
1501 | 1501 | | |
1502 | 1502 | | |
1503 | | - | |
| 1503 | + | |
1504 | 1504 | | |
1505 | | - | |
| 1505 | + | |
1506 | 1506 | | |
1507 | 1507 | | |
1508 | 1508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
407 | 409 | | |
408 | 410 | | |
409 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | | - | |
| 41 | + | |
33 | 42 | | |
34 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
| |||
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
45 | | - | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
0 commit comments