Repository navigation
Fix blank Mac keyboard predictions - #814
Merged
Merged
Conversation
added 2 commits
September 20, 2026 20:29
Resolve the focused element through the foreground application, reject focus changes during discovery, and prefer the bundled prediction database in transferred debug builds.
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.
Mac keyboard predictions remained blank in TextEdit because the prediction subprocess could not resolve the system-wide focused Accessibility element. In the VM it consistently returned
kAXErrorCannotComplete(-25204), despiteAXIsProcessTrusted()returning true. The worker now resolves the foreground application's focused element and rejects foreground changes during discovery. Because the pipe-driven worker has no AppKit event loop, it also processes pending foreground notifications with a zero-duration run-loop pass before each PID query. Existing protected-field, context and acceptance validation remains in place.Transferred debug bundles now prefer their bundled database, retaining the source-tree fallback for unbundled development. Previously they always referenced the build machine's absolute source path.
Closes #813.
Validation:
I would like waproduced water/watching/walking/washington/war. One Select insertedteronce; subsequent next-word suggestions appeared, manual Next retained the same suggestions, and selectingandinserted it once. TextEdit retained focus. No new Accessibility permission was required. Temporary content-free diagnostics were removed from this change.e69ae16: repeated the TextEdit prefix completion, closed the disposable document, and compared its saved bytes to exactlyI would like water(including one trailing space): passed.e69ae16fd57a8c69056a427bdd3247f0b4805da9: no actionable findings. All latest-head CI checks passed, including Mac and Windows native tests and packaging, frontend, dependency audit and CodeQL.This fixes ordinary Mac context-based predictions independently of the unmerged buffer fallback in #812. No merge or release is included.