Repository navigation
fix(focus): prime the Claude desktop app's Electron accessibility tree (#861) - #882
Shen-Yukang wants to merge 1 commit into
Conversation
FuJacob#861) Claude desktop (com.anthropic.claudefordesktop) is a stock Electron app (Electron 44 / Chromium 152 as of Claude 4.29). Its composers, both chat and the Code tab, are contenteditables that only resolve once AXManualAccessibility wakes the renderer, and ChromiumAccessibilityEnabler only sets that flag for allowlisted bundles. Add Claude to the Electron editor allowlist, the same fix Obsidian got in FuJacob#825. Tests cover the new entry and keep Claude's renderer helpers (com.anthropic.claudefordesktop.helper) out of the exact-match allowlist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Allowlist and detection tests Cotabby/Support/Focus/Applications/BrowserAppDetector.swift, CotabbyTests/Support/Focus/Applications/BrowserAppDetectorTests.swift |
The allowlist adds Claude desktop’s exact bundle identifier. Tests verify that it is an Electron editor, not a browser, requires web accessibility priming, and that its helper identifier is excluded. |
Priority:
Estimated code review effort: 2 (Simple) | ~7 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: fujacob
Merge Risk: 
Minimal · up to 0177f
-
No concrete merge-blocking risk was identified in the reviewed changes.
Pre-merge checks: 
5
-
Check name Status Explanation Description Check Check skipped - CodeRabbit’s high-level summary is enabled. Title check The title clearly and concisely describes the main change: enabling Electron accessibility priming for Claude Desktop. Linked Issues check Issue #861is the only active directly linked issue. Its coding requirement is that suggestions appear in the Claude desktop composer, and in Obsidian. Evidence at the reviewed head (0177f57): (1) Br…Out of Scope Changes check The supplied change set has two files. BrowserAppDetector.swift adds one allowlist entry for the Claude bundle identifier, with a comment that explains it. BrowserAppDetectorTests.swift adds assertion… Docstring Coverage No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Full details: Linked Issues check
-
Explanation
Issue
#861is the only active directly linked issue. Its coding requirement is that suggestions appear in the Claude desktop composer, and in Obsidian. Evidence at the reviewed head (0177f57): (1) BrowserAppDetector.swift adds "com.anthropic.claudefordesktop" to electronEditorBundleIdentifiers. isElectronEditor lowercases the input and checks exact set membership. needsWebAccessibilityPriming includes isElectronEditor, so Claude now passes the priming gate. (2) BrowserAppDetectorTests asserts that the Claude bundle is an Electron editor, is not a browser, and needs priming. It also asserts that the .helper bundle is excluded. (3) Obsidian (md.obsidian) is already allowlisted at head, so the Obsidian part of#861is covered by existing code. The runtime result (composer resolves as Supported and Tab inserts suggestions) comes from the author's A/B test and xcodebuild run in the PR description. I did not reproduce those runs. The link from the predicate to ChromiumAccessibilityEnabler is taken from the PR summary and code comments, not from a file read. Repository diffs were unavailable, so the base-to-head change set comes from the supplied summary.
Full details: Out of Scope Changes check
-
Explanation
The supplied change set has two files. BrowserAppDetector.swift adds one allowlist entry for the Claude bundle identifier, with a comment that explains it. BrowserAppDetectorTests.swift adds assertions for the Claude bundle and its helper. Both changes directly implement the Claude part of
#861. The PR description says WebContentFieldDetector.isWebContentField also returns true for Claude. That result follows from the allowlist entry. The supplied summary lists no edit to WebContentFieldDetector. The branch name mentions#822, but no code in the change set touches#822work. The Obsidian reference in the code comment cites#791, while the PR description cites#825. This is a documentation mismatch, not an out-of-scope change. Repository diffs were unavailable, so this verdict depends on the supplied file list.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
7hdmm9pp2w-code
left a comment
There was a problem hiding this comment.
Minimal and correct. The match is exact, so .helper processes stay out, and the test pins that. One heads-up for whoever merges #867 as well: the Claude composer grows as you type, which is exactly the case where #867's bottom-edge floor would cut wrapped ghost rows.
Context: I built main with #885, #882, #879, #883, #866 and #867 merged on top (no conflicts) and ran the full test suite the way tests.yml does. All tests touched by these PRs pass. The only two failures also fail on plain main (locale-dependent, see #891). These reviews are based on reading the code; I have not tested the UI by hand.
Two review findings on the opt-in Tab Moves to Next Field setting: - Claude's desktop composer can report AXTextField, and the Claude bundle is not in BrowserAppDetector's Electron editor list on main yet (FuJacob#882). Name it explicitly so Tab keeps accepting there regardless of FuJacob#882. - With Accept Entire Suggestion on a double tap of Tab, handing the first Tab to the host left no second press, so nothing could accept the whole suggestion in a form field. The press now keeps accepting while the double tap applies, and the setting is disabled with an explanation in that configuration. The description no longer claims full acceptance works everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
The Claude desktop app (
com.anthropic.claudefordesktop) is a stock Electron app (Electron 44 / Chromium 152 as of Claude 4.29). Its composer stays hidden from Accessibility until a client setsAXManualAccessibilityon the app.ChromiumAccessibilityEnableronly sets that flag for bundles onBrowserAppDetector's Electron editor allowlist, and Claude wasn't on it, so no focused field ever resolved there. This adds Claude to the allowlist: the same fix Obsidian got in #825.Validation
xcodebuild test -workspace build/cotabby-dependencies/Cotabby.xcworkspace -scheme Cotabby -destination 'platform=macOS' -derivedDataPath build/DerivedData -only-testing:CotabbyTests/BrowserAppDetectorTests CODE_SIGNING_ALLOWED=NO(Xcode 27.1):** TEST SUCCEEDED **, 7 tests, 0 failures.Cotabby Devfrom this branch (Release config,-cotabby-debug):CHROME-PRIME enabled web accessibility for Claude2.4 s after launch, then the composer resolved ascapability=Supportedwithcaret=exact primary (text-marker). Suggestions rendered, and three Tab presses each inserted suggestion text.swiftlint --strict(not installed locally).Linked issues
Fixes #861. That report covered Obsidian and Claude desktop; Obsidian was fixed in #825, and this covers Claude.
The branch name says 822 by mistake: #822 (Slack and Codex) is a separate issue and isn't touched here.
Risk / rollout notes
com.anthropic.claudefordesktop.helper) aren't primed; a test pins this.WebContentFieldDetector.isWebContentFieldnow also returns true for Claude, which affects how far caret geometry is trusted. Claude's composer already vends DOM attributes, which made it web content before, so no change is expected there.🤖 Generated with Claude Code
Summary by CodeRabbit


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Adds Claude desktop to the existing Electron accessibility allowlist so Cotabby can wake its composer before resolving focus.
Reviews (1) · Last reviewed commit: "fix(focus): prime the Claude desktop app..." · Reviewed by Greptile