Skip to content

decide: avoid duplicate back action for on-screen button - #46

Open
charan-rathore wants to merge 1 commit into
awlevin:mainfrom
charan-rathore:fix/go-back-duplicate-40
Open

charan-rathore wants to merge 1 commit into
awlevin:mainfrom
charan-rathore:fix/go-back-duplicate-40

Conversation

@charan-rathore

Copy link
Copy Markdown
Contributor

Summary

Fixes #40. When the current screen already has a labelled accessibility button named Back or Go Back, the classifier no longer offers the separate keyboard go_back kind alongside click_item. The button stays in the item choices, so the next action can click it without splitting the kind vote against a duplicate path.

This applies only to an on-screen AX button. OCR-only text, links, other button labels, and screens with no Back button keep go_back. No action implementation or screen capture changes.

Tests

  • Regression test of decide()'s actual kind criteria: failed on base with go_back still offered alongside Go Back; passes on this change.
  • Negative controls for OCR-only Back, link Back, and Back to top button.
  • Full suite: 614 passed, 3 skipped, 1 xfailed (python -m pytest -q, Linux).
  • Ruff check and format clean for both touched files. No live System Settings replay on macOS.

Instinct assisted with the implementation and tests.

@charan-rathore

Copy link
Copy Markdown
Contributor Author

This is green on CI and conflict-free on my end. Is there anything you'd like changed before it can land? Happy to adjust.

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.

go_back overlaps an on-screen Back button

1 participant