Skip to content

fix(perception): keep system dialogs clickable, only filter true status/nav bars - #181

Open
RanjithRagavan wants to merge 1 commit into
google:mainfrom
RanjithRagavan:fix/system-dialog-clickable
Open

RanjithRagavan wants to merge 1 commit into
google:mainfrom
RanjithRagavan:fix/system-dialog-clickable

Conversation

@RanjithRagavan

@RanjithRagavan RanjithRagavan commented Oct 12, 2026 •

Copy link
Copy Markdown

Hi team, when you get a chance, could someone take a look at this PR?

It's a small, contained fix (~120 lines, 4 files):
Root cause (reproduced on main): full-screen SystemUI/permissioncontroller dialogs were classified as fixed bars (no height cap), so their buttons were clamped out of the clickable set — and status-bar detection returned 2400px, shifting all OCR coordinates off-screen for the frame.

Tested: 6 new unit tests the 4 defect-demonstrating ones fail on main, pass with this fix (verified via stash round-trip). Full suite: 2499 passed, 6 skipped; ruff clean.

Value: unblocks every first-run flow nearly any real-world task hits a runtime permission dialog, and today the agent stalls there until the step budget exhausts.

Happy to add an emulator repro script or adjust the approach if you'd prefer a different direction. Thanks!

…us/nav bars

com.android.systemui was treated as a high-confidence fixed-bar identity
with no height bound, so any full-width SystemUI window anchored to the
top or bottom screen edge — including full-screen alert dialog windows
(USB debugging authorization, crash/ANR alerts) and tall bottom-anchored
dialog panels — was classified as a fixed bar. The bogus bar then made
_clamp_by_fixed_bars clamp or silently discard neighbouring elements and
shift tap targets.

Similarly, _detect_status_bar_height accepted the first systemui node
with top == 0 without a height check; a full-screen SystemUI dialog
window yielded a 2400px 'status bar', pushing every OCR coordinate off
screen in _map_coordinates_back and silently dropping all OCR results
for the frame.

- Cap fixed-bar height in all cases (<=15% of screen height at the
  bottom, <=12% at the top), even for high-confidence system packages.
- Never classify com.android.permissioncontroller nodes as bars; the
  package only owns dialogs.
- Only accept thin top-anchored strips as the status bar in
  _detect_status_bar_height, and keep scanning for the real one.

Fixes google#180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant