Repository navigation
Commit 19cb1fd
authored
fix(ios): report capture refusals as typed reasons in back-fallback and recording (#2766)
* fix(ios): report capture refusals as typed reasons in back-fallback and recording
#2741 routed screenshots through the resolved app display but left two
failure contracts papered over (#2728):
- The in-app `back` coordinate fallback read a nil screenshot sample as "no
visual change" and sampled SpringBoard when the app resolved no window, so
a two-home-screen comparison reported "in-app back control is not
available" after a real leading tap had already run. The check now observes
only the app's own resolved window and reports the display refusal as an
unverified outcome; an observable no-change still reads as unavailable.
- `record start` collapsed every no-frame bootstrap into an untyped NSError.
It now surfaces the shared APP_SCREEN_* reason, so a runtime with no
resolvable window fails closed with a typed code.
Refuse a zero-pixel capture at the capture type so a required consumer cannot
mistake it for a usable frame. macOS/tvOS keep their host-display capture and
generic bootstrap error. Focused runner unit tests pin the observation split,
the refusal-selection, and the typed-vs-generic error mapping.
* test(ios): pin the capture-refusal contracts behind the code that produces them
- testRecordStartThrowsTheCaptureRefusalItReceived drives ScreenRecorder.start
with an always-refusing capture and maps the actual thrown error through
recordingStartErrorPayload, so the bootstrap forwarding is covered (iOS PR lane).
- navigationFallbackSample(resolvingApp:systemSurface:encoding:) now holds the
back fallback's app-only decision; the test hands it a system surface that fails
if consulted, so a revert to SpringBoard sampling turns it red.
- navigationVisualSample + inAppBackOutcome keep the refusal->code mapping and the
unknown-outcome decision testable on the macOS host lane.1 parent 9918e72 commit 19cb1fd
9 files changed
Lines changed: 486 additions & 91 deletions
File tree
- .github/workflows
- apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests
- UnitTests
- docs/adr
- packages/platform-apple/src/runner
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
57 | 72 | | |
58 | 73 | | |
59 | 74 | | |
| |||
103 | 118 | | |
104 | 119 | | |
105 | 120 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
143 | 151 | | |
144 | 152 | | |
145 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1466 | 1466 | | |
1467 | 1467 | | |
1468 | 1468 | | |
1469 | | - | |
| 1469 | + | |
| 1470 | + | |
1470 | 1471 | | |
1471 | 1472 | | |
1472 | 1473 | | |
1473 | 1474 | | |
1474 | 1475 | | |
1475 | | - | |
| 1476 | + | |
1476 | 1477 | | |
1477 | 1478 | | |
1478 | 1479 | | |
| |||
2120 | 2121 | | |
2121 | 2122 | | |
2122 | 2123 | | |
2123 | | - | |
| 2124 | + | |
| 2125 | + | |
2124 | 2126 | | |
2125 | 2127 | | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
2126 | 2137 | | |
2127 | | - | |
2128 | 2138 | | |
2129 | 2139 | | |
2130 | 2140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | | - | |
54 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
58 | 72 | | |
59 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
60 | 76 | | |
61 | | - | |
62 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
63 | 91 | | |
64 | 92 | | |
65 | 93 | | |
66 | 94 | | |
67 | 95 | | |
68 | 96 | | |
69 | | - | |
| 97 | + | |
70 | 98 | | |
71 | 99 | | |
72 | 100 | | |
| |||
0 commit comments