Repository navigation
feat(dictation): boost uncommon words visible in the frontmost window - #509
Merged
Merged
Conversation
|
Warning Review limit reachedYou'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. View limit details
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. |
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
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_namesintact for AI cleanup and add a dedicatedscreen_termsextractor (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 tominSimilarity = 0.75in 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; redactWindowContextdebug output to counts only.src-tauri/src/engine/local/boost.rs,fluid.rs,mod.rs,session.rs,cpu.rs,meetings/protocol.rs: splitBoostTermsintowords(custom words, full priority) andscreen(on-screen terms, lower priority, deduplicated against custom words, redactedDebug), wired throughTranscriptionManagerandactions.rswhenwindow_names_enabledis on (skipped in raw mode, history retries, and headless CLI).src-tauri/swift/MurmurMeetingsHelper/Sources/Helper/main.swift: acceptscreen_termswith per-termminSimilarity = 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.murmur-meetings-helper serve: dictating "use settings store" withuseSettingsStoreonly inscreen_termsproduceduseSettingsStore, "window names enabled" producedwindow_names_enabled, and the control sentence ("lazy dog", "table") stayed unchanged withDatadog/Tableauinscreen_terms.tests/no-all-caps.spec.ts,tests/settings-labels-fit.spec.ts(9 passed),tests/settings-no-inline-help.spec.ts(19 passed).bun run checksteps passed except the pre-existingbun auditlow advisory onminimatch@11.0.8(GHSA-3924-r96c-gp9w) already present onorigin/main.