Repository navigation
Conversation
When another package (for example System UI) shows "isn't responding", the blocking-dialog guard refused every command, including a press on the dialog's Close app or Wait button, so the dialog could not be dismissed. A single press or click is now admitted when its final tap point lies inside one of the framework app-error dialog buttons (android:id/aerr_*) that are visible and not covered. Every other input is still refused with dispatched: no. After the admitted tap, the guard waits for the dialog focus to clear before its after-command check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on tap The dialog-button exception read the button rectangles at the readiness check, before target resolution. If the dialog closed in between, a tap at a stored button point reached whatever the dialog uncovered and was reported as a success. The gate now reads the focus again immediately before the send. When the dialog no longer has focus, the tap is refused with dispatched: no. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…utton tap Android removes the app-error dialog window asynchronously, so the first focus reads after the tap can still show it. No test held the wait that covers this: the press fixture cleared the focus at the tap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dialog-button exception still required the English "isn't responding" title in the snapshot. On a device in another language, the guard detected the ANR window from its fixed window title, but found no buttons, so a press on the dialog's own Close app button stayed refused. The focus read already identifies the ANR window, so the buttons are now found by their framework resource id alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts hit area The dialog-button exception used the shared inclusive containsPoint, so a raw-coordinate press on the pixel just past a button's right or bottom edge was admitted. Android's view hit test excludes those edges, so the tap reached the dialog around the button and closed nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ommand ADR 0039 requires dispatched: no for a refusal before any send. The blocking-dialog guard's before-command refusal for a foreign dialog left the field unset, so the request disclosure layer reported dispatched: unknown for a mutating command, while the dialog-button gate's own refusal of the same press already reported no. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…older tree The dialog-button exception checked only the tap point. An app @ref from a snapshot taken before the ANR dialog appeared resolves on that older tree. When its point fell on Close app or Wait, the gate admitted it, the tap closed the dialog, and the response reported a press of the app's own control. The gate now also requires the point to be a dialog button in the tree the target was resolved on. A raw coordinate has no such tree and keeps the point-only check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…og-button tap The focus read just before a dialog-button tap reported a probe that answered nothing as "lost focus", although the dialog may still be up. A read that threw (for example, the device went offline) reached the request disclosure layer as dispatched: unknown, although nothing was sent. An unanswered read now says that focus could not be read, and a thrown read is disclosed as dispatched: no. Tests also cover a different dialog taking the focus before the send. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The alert handler recognizes the app-error dialog by its English labels only, so on a device in another language `alert dismiss` finds no alert. A press on one of the dialog's buttons works in every language, so the hint names only that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the snapshot read for the dialog's buttons failed, the tap was refused like a dialog without buttons, and the read error was dropped. The refusal stays, and the read failure is now recorded as a diagnostic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its or refuses Only a repeated press was tested. A double tap and a multi-ref plan are refused for the same reason, and click is admitted like press; a change that dropped any of these checks passed every test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… trees The check against the tree a target was resolved on accepted any app-error dialog button at the point. When the dialog's buttons moved after the snapshot, for example after a rotation, a Wait ref whose old point now lies on Close app was admitted, and the tap killed the app that the agent meant to wait for. Each admitted button now keeps its framework resource id, and the button at the point must have the same id in both trees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssed Every foreign-dialog refusal told the agent to press Close app or Wait. When the guard found no button to admit, every such press is refused the same way: before Android 7.0 the dialog's buttons carry no aerr_ ids (the snapshot helper supports API 23), and a failed snapshot read admits no button. The agent then looped on the same refusal. These two refusals now keep the earlier recovery hint: wait, close the dialog, restart the app, or reboot the emulator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al time The test for the wait after a dialog-button tap slept through two real 500 ms focus polls. The repository keeps unit tests off real time, so the file now mocks the poll's sleep, as the replay-divergence tests do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A single click or press can now close another app's "isn't responding" dialog, while every other input stays refused. Neither the press and click help nor the command reference said so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The conditional spread that handed admitTap to the interaction runtime raised dispatchRuntimeInteraction's cognitive complexity to 16, over the fallow limit of 15. The runtime already treats an undefined admitTap as absent, so pass the optional value directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The press note added for a foreign ANR dialog raised the always-loaded MCP tools to 23,180 bytes, over the 23,040-byte budget, and repeated a search keyword. Shorten it to one clause without words from the search hints. The refusal hint still tells the agent which buttons it may press. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A press the foreign-dialog guard refused, such as a stale Wait ref after a rotation or an app ref from before the dialog appeared, got the hint "Press one of the dialog's buttons", which the agent believes it just did. Start the hint with a new snapshot so the next press uses a current ref. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The paragraph said every command refuses while the dialog has focus, but snapshot, screenshot, open, and close still run, and the same paragraph tells the reader to take a snapshot. Name the input commands instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 10 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Thanks for the fix. At db76959, an open high-priority thread still needs a change: dialog button allowlist. The answers to these questions decide whether the change fits the project:
Could the check run once, before dispatch, on the resolved node, while keeping These other high-priority threads also still apply: refusal test assertions, post-tap app check, refusal hint wording, and hold and jitter. This wording thread does not apply and can be resolved, because "tap" accurately describes the single press that is admitted. The required evidence is in place. The live emulator run and Not verified here: device behavior (this was a read-only review); whether Android captures during a foreign ANR return nodes from the underlying app window, which affects whether the first thread's case is reachable in production; and which The only non-passing CI jobs are two cancelled Body rules runs. This is likely unrelated to the code, since that check reads the PR description and such runs are typically replaced after description edits. Their logs were not available, so a fresh Body rules run at this head would confirm it. Before merge, the dialog button allowlist thread must be resolved. |
|
Note This text was drafted with AI and posted after human approval.
Thanks for the review. Answers to your questions:
I'll rework it the way you describe:
The same push addresses the other threads, and I'll attach the emulator and |
|
Thanks, this answers the fit questions. A System UI ANR on a local emulator that blocks every press, including the press on its own Close app button, with no way out through restart or cold boot, is a real dead end, and keeping the caller in control of that press preserves the #592 rule that agent-device never closes a foreign process by itself. The smaller shape described above covers it: one check before dispatch on the resolved node, only |
…atch The dialog-button exception checked the tap point inside the backend, through an admitTap seam on InteractionRuntimeInput, compared the point in two trees, and counted taps. Review asked for a smaller shape. The check now runs once in readiness, before dispatch. It admits only the ANR dialog's Close app and Wait buttons (android:id/aerr_close and android:id/aerr_wait) in a fresh capture. A ref must name one of them, and the button with the same id must contain the ref node's center, so a ref read before the dialog appeared, or a Wait ref whose stored position now shows Close app, is refused. A raw point must be inside either button, and a selector is refused. The focus is then confirmed once more before the command runs. The admitTap seam, the dual-tree comparison, and the tap counter are gone: the press shape check already guarantees one tap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dialog-button exception admitted a press with --hold-ms or --jitter-px. A hold is not the single tap the exception allows, and jitter can move the contact off the checked button. Admit only a press with neither. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A press admitted on a foreign ANR dialog skipped the check that the session app is still in front. Closing the dialog can reveal the launcher or another app, and that check is what reports it. Run the check after a dialog-button press too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efusal The refusal's default hint said to press a dialog button ref. Only a press or click can reach the buttons, so a swipe, fill, or generic command got advice it cannot follow. Keep the recovery steps as the default and pass the dialog-button hint only from the press path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The refusal cases checked only dispatched: no and that no tap was sent, so an unrelated refusal could make them pass. Assert the focused package and window as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The press exception now admits only Close app and Wait, by ref or by coordinates, and refuses a hold, jitter, and a selector. Say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The foreign ANR dialog check looked the ref up in session.snapshot, but the runtime taps the ref's node in the authorized ref frame (ADR 0014), and a find match taps its own node. A read after the dialog appeared, such as a screenshot, replaces session.snapshot without a new frame. A ref issued on the app screen could then pass the check as Close app and tap the app's button, which nothing checked. Read the node the runtime will tap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment said the focus is read again just before the tap is sent. It is read as the last step of readiness, before ref resolution and the send. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ANR dialog (AppNotRespondingDialog) names its Close app and Wait buttons android:id/aerr_close and android:id/aerr_wait, not android:id/button1..3. The helper's content classifier and alert detection knew only button1..3, so a capture that held only the ANR dialog was classified as system windows only. Recognize both ids, and model the provider fixture's ANR dialog with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
App-owned ANR recovery matched the English "Close app" label, so it could not recover on a device in another language. Read the button by android:id/aerr_close through the same reader as the press exception, and delete ANDROID_CLOSE_APP_PATTERN. The unit fixtures now carry the id the real dialog has. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note This text was drafted with AI and posted after human approval.
Pushed the rework at 0f047ad, in the shape you described. Each commit maps to one item:
The PR body has the emulator run and the |
|
Thanks for the follow-up. The points from the earlier review are resolved at 0f047ad, and no further code changes are needed. These open threads no longer apply and can be resolved: the allowlist now holds only The emulator behavior and The Body rules check was cancelled and the other 15 checks pass. The cancellation is likely unrelated to the code, since that job only reads the PR description; its log was not available. Before merge, Body rules needs a fresh green run on this commit. |
Summary
While another package's Android "isn't responding" dialog has focus, the blocking-dialog guard refuses every input, including the dialog's own Close app and Wait, so an agent cannot dismiss it. #592 recovers only app-owned ANRs.
Now one plain
pressorclick(count 1, no double tap, hold, or jitter) passes when it aims at the dialog'sandroid:id/aerr_closeorandroid:id/aerr_waitin a fresh capture: a ref's node in the tree the runtime taps from, or a raw point inside either button. Focus is then confirmed again. Selectors and other inputs refuse withdispatched: no.App-owned recovery now finds Close app by the same id, in any device language.
Before / after
System UI frozen with
SIGSTOPuntil its ANR dialog has focus, API 36 emulator:24f8181c30f047ad15press @e2(Close app)Android system dialog is blocking pressTapped @e2, Settings gets focuspress 540 1600(outside)Not dispatched, hint names Close app or WaitValidation
Emulator run at
0f047ad15,android-helperbackend 0.21.44-dev:pnpm check:affected --run --head 0f047ad15,exactCommit: true:aerr_ids; the guard still refuses there.🤖 Generated with Claude Code