Skip to content

refactor(dialog): consolidate accessibility traversal#288

Merged
steipete merged 1 commit into
mainfrom
steipete/dialog-traversal-cleanup
Jul 21, 2026
Merged

refactor(dialog): consolidate accessibility traversal#288
steipete merged 1 commit into
mainfrom
steipete/dialog-traversal-cleanup

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

Summary

  • move dialog graph traversal into a dedicated owner with one shared cycle-safe, early-stoppable depth-first engine
  • centralize sheet-first child ordering so each node reads accessibility children once and repeated sheet identities are queued once
  • reuse the collected button snapshot during selection instead of traversing the dialog twice
  • add deterministic coverage for sheet ordering, identity deduplication, and button selection policies

Behavior preserved

  • depth-first pre-order and first-match short-circuiting
  • direct child sheets before attached sheets before ordinary children
  • title-less dialog resolution remains attached-sheets-only
  • existing button title, identifier, default, and cancel fallback order

Test plan

  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer swift test --package-path Core/PeekabooAutomationKit --filter 'Dialog(ElementTraversal|ButtonResolution)Tests' --no-parallel
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer swift test --package-path Core/PeekabooAutomationKit --no-parallel
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer swiftlint lint --config .swiftlint.yml (13 existing non-serious warnings, none in changed files)
  • safe release checks plus swift test --package-path Apps/CLI -Xswiftc -DPEEKABOO_SKIP_AUTOMATION --no-parallel

No changelog entry: this is an internal refactor with unchanged user-visible behavior.

@clawsweeper

clawsweeper Bot commented Jul 21, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: refactor(dialog): consolidate accessibility traversal This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit b145ac1 into main Jul 21, 2026
5 checks passed
@steipete
steipete deleted the steipete/dialog-traversal-cleanup branch July 21, 2026 06:07
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