fix(focus): prime Obsidian's Electron accessibility tree so suggestions work (#791) - #825
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughBrowser detection now recognizes Obsidian as an Electron editor. Obsidian activates web accessibility priming, and tests cover case-insensitive bundle matching, priming, and web-content classification. ChangesObsidian Electron support
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Obsidian is now recognized as an Electron editor so its accessibility tree is primed and suggestions can operate in its editor. The targeted behavior and regression coverage are in place, with no remaining merge-readiness risk identified. Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
…Jacob#791) Obsidian (md.obsidian) was missing from BrowserAppDetector's Electron-editor allowlist, so Cotabby never set AXManualAccessibility on it and its CodeMirror editor stayed invisible to the focus tracker ("No focused Accessibility element"). A read-only AX probe of Obsidian 1.12.7 / Electron 39 confirmed the app element advertises the attribute. Same shape as the VS Code fix (FuJacob#671). Tests: BrowserAppDetectorTests and WebContentFieldDetectorTests gained md.obsidian cases (red before, green after); full suite 1785 passed / 6 skipped / 0 failed.
1a738a9 to
853eef4
Compare
Summary
Obsidian (
md.obsidian) was missing fromBrowserAppDetector.electronEditorBundleIdentifiers, so Cotabby never setAXManualAccessibilityon it. Electron builds its accessibility tree lazily; without that switch Obsidian's window exposes a single bareAXGroup, the system-wide focused-element query returns nil, and the focus tracker logs "No focused Accessibility element" on every tick. Adding the bundle id to the allowlist turns on the same priming, app-scoped focus fallback, descendant search and web-content caret handling that fixed VS Code in #671.Evidence: a read-only AX probe of Obsidian 1.12.7 (Electron 39.8.3 / Chromium 142) shows the application element advertising
AXManualAccessibility(settable, value 0) andAXEnhancedUserInterface, with the focused window holding oneAXGroupand three buttons, i.e. the dormant renderer view. Obsidian worked in 0.3.3 (#276) and broke in 0.6.0 when the Electron allowlist gate was introduced.Validation
BrowserAppDetectorTests,WebContentFieldDetectorTests) failed before the one-line allowlist change and pass after it.xcodebuild buildof theCotabby Devscheme: succeeded (3 pre-existing warnings, 0 errors).swiftlint lint --config .swiftlint.yml --quiet(SwiftLint 0.65.1): exit 0, no warnings on the changed files; repo-wide count unchanged versusmain(0 → 0).-cotabby-debug) and Obsidian frontmost, the log showsCHROME-PRIME enabled web accessibility for Obsidian, thenCHROME-FOCUS-PROBE resolved via hit-test for Obsidian, thenFocus snapshot changed: app=Obsidian capability=Supportedwithcaret=derived(andexact) on every resolve, i.e. the inline ghost-text path, not the popup fallback. Ghost text appears in the editor and can be accepted. Onmainthe same session logs onlyNo focused Accessibility elementfor Obsidian.Linked issues
Fixes #791
Refs #616 (ghost-text placement inside Obsidian is a separate geometry problem and is not addressed here)
Refs #626, #671
Risk / rollout notes
md.obsidian: Cotabby now setsAXManualAccessibilityon Obsidian's application element, exactly as it already does for Chromium browsers, ClickUp and VS Code. No settings, schema or pbxproj changes.md.obsidian) are covered; matching is case-insensitive and exact, so no othermd.*app is affected..estimated; that is the existingCompletionRenderModePolicybehaviour and is left for a follow-up.Summary by CodeRabbit
Bug Fixes
Tests
Greptile Summary
Adds Obsidian to the existing Electron-editor allowlist so Cotabby primes its dormant web accessibility tree and can resolve its CodeMirror editing surface.
md.obsidiancase-insensitively as a covered Electron editor.Confidence Score: 5/5
The PR appears safe to merge, with no outstanding or newly introduced actionable issues.
The current diff narrowly extends an existing Electron recovery path to Obsidian and adds aligned tests; there have been no changes since the previous review and no repository-rule violations remain.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(focus): prime Obsidian's Electron AX..." | Re-trigger Greptile
Context used: