Skip to content

fix(desktop): verify focus before pressing editable fields - #120

Merged
iamnbutler merged 4 commits into
mainfrom
codex/webkit-desktop-focus
Oct 5, 2026
Merged

iamnbutler merged 4 commits into
mainfrom
codex/webkit-desktop-focus

Conversation

@iamnbutler

@iamnbutler iamnbutler commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Single element clicks on editable Accessibility text fields now use verified focus before AXPress. WebKit can accept AXPress on a contenteditable without focusing it, leaving subsequent keyboard operations without a usable receiver (#106, part of githubnext/ace2#8).

Native focus writes run off MainActor while retaining the operation lane until completion, so Ace can service its own Accessibility request. Ambiguous write failures stay indeterminate, with no second input path. Exact process/window/element checks and normal button presses are preserved. Coordinate occlusion and paste/type behavior in githubnext/desktop-tools#5 remain separate work.

Validated on frozen 9374d8001211968aae8f12b03c7e598e093578b0:

  • Types, formatting/lint, independent source review, signed normal development build, strict app/client/launcher signatures, and GitHub CI pass. Uses the shared development identity and existing grants from fix(desktop): share one development permission identity #123.
  • A real signed WKWebView fixture verified focus once, already-focused no-op, ordinary button activation, and pre-dispatch cancellation. Its text and key/input/paste/submit counters stayed unchanged.
  • A real OpenAI channel run performed inspect → one element focus → inspect. Exact tool results/images and usage survived an actual worker exit/reopen with no new native calls, provider usage or fixture input.
  • The actual isolated Ace composer changed from isFocused=false to true with a confirmed Accessibility focus write. Its default draft and empty channel history/usage remained unchanged. The saved AX values were independently checked after correcting a helper assertion's property path; no input was repeated.

The stale-window check retained its original conservative unknown result after a verified move; fixture counters confirmed no input and no retry occurred. Source inspection locates this unchanged classification before the new focus path. In-flight cancellation is not claimed. First native inspection of fresh WebKit processes still exposed only chrome nodes; one later read-only inspection exposed the field (#64), so this PR does not claim to fix initial AX availability.

Cleanup is complete: both disposable fixture processes, all model/self-check workers, both temporary channels/projects, and the normal development runner, GUI and source host are closed or removed; its listener is gone. The separate githubnext/desktop-tools#5 point-click observation remains outside this PR.

Built in Ace

Nate explicitly allowed direct tools for this githubnext/ace2#8 pass. Codex shell/file tools and review agents implemented, inspected and built the change; GitHub CLI updates the PR. Validation used the actual signed Ace bridge, normal isolated development runner and real Ace channel/provider. Codex computer use opened only the disposable self-check channel; the focus under test was sent through Ace's native tool. The capability gap is githubnext/desktop-tools#5; external harness support remains #9. No installed development app or Canary data was changed.

@iamnbutler
iamnbutler marked this pull request as ready for review October 5, 2026 21:26
@iamnbutler
iamnbutler merged commit 62182fc into main Oct 5, 2026
1 check passed
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