Skip to content

feat(dictation): boost uncommon words visible in the frontmost window - #509

Merged
DailyXplorer merged 2 commits into
mainfrom
feat/boost-onscreen-words
Dec 5, 2026
Merged

DailyXplorer merged 2 commits into
mainfrom
feat/boost-onscreen-words

Conversation

@DailyXplorer

Copy link
Copy Markdown
Owner

Summary

Boosts uncommon terms visible in the frontmost window during on-device dictation on Apple silicon so project symbols, acronyms, identifiers, and proper nouns (such as useSettingsStore) are spelled right without adding them to custom words. Closes #476.

Design choice: keep window_names::candidate_names intact for AI cleanup and add a dedicated screen_terms extractor (up to 24 mixed-case, underscore-identifier, acronym, and proper-noun terms, ranked by excerpt proximity, specificity, and frequency). Send them separately from custom words (screen_terms) at lower priority (capped at 24 within the 50-term limit, held to minSimilarity = 0.75 in the Swift helper so everyday words like "table" and "lazy dog" are never falsely replaced, while exact-casing restores lowercase-initial camelCase/snake_case identifiers). Intel Macs, Windows CPU engine, and Codex take no vocabulary and keep their existing behavior.

Changes

  • src-tauri/src/window_names/screen_terms.rs, src-tauri/src/window_names.rs: extract up to 24 uncommon on-screen terms in a single breadth-first window walk (1,500 nodes, 32 KiB text cap, 150 ms budget for boost-only reads, background thread so recording start is never delayed); skip secure fields, password managers, and Murmur's own windows; redact WindowContext debug output to counts only.
  • src-tauri/src/engine/local/boost.rs, fluid.rs, mod.rs, session.rs, cpu.rs, meetings/protocol.rs: split BoostTerms into words (custom words, full priority) and screen (on-screen terms, lower priority, deduplicated against custom words, redacted Debug), wired through TranscriptionManager and actions.rs when window_names_enabled is on (skipped in raw mode, history retries, and headless CLI).
  • src-tauri/swift/MurmurMeetingsHelper/Sources/Helper/main.swift: accept screen_terms with per-term minSimilarity = 0.75, tune vocabulary size on custom words alone, and preserve exact initial-lowercase casing for camelCase/snake_case identifiers.
  • src/i18n/locales/*/translation.json: update the macOS "Context from the active window" tooltip across all six locales.

Testing

  • cargo test --locked --lib: 1,768 passed, 0 failed (covers term extraction, secure-field skipping, no disk writes, async non-blocking capture, 32 KiB cap, and two-tier boost priority).
  • cargo clippy --locked --all-targets --all-features -- -D warnings: passed.
  • Verified on the real Parakeet Ultra + CTC model via murmur-meetings-helper serve: dictating "use settings store" with useSettingsStore only in screen_terms produced useSettingsStore, "window names enabled" produced window_names_enabled, and the control sentence ("lazy dog", "table") stayed unchanged with Datadog/Tableau in screen_terms.
  • Playwright: tests/no-all-caps.spec.ts, tests/settings-labels-fit.spec.ts (9 passed), tests/settings-no-inline-help.spec.ts (19 passed).
  • All bun run check steps passed except the pre-existing bun audit low advisory on minimatch@11.0.8 (GHSA-3924-r96c-gp9w) already present on origin/main.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

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 41 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 a4817fe and 0a1985d.

Files selected for processing: 25

  • src-tauri/src/actions.rs
  • src-tauri/src/actions/output.rs
  • src-tauri/src/actions/tests.rs
  • src-tauri/src/audio_toolkit/text.rs
  • src-tauri/src/commands/history.rs
  • src-tauri/src/engine/local/boost.rs
  • src-tauri/src/engine/local/cpu.rs
  • src-tauri/src/engine/local/fluid.rs
  • src-tauri/src/engine/local/live_replay.rs
  • src-tauri/src/engine/local/mod.rs
  • src-tauri/src/engine/local/real_engine.rs
  • src-tauri/src/engine/local/session.rs
  • src-tauri/src/managers/transcription.rs
  • src-tauri/src/meetings/protocol.rs
  • src-tauri/src/meetings/transcribe.rs
  • src-tauri/src/window_names.rs
  • src-tauri/src/window_names/screen_terms.rs
  • src-tauri/src/window_names/tests.rs
  • src-tauri/swift/MurmurMeetingsHelper/Sources/Helper/main.swift
  • 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

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 6e64147 into main Dec 5, 2026
25 checks passed
@DailyXplorer
DailyXplorer deleted the feat/boost-onscreen-words branch December 5, 2026 00:12
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: boost words visible on screen during a dictation

1 participant