Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
feat(settings): make the paste check card opt-in
altic-devb1d14044db6a
diff --git a/Sources/Fluid/Persistence/BackupService.swift b/Sources/Fluid/Persistence/BackupService.swiftindex 5e93484b..f664846a 100644--- a/Sources/Fluid/Persistence/BackupService.swift+++ b/Sources/Fluid/Persistence/BackupService.swift@@ -98,6 +98,7 @@ struct SettingsBackupPayload: Codable, Equatable {let audioHistoryBudgetGB: Double?let notifyAIProcessingFailures: Bool?let showMicrophoneChangeAlerts: Bool?+ let showPasteCheckAlerts: Bool?let weekendsDontBreakStreak: Boollet fillerWords: [String]let removeFillerWordsEnabled: Booldiff --git a/Sources/Fluid/Persistence/SettingsStore.swift b/Sources/Fluid/Persistence/SettingsStore.swiftindex f1ca9fc9..12bfe81e 100644--- a/Sources/Fluid/Persistence/SettingsStore.swift+++ b/Sources/Fluid/Persistence/SettingsStore.swift@@ -3410,6 +3410,19 @@ final class SettingsStore: ObservableObject {}}+ /// Whether a card is shown when a paste could not be confirmed in the target field.+ /// Off by default: the read-back is a guess, and a wrong guess interrupts for nothing.+ var showPasteCheckAlerts: Bool {+ get {+ let value = self.defaults.object(forKey: Keys.showPasteCheckAlerts)+ return value as? Bool ?? false+ }+ set {+ objectWillChange.send()+ self.defaults.set(newValue, forKey: Keys.showPasteCheckAlerts)+ }+ }+func makeBackupPayload() -> SettingsBackupPayload {SettingsBackupPayload(selectedProviderID: self.selectedProviderID,@@ -3493,6 +3506,7 @@ final class SettingsStore: ObservableObject {audioHistoryBudgetGB: self.audioHistoryBudgetGB,notifyAIProcessingFailures: self.notifyAIProcessingFailures,showMicrophoneChangeAlerts: self.showMicrophoneChangeAlerts,+ showPasteCheckAlerts: self.showPasteCheckAlerts,weekendsDontBreakStreak: self.weekendsDontBreakStreak,fillerWords: self.fillerWords,removeFillerWordsEnabled: self.removeFillerWordsEnabled,@@ -3676,6 +3690,9 @@ final class SettingsStore: ObservableObject {if let showMicrophoneChangeAlerts = payload.showMicrophoneChangeAlerts {self.showMicrophoneChangeAlerts = showMicrophoneChangeAlerts}+ if let showPasteCheckAlerts = payload.showPasteCheckAlerts {+ self.showPasteCheckAlerts = showPasteCheckAlerts+ }self.weekendsDontBreakStreak = payload.weekendsDontBreakStreakself.fillerWords = payload.fillerWordsself.removeFillerWordsEnabled = payload.removeFillerWordsEnabled@@ -5651,6 +5668,7 @@ private extension SettingsStore {// Keep the original persisted key so existing installs migrate in place.static let microphoneSelectionMigrationVersion = "AppOnlyMicrophoneSelectionMigrationVersion"static let showMicrophoneChangeAlerts = "ShowMicrophoneChangeAlerts"+ static let showPasteCheckAlerts = "ShowPasteCheckAlerts"static let visualizerNoiseThreshold = "VisualizerNoiseThreshold"static let launchAtStartup = "LaunchAtStartup"static let showInDock = "ShowInDock"diff --git a/Sources/Fluid/Services/TypingService.swift b/Sources/Fluid/Services/TypingService.swiftindex 4f26acca..abe9477c 100644--- a/Sources/Fluid/Services/TypingService.swift+++ b/Sources/Fluid/Services/TypingService.swift@@ -567,7 +567,9 @@ final class TypingService {toggleStopRequestedAt: toggleStopRequestedAt,completedAt: completedAt)- if verifiesLanding, result == .commandPosted, deliveryPath != .direct, let verificationBefore {+ if verifiesLanding, SettingsStore.shared.showPasteCheckAlerts,+ result == .commandPosted, deliveryPath != .direct, let verificationBefore+ {self.verifyPasteLanded(text, before: verificationBefore)}// The caller starts correction tracking after completing delivery UI.diff --git a/Sources/Fluid/UI/SettingsSearch.swift b/Sources/Fluid/UI/SettingsSearch.swiftindex 7680b693..9113dcfa 100644--- a/Sources/Fluid/UI/SettingsSearch.swift+++ b/Sources/Fluid/UI/SettingsSearch.swift@@ -45,6 +45,7 @@ enum SettingsSearchTarget: Hashable {case notificationscase aiEnhancementFailurescase microphoneChanges+ case pasteCheckcase audiocase inputDevicePriority@@ -101,7 +102,7 @@ enum SettingsSearchTarget: Hashable {.pasteLastTranscriptionShortcut:return .shortcuts- case .notifications, .aiEnhancementFailures, .microphoneChanges:+ case .notifications, .aiEnhancementFailures, .microphoneChanges, .pasteCheck:return .notificationscase .audio, .inputDevicePriority, .outputDevice:@@ -350,6 +351,11 @@ enum SettingsSearchIndex {title: "Microphone Changes",terms: ["mic device lost changed alert notification"]),+ .init(+ target: .pasteCheck,+ title: "Paste Check",+ terms: ["text wasn't inserted not inserted card clipboard verify delivery failure alert"]+ ),.init(target: .audio, title: "Audio", terms: ["sound devices microphone speaker"]),.init(diff --git a/Sources/Fluid/UI/SettingsView.swift b/Sources/Fluid/UI/SettingsView.swiftindex d16846bd..1b8a92fd 100644--- a/Sources/Fluid/UI/SettingsView.swift+++ b/Sources/Fluid/UI/SettingsView.swift@@ -1133,6 +1133,18 @@ struct SettingsView: View {)).settingsSearchTarget(.microphoneChanges)++ Divider().opacity(0.2)++ self.optionToggleRow(+ title: "Paste Check",+ description: "Show a card when FluidVoice can't confirm that pasted text landed.",+ isOn: Binding(+ get: { self.settings.showPasteCheckAlerts },+ set: { self.settings.showPasteCheckAlerts = $0 }+ )+ )+ .settingsSearchTarget(.pasteCheck)}}.padding(16)diff --git a/Tests/FluidDictationIntegrationTests/PasteDeliveryCoordinatorTests.swift b/Tests/FluidDictationIntegrationTests/PasteDeliveryCoordinatorTests.swiftindex b709fcd8..4331f562 100644--- a/Tests/FluidDictationIntegrationTests/PasteDeliveryCoordinatorTests.swift+++ b/Tests/FluidDictationIntegrationTests/PasteDeliveryCoordinatorTests.swift@@ -5,6 +5,19 @@ import XCTest@MainActorfinal class PasteDeliveryCoordinatorTests: XCTestCase {+ func testPasteCheckAlertsDefaultOffAndRoundTripThroughBackup() {+ let settings = SettingsStore.shared+ let original = settings.showPasteCheckAlerts+ defer { settings.showPasteCheckAlerts = original }++ UserDefaults.standard.removeObject(forKey: "ShowPasteCheckAlerts")+ XCTAssertFalse(settings.showPasteCheckAlerts)++ settings.showPasteCheckAlerts = true+ XCTAssertTrue(settings.showPasteCheckAlerts)+ XCTAssertEqual(settings.makeBackupPayload().showPasteCheckAlerts, true)+ }+func testDeliveryPostsImmediatelyAndRestoresOriginalClipboard() async {let pasteboard = FakePasteboardManager(text: "before")let commandPoster = FakePasteCommandPoster()