Add enhanced transcripts toggle to Settings - #103
Merged
Conversation
A new Transcription section in Settings > Advanced carries an "Enhanced transcripts" toggle. On (the default), each dictation request keeps asking the dictation API for its server-side LLM cleanup rewrite; off, the request omits the llm block entirely so the verbatim transcript is pasted exactly as spoken. - EnhancedTranscriptsStore: UserDefaults-backed switch, on by default (unset reads as enabled), registered in PersistedSettings' roster. - AssemblyAITranscriber: new injectable enhancedTranscripts closure, read per request, gating DictationConfig's now-optional llm block. - Settings UI: TranscriptionSection toggle with a shared UI-test identifier; docs updated in AGENTS.md and BLURTENGINE.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AAuNR2X97wf1jyFes8kdAF
There was a problem hiding this comment.
Pull request overview
Adds a user-facing Enhanced transcripts toggle (default on) that controls whether AssemblyAITranscriber includes the dictation API llm cleanup-rewrite block, enabling users to opt out and paste verbatim transcripts.
Changes:
- Introduces
EnhancedTranscriptsStore(UserDefaults-backed; unset defaults to enabled) and adds it toPersistedSettingsreset sweeps. - Updates
AssemblyAITranscriberto read an injectedenhancedTranscriptsclosure per request and conditionally omitconfig.llm. - Adds engine tests for the new store behavior and for
llminclusion/omission, plus docs/UI wiring for the Settings toggle.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Tests/BlurtEngineTests/PersistedSettingsTests.swift | Extends roster tests to include the enhanced-transcripts defaults key and updates expected key count. |
| Tests/BlurtEngineTests/EnhancedTranscriptsStoreTests.swift | Adds unit tests verifying the store defaults to enabled when unset and round-trips persistence. |
| Tests/BlurtEngineTests/AssemblyAITranscriberTests.swift | Adds coverage asserting llm is present when enabled and omitted when disabled; updates helpers to avoid real UserDefaults. |
| Sources/BlurtEngine/STT/AssemblyAITranscriber.swift | Adds per-request enhanced-transcripts gating via injected closure; makes DictationConfig.llm optional so it can be omitted. |
| Sources/BlurtEngine/Config/PersistedSettings.swift | Adds the new defaults key to the engine’s reset roster. |
| Sources/BlurtEngine/Config/EnhancedTranscriptsStore.swift | Introduces the new UserDefaults-backed store with “unset == enabled” semantics. |
| BLURTENGINE.md | Updates engine documentation to describe the optional server-side cleanup rewrite and the setting. |
| App/Blurt/Shared/UITestIdentifiers.swift | Adds a UI test identifier for the enhanced-transcripts toggle. |
| App/Blurt/Blurt/Wizard/SettingsWindowRoot.swift | Adds a new Transcription section in Settings with the Enhanced transcripts toggle. |
| AGENTS.md | Updates repo/architecture docs to include the enhanced-transcripts setting and behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+105
to
+108
| Text( | ||
| "Polishes each dictation before pasting — removing filler words and fixing punctuation. " | ||
| + "Turn off to paste your words exactly as spoken.") | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
The wording here is deliberate, so leaving it as-is:
- "Filler words" over "disfluencies": this is user-facing settings copy, and "filler words" is the plainer term; "disfluencies" stays in the engine docs where precision matters.
- The best-effort fallback (a rare
llm_error/null rewrite degrading to the verbatim transcript) is an internal degradation path, not something the setting controls — enumerating it in a two-sentence settings footer would add noise without helping the user decide whether to flip the toggle. It's documented in AGENTS.md/BLURTENGINE.md and covered by tests.
Also holding off on copy churn since the PR is green and already in the merge queue.
Generated by 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.
What & why
Adds a user-facing "Enhanced transcripts" toggle to the Settings window's new Transcription section, allowing users to opt out of AssemblyAI's server-side LLM cleanup rewrite (which removes disfluencies and fixes punctuation). When disabled, the dictation request omits the
llmblock entirely, and the verbatim transcript is pasted exactly as spoken.The feature is on by default — the product's default behavior is to polish transcripts. The transcriber reads this setting at every request via an injected closure, so changes apply immediately to the next dictation without rebuilding.
Key changes:
EnhancedTranscriptsStorepersists the toggle inUserDefaults(defaults to on; unset reads as enabled)AssemblyAITranscriberaccepts anenhancedTranscriptsclosure and conditionally includes thellmblock in the configDictationConfig.llmis now optional; omitted when the setting is offHow it was tested
scripts/check.shpasses (or CI will, if I'm not on a Mac)Test coverage:
EnhancedTranscriptsStoreTestsverify the store defaults to on and persists the toggleAssemblyAITranscriberTestsconfirm the config includesllmwhen enabled and omits it when disabledPersistedSettingsTestsupdated to account for the new store keyhttps://claude.ai/code/session_01AAuNR2X97wf1jyFes8kdAF