fix(track): VS Code caret via the MSAA system caret; no tracking stall on a blocking app (#367) - #368
Merged
Merged
Conversation
Maxaubert
force-pushed
the
fix/365-caret-switch-java
branch
from
October 4, 2026 08:37
ab27217 to
4c822a3
Compare
…l on a blocking app (#367) VS Code's native-edit-context element pins its UIA caret to the line start; for that class only, Chromium's OBJID_CARET on the same line wins. UIA calls are capped at 500 ms, and with focus-following off a Win32-caret app skips GetFocusedElement, which blocked 3 s at Notepad's activation. Resolves over 200 ms are logged with the phase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
…eadline (#367) GetFocusedElement ignores the UIA timeouts and blocked 3 s at Notepad's activation when no Win32 caret existed yet, freezing all tracking. It now runs on a "Wind focus lookup" thread; the tracker waits 150 ms and resolves without UIA otherwise, never stacks lookups on a stuck app, and reuses a late answer under 250 ms old for the same window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
Maxaubert
force-pushed
the
fix/367-vscode-caret
branch
from
October 4, 2026 08:39
bc116de to
c5197d9
Compare
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.
Closes #367. Stacked on #366 (which is stacked on #364).
1. VS Code caret.
native-edit-context). Its UIA caret and selection stay at the start of the line wherever the caret is, so Wind only followed line changes.OBJID_CARET) tracks it exactly:msaa-editcontext).2. Tracking stalls.
GetFocusedElementignores that cap: it blocked for 3 s at Notepad's activation. It now runs on aWind focus lookupthread:slow resolvewith the phase.Lookup thread verified (runs 28 to 32, 30 switches per app):
Verified on the signed UIAccess build
Scripted app switches, 6 per app per run, typing, Home and End right after each switch, with trackLog.
No stall over 1 s in runs 21 and 22.
build.bat test: 572/572 pass.Version 0.23.3.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG