Skip to content

feat(dictation): add short standalone voice commands - #505

Merged
DailyXplorer merged 2 commits into
mainfrom
feat/voice-commands
Dec 4, 2026
Merged

DailyXplorer merged 2 commits into
mainfrom
feat/voice-commands

Conversation

@DailyXplorer

Copy link
Copy Markdown
Owner

Summary

Lets short standalone voice commands in English and French (such as "scroll down" or "go back") act directly on the frontmost app instead of being pasted or recorded in History.

Design choice: commands are matched strictly against a small multi-word phrase table (2–6 words, optional single trailing ./!, never ?/ellipses/quotes/sentences) right after transcription and before AI cleanup, paste, and History, and dispatched as targeted keyboard shortcuts (Page Down/Page Up, Cmd+[/Alt+Left, etc.) so they always reach the frontmost window regardless of cursor position and work on both macOS and Windows. Off by default and bypassed by Raw dictation.

Closes #492

Changes

  • Added src-tauri/src/voice_commands.rs with English and French phrase tables (scroll down/up/top/bottom, go back/forward, reload page, next/previous tab, select all, zoom in/out), language scoping (auto checks both, en*/fr* check their list, other languages match none), and main-thread execution guarded by ProcessingOperation::try_enter_paste.
  • Extended targeted input synthesis in src-tauri/src/input.rs (macOS layout-aware keycode resolution and multi-modifier FlagsChanged chords) and src-tauri/src/input/win32.rs (Windows SendInput chords with KEYEVENTF_EXTENDEDKEY), plus FrontmostTarget::pid in src-tauri/src/clipboard.rs.
  • Intercepted matched standard-mode dictations in src-tauri/src/actions.rs before AI cleanup, paste, Insights, and History (dropping the uncommitted WAV).
  • Added voice_commands_enabled (default false), its Tauri command/ACL/generated src/bindings.ts, the Settings → Transcription → Output toggle (VoiceCommands.tsx), and translations in all six locales (en, fr, de, es, it, pt).
  • Added Rust unit tests (including an English/French false-trigger corpus and macOS/Windows chord-plan tests) and Playwright UI tests (tests/voice-commands.spec.ts).

Testing

  • bun run check — passed
  • cargo clippy --locked --all-targets -- -D warnings (in src-tauri) — passed
  • cargo test --locked --lib (in src-tauri) — 1772 passed, 0 failed, 34 ignored
  • PLAYWRIGHT_VITE_PORT=4179 bunx playwright test tests/voice-commands.spec.ts tests/no-all-caps.spec.ts tests/settings-labels-fit.spec.ts tests/settings-organization.spec.ts tests/settings-no-inline-help.spec.ts — 42 passed

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fcdeecb and 0db82f2.

Files ignored due to path filters: 1

  • src/bindings.ts is excluded by !src/bindings.ts
Files selected for processing: 26

  • src-tauri/build.rs
  • src-tauri/permissions/default.toml
  • src-tauri/src/actions.rs
  • src-tauri/src/actions/tests.rs
  • src-tauri/src/clipboard.rs
  • src-tauri/src/commands/transcription.rs
  • src-tauri/src/input.rs
  • src-tauri/src/input/win32.rs
  • src-tauri/src/lib.rs
  • src-tauri/src/settings.rs
  • src-tauri/src/settings/defaults.rs
  • src-tauri/src/settings/tests.rs
  • src-tauri/src/voice_commands.rs
  • src-tauri/src/voice_commands/tests.rs
  • src/components/settings/VoiceCommands.tsx
  • src/components/settings/transcription/TranscriptionSettings.tsx
  • src/i18n/locales/de/translation.json
  • src/i18n/locales/en/translation.json
  • src/i18n/locales/es/translation.json
  • src/i18n/locales/fr/translation.json
  • src/i18n/locales/it/translation.json
  • src/i18n/locales/pt/translation.json
  • src/stores/settingsStore.ts
  • tests/fixtures/settings-pages/engine.ts
  • tests/fixtures/settings-pages/settings.ts
  • tests/voice-commands.spec.ts

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.

Share

@DailyXplorer
DailyXplorer merged commit ba55d3d into main Dec 4, 2026
24 checks passed
@DailyXplorer
DailyXplorer deleted the feat/voice-commands branch December 4, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idea: short voice commands that act instead of pasting

1 participant