uttrflow / uttrflow/uttrflow-swift
[P2] Make recording sound preference changes reach the active recording cue
@naveen-bhatt is already working on this.
Since Sep 18, 2026.
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 286
Description
The recording sound toggle is evaluated only when the pipeline is built at launch. Turning it off leaves the existing audible cue enabled; turning it on after a silent launch leaves the existing SilentCue in place. The preference is saved and displayed, but does not control subsequent recordings until relaunch.
Evidence
Reviewed main 5c310667cd35c44abd8bbd26c19b0905471287b4. This is a source-path finding; no full-app audio playback reproduction is claimed.
- Sources/Uttrflow/AppDelegate.swift:535 chooses between
SoundPlayingRecordingCue(player: SystemSoundPlayer())andSilentCue()using the startup settings. The same instance is supplied to the capture engine and dictation controller. buildPipeline()is called at launch, and Sources/Uttrflow/AppDelegate.swift:1708 does not rebuild or update the cue whenplaysSoundWhenRecordingStartschanges.- Both the capture engine and controller retain the cue in
private letproperties. - Sources/UttrflowAudio/RecordingCue.swift:46 already supports a
soundsEnabledclosure read on each cue, but app construction omits that argument, leaving its constanttruedefault. A silent launch instead constructs a cue that can never become audible.
Reproduction to cover
Launch with sound enabled, turn it off in Settings, and start another recording: the retained audible cue still plays. Also launch with sound disabled and turn it on: the retained silent cue still does nothing. Relaunch applies the saved selection.
Acceptance criteria
Make the existing recording path observe preference changes safely, using a synchronized preference source or an equivalent mechanism. Do not rebuild a running audio pipeline merely to toggle a sound. Test enabled-to-disabled and disabled-to-enabled transitions through application wiring with a recording sound player; also preserve the existing rule that a stop sound is only owed after a start actually played, including a change during a recording.
The source-reference check in DeadSwitchTests cannot detect this because the preference is read at startup. A callback-only Settings test also cannot prove the active cue changed.
Checked open and closed issues and open PRs. #168 concerns cue contamination of captured audio; this issue concerns whether the sound preference reaches the active cue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Sources/Uttrflow/AppDelegate.swift buildPipeline wiring and Sources/UttrflowAudio/RecordingCue.swift, then inspect how the capture engine and dictation controller retain the cue. Trace the preference source and existing DeadSwitchTests before adding coverage for both preference transitions, including a change during recording. Done means the active cue follows changes without rebuilding the pipeline and preserves the existing stop-sound rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- audio-video-rtc, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100