Repository navigation
fix: inspect windows whose title changes during the read - #26
Merged
Merged
Conversation
desktop_inspect in Accessibility mode on a Chrome window whose page title changes every 2 s always failed with "The desktop observation provider returned inconsistent response evidence: window-context window title." (githubnext/ace#427, D7 and R1). The observation resolver takes the window's title from WindowServer, and the detached Accessibility traversal reads kAXTitle again later; the Bridge binding validator required the two to be equal, so any live title (unread counts, timers, chat) made the window uninspectable for input. Pixels mode has no traversal and passed. A new last patch, peekaboo-title.patch, compares a window context's title only when the context names no window. A context with a window ID is already pinned to the target by that exact ID, its WindowServer receipt (owner PID, process generation, bounds) and bounds, and the traversal selects its AX window by the same ID. The resolved target keeps its title, and the client now reports the traversal's newer title. Input actions bind by window ID, receipt and focused-element identity, never the window title, so they need no change. Why: native/patches/peekaboo-title.patch | A window context's title is skipped only when its window ID matches the target; a context without a window ID must still match the title, and window ID, receipt, bounds and process generation stay exact.
This was referenced Oct 15, 2026
iamnbutler
added a commit
that referenced
this pull request
Oct 17, 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.
In the Ace desktop tools study (githubnext/ace#427, D7 and R1),
desktop_inspectin Accessibility mode on a Google Chrome window whose page title changes every 2 s always failed with "The desktop observation provider returned inconsistent response evidence: window-context window title." It failed twice in a row on Canary with 4618b33. Pixels mode worked. Any web app with a live title (unread counts, timers, chat) could not be inspected for input. Tracks #6.Cause. The observation resolver takes the target window's title from WindowServer. The detached Accessibility traversal then reads
kAXTitleagain from the AX window it selects by exact window ID, and puts that title in the elements' window context.PeekabooBridgeDesktopObservationBinding.validateWindowEvidencerequired every window context's title to equal the resolved target's title, so a title that changed between the two reads failed the whole observation. Pixels mode has no traversal, so it passed.Fix. A new last patch,
peekaboo-title.patch, compares a window context's title only when the context names no window. A context with a window ID is already pinned to the target:_AXUIElementGetWindowmatch for that ID and checks the process generation before and after.A title adds nothing to that. A context without a window ID still has to match the title, and the capture's title check is unchanged (the capture reuses the resolved title). The resolved target keeps its title. The client's
window_titlenow reports the traversal's newer title when there is one.Input actions. None of them compare the window title. Snapshot-based clicks, inserts and keys bind by window ID, the
WindowMutationIdentityreceipt (PID, generation, bounds) and focused-element identity.AutomationElementResolveruses the title only when the context has no window ID. The focused-element receipt compares the element's own title, not the window's. So nothing else needed changing.Verification
node dist/build.js --out … --scratch …builds with the full stack, including the client change.PeekabooCoreswift test:PeekabooBridgeObservationTitleChurnTests(stub services): a PID + window-ID Accessibility observation whose traversal title changed passes live (handleAuthorized) and offline (signed receipt) validation and returns both titles. A changed title with no window ID is still rejected (window-context window title), and so is a different window ID. Both tests fail without the fix.PeekabooBridgeTests(115 tests) and everyPeekabooTests.PeekabooBridge*Observation*suite (65 tests) pass.npm run check(dist matches tsc).