Activate lazy Chromium/Electron accessibility trees for Edit Mode (fixes #237)#265
Open
swimmer-303 wants to merge 1 commit into
Open
Activate lazy Chromium/Electron accessibility trees for Edit Mode (fixes #237)#265swimmer-303 wants to merge 1 commit into
swimmer-303 wants to merge 1 commit into
Conversation
Chromium-based apps expose no AXSelectedText until a client opts in, so Edit Mode silently fell back to dictation and overwrote selections in VS Code, Gmail-in-Chrome, and other Electron apps. Set Electron's AXManualAccessibility on the frontmost app before reading the selection (harmless where unsupported), plus Chromium's AXEnhancedUserInterface for known browsers only, since that attribute can interact badly with window-manager utilities. The first read after activation gets one 100ms retry because the tree builds asynchronously. Fixes zachlatta#237 (cherry picked from commit 9bb20c7)
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughFreeFlow now activates the frontmost Chromium or Electron app’s accessibility tree before reading selection context, retries an initially unavailable selection after activation, and documents the Edit Mode fix for affected applications. ChangesSelection accessibility handling
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Split out from #254.
Chromium-based apps build their accessibility tree lazily, so
AXSelectedTextreads failed and Edit Mode fell back to dictation — overwriting the user's selection in VS Code, Gmail-in-Chrome, etc. FreeFlow now sets Electron'sAXManualAccessibilityopt-in on the frontmost app before reading the selection (harmless no-op elsewhere), plus Chromium'sAXEnhancedUserInterfacefor known browsers only (scoped narrowly since that attribute can interact badly with window-manager utilities). The first read after activation gets one 100 ms retry because the tree builds asynchronously.Fixes #237
🤖 Generated with Claude Code
Summary by CodeRabbit