Repository navigation
Add a Claude voice button, and a name and places for each voice button - #5
Merged
Merged
Conversation
…cessibility Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The claude.ai page sits inside the desktop app's own file:// web area, the voice button is next to dictation (send keeps its own spot), Claude Code opens windows of its own, and settings cover the chat as a modal. Pick the claude.ai area of the window on a chat, raise it, close what covers it with Escape, open a new chat with the sidebar's button or the link, and bring Claude forward by pid, since AXFrontmost is ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A freshly started Claude publishes its page to Accessibility only for a window that exists while it is frontmost, so keep it in front (open -b when that cannot pick another instance, since macOS may refuse a plain activation) and set the flag again until the page shows. Wait for the button a moment after the page loads, run every recovery (the attempt count shrank as recoveries were used), compare AX counts as numbers, and fit the whole press in Paseo's 30 s plugin RPC limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JXA passes $.kCFBooleanTrue as something AX refuses (-25200), so the flag that makes Electron publish its page was never set by the script; it only worked where something else had set it before. Use an NSNumber bool, and set the flag once: every set starts Electron's build of the page over, so setting it every 300 ms kept a fresh Claude blind for good. Measured from the Paseo button with Claude closed: 5.3, 9.2 and 5.9 s to voice on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The icon after dictation is taken for voice mode only while the message box is empty: with a draft, send can sit there under a label we do not know. A voice-mode label counts only inside the composer. - A draft ends the attempt: no new chat, the toast says why. - The button's label is read again right before the press. - One deadline for the whole script, from what is left of Paseo's 30 s; the script always answers (timeout included) instead of being killed. - Claude is brought forward once while its page loads, then only right before a key or a press, not every 300 ms. - With only a profile running, the default Claude starts beside it (open -n). - The name saved after a pause merges into the latest settings; each card has its own placeholder; the two buttons never take the same slash command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kostilal
force-pushed
the
feat/claude-voice-button
branch
from
November 17, 2026 19:03
5c3106c to
871e15f
Compare
Contributor
Author
|
An independent review on another model (Fable 5.1) found three P1s and five P2s. All are fixed in 871e15f: P1
P2
P3
The return of the name and placements UI (1.0 had one switch) is your call, see the description. Tests: 382 pass, with new ones for each fix. Live after the fixes, through the Paseo header button:
🤖 Generated with Claude Code |
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.
Summary
A second voice button, the Claude twin of the ChatGPT one (#2): one tap in Paseo starts Claude's own voice mode in the Claude desktop app, so you talk to Claude with your claude.ai account, its memory and the God Mode connector. Off until Claude voice in Paseo is turned on. It never calls an Anthropic API or sees the conversation.
Also: both voice buttons now have their name and where they show on God Mode's screen, folded behind an Edit row.
Why Accessibility
Anthropic publishes no link, keyboard shortcut, menu item, AppleScript dictionary or Shortcuts action that starts voice mode in Claude desktop (its "Voice shortcut" and "Dictation shortcut" only dictate). The only way in is the composer's voice button, so the button presses it through Accessibility, with the same Paseo permission the ChatGPT button already needs. Without it, or when nothing matches, Claude is left in front and the toast says why ("tap its voice button").
How it finds the button (
server/voice-button/claude-ax.ts)A JXA script in two parts:
DECIDE_SOURCEis pure (a flat snapshot of the window in, a decision out) and is unit-tested under Node;COLLECT_SOURCEreads the tree, presses, recovers and verifies.AXWebAreainside the app's ownfile://page, and Claude Code opens windows of its own, so it takes the window that is on a chat and raises it.claude://claude.ai/newwhen only one instance runs.profile: "evo"targets the instance started with--user-data-dir=~/.claude-evo-data/electron, and starts it that way when it is not running.Two traps worth knowing, both fixed and pinned by tests:
$.kCFBooleanTrueis refused by AX (-25200), soAXManualAccessibilitywas never actually set. Use$.NSNumber.numberWithBool(true).AXManualAccessibilityrestarts Electron's ~2 s build of the page's tree. Setting it every 300 ms kept a freshly started Claude blind for good, so it is set once and re-set only after 4 s.The whole press fits Paseo's 30 s plugin RPC limit.
Phone
There is nothing to press from outside: the Claude app has no Shortcuts action, link or intent that starts voice mode. The button opens
https://claude.ai/new(a link the app claims) and the user taps voice, or runs an Apple Shortcut ifiosShortcutNameis set. In a car, Claude's own CarPlay icon already starts voice.Settings on the screen
The 1.0 screen reduced the voice button to one switch. This brings back two of the hidden settings for each button, behind an Edit row that shows a summary ("Jarvis: Workspace header, Command Center, /jarvis"):
The Mac mode and the iPhone shortcut name stay off the screen. If you would rather keep the one-switch screen,
client/voice-button-section.tsxis self-contained and can be dropped without touching the Claude button.client/voice-button.tsxbecame a small factory used by both buttons. The ChatGPT button's ids (voice), RPCs and stored settings are unchanged.Test plan
npm run check: typecheck and 376 tests (34 new). They cover the decision on snapshots modelled on the live tree (EN/RU/UK, unknown labels, drafts, send/stop/dictation never pressed, Code screen, modal), the launcher flows (profiles, cold start, no Accessibility, open mode, every script outcome), and guards for both traps above.Live on macOS with Claude 5.11492.5 (Russian UI), pressing the Paseo header button:
The already-on case answers without toggling.
The settings screen renders, collapses and expands, and save goes through the RPC.
Not run live: non-default profiles, iPhone, an English Claude UI.
Known limit, not ours: Claude's voice mode currently sees one tool per custom connector and asks for every write (anthropics/claude-ai-mcp#1316, #1144).
🤖 Generated with Claude Code