Repository navigation
fix(desktop): report clicks on an already moved window as refused - #187
Merged
Merged
Conversation
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If an exact window has already moved or resized since its snapshot was taken, a click now reports
refusedinstead ofunknown, because nothing was sent. A window change detected after an input route has started still reportsunknown.Closes #155. Related: githubnext/ace2#8, githubnext/desktop-tools#2.
Why only the prepare check
Click preparation checked only the process generation. A coordinate click resolves no element, so the action-first executor falls back to synthesis. The first exact-window check then ran inside that route, in
performClick, and threw an untyped stale error. The bridge mapped that tomay_have_dispatched.The route check itself can't become a refusal. A route can follow an earlier Accessibility attempt that may have sent input; for example, a failed right-click
AXShowMenubecomes fallback-eligible. Instead,peekaboo-stale-click.patchadds one exact-window check to the click'spreparestep.prepareruns once, before any strategy route, and the fallback never reruns it. A mismatch there throws a typedpreDispatchRefusalwithtarget_unavailable,SNAPSHOT_STALE, a refresh hint, and the captured window target.Unchanged: every route and post-dispatch check, the long-press exemption, process-generation checks, and existing receipt layers. The signed outer receipt stays targetless. There is no new API or store.
Validation
The real run used a signed Ace-dev build of
1a09f3con its own profile, driven by a real Anthropic channel. Exported signed receipts and the loaded dylib confirm the patched build handled every action.refused, dispatchnone, safe to retry,SNAPSHOT_STALE, with the captured window identity. The fixture recorded no input, effect, or activation. A fresh inspect and click in the same process produced exactly one effect.Real Menuelement. The fixture enteredAXShowMenu, moved its window, and opened a real menu. Result:unknown, retry unsafe, "final target identity validation failed".bun run ciandbun typespass. The 15-patch stack applies to pinned Peekaboo 4.8.0.Limitations:
AXShowMenuhandler that returned false, so that run only shows the menu action was entered and reported as sent, with unsafe retry.unknown.Built in Ace
Implementation, build, real validation, and this PR were done in this Ace channel, with validation through an Ace-dev channel. The root session and the read-only source and evidence reviews ran in Codex, which Ace can't yet run (#9). Nothing else was used outside Ace.