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
refactor(onboarding): remove the unused live overlay introduction
altic-deva51b67d44c16
diff --git a/Sources/Fluid/Services/NotchOverlayManager.swift b/Sources/Fluid/Services/NotchOverlayManager.swiftindex acbfe099..f5933c4d 100644--- a/Sources/Fluid/Services/NotchOverlayManager.swift+++ b/Sources/Fluid/Services/NotchOverlayManager.swift@@ -49,24 +49,6 @@ final class NotchOverlayManager {EmptyView>?private var currentMode: OverlayMode = .dictation- private var onboardingOverlayOwner: UUID?-- /// Shows the real controls without starting microphone capture.- func beginOnboardingOverlay(owner: UUID) {- guard self.onboardingOverlayOwner != owner else { return }- self.hideImmediately()- self.onboardingOverlayOwner = owner- self.show(audioLevelPublisher: Empty<CGFloat, Never>().eraseToAnyPublisher(), mode: .dictation)- NotchContentState.shared.showsOnboardingModeHint = true- }-- func endOnboardingOverlay(owner: UUID) {- guard self.onboardingOverlayOwner == owner else { return }- self.onboardingOverlayOwner = nil- NotchContentState.shared.showsOnboardingModeHint = false- self.hideImmediately()- }-/// Store last audio publisher for re-showing during processingprivate var lastAudioPublisher: AnyPublisher<CGFloat, Never>?@@ -167,7 +149,6 @@ final class NotchOverlayManager {}func show(audioLevelPublisher: AnyPublisher<CGFloat, Never>, mode: OverlayMode) {- NotchContentState.shared.showsOnboardingModeHint = falseself.refreshNotchPresentationPolicy()Self.overlayBench("show_called mode=\(mode.rawValue) state=\(self.state) commandExpanded=\(self.isCommandOutputExpanded)")self.cancelInFlightHideForNewPresentation()@@ -204,7 +185,7 @@ final class NotchOverlayManager {let targetScreen = OverlayScreenResolver.screenForCurrentPointer()// Route to bottom overlay if user preference is set- if self.onboardingOverlayOwner != nil || SettingsStore.shared.overlayPosition == .bottom {+ if SettingsStore.shared.overlayPosition == .bottom {Self.overlayBench("show_internal_route target=bottom")self.showBottomOverlay(audioLevelPublisher: audioLevelPublisher, mode: mode)returndiff --git a/Sources/Fluid/UI/OnboardingAIEnhancementStepView.swift b/Sources/Fluid/UI/OnboardingAIEnhancementStepView.swiftindex 3bf6239a..14f571c3 100644--- a/Sources/Fluid/UI/OnboardingAIEnhancementStepView.swift+++ b/Sources/Fluid/UI/OnboardingAIEnhancementStepView.swift@@ -24,7 +24,6 @@ struct OnboardingAIEnhancementStepView: View {@StateObject private var setup = OnboardingAISetupController.live@StateObject private var carouselAutoplay = OnboardingCarouselAutoplay()@State private var hoveredButtonID: String?- @State private var overlayOwner = UUID()@State private var introductionFinished = false@State private var showPractice = false@State private var introductionPlaybackID = UUID()@@ -171,7 +170,6 @@ struct OnboardingAIEnhancementStepView: View {.task { self.setup.refresh() }.onDisappear {self.setup.cancel()- NotchOverlayManager.shared.endOnboardingOverlay(owner: self.overlayOwner)}}@@ -426,7 +424,6 @@ struct OnboardingAIEnhancementStepView: View {isActive: !self.isShowingIntroduction,shortcutDisplay: self.shortcutDisplay)- .onDisappear { NotchOverlayManager.shared.endOnboardingOverlay(owner: self.overlayOwner) }.onChange(of: self.isRunning) { _, running inif running { self.practice.beginAttempt() }}diff --git a/Sources/Fluid/Views/BottomOverlayView.swift b/Sources/Fluid/Views/BottomOverlayView.swiftindex a071af34..8c66bc2b 100644--- a/Sources/Fluid/Views/BottomOverlayView.swift+++ b/Sources/Fluid/Views/BottomOverlayView.swift@@ -2134,9 +2134,6 @@ private struct DynamicPreviewHeightPreferenceKey: PreferenceKey {// MARK: - Bottom Overlay SwiftUI Viewstruct BottomOverlayView: View {- private var showsOnboardingHint: Bool { self.contentState.showsOnboardingModeHint }- @State private var onboardingHighlight = false-@ObservedObject private var contentState = NotchContentState.shared@ObservedObject private var appServices = AppServices.shared@ObservedObject private var activeAppMonitor = ActiveAppMonitor.shared@@ -2889,7 +2886,7 @@ struct BottomOverlayView: View {)).overlay(alignment: .top) {- if self.isHoveringPromptChip, !self.showsOnboardingHint, self.isPromptSelectableMode, !self.contentState.isProcessing {+ if self.isHoveringPromptChip, self.isPromptSelectableMode, !self.contentState.isProcessing {Text("Select dictation mode").font(.fluidSystem(size: 11, weight: .semibold)).foregroundStyle(.white.opacity(0.9))@@ -2908,24 +2905,6 @@ struct BottomOverlayView: View {}.accessibilityElement(children: .combine).accessibilityLabel("Select dictation mode")- .overlay {- if self.showsOnboardingHint {- RoundedRectangle(cornerRadius: self.promptSelectorCornerRadius)- .stroke(FluidOnboardingLandingColors.blue, lineWidth: 1.5)- .padding(-3)- .opacity(self.reduceMotion || self.onboardingHighlight ? 1 : 0.2)- .allowsHitTesting(false)- }- }- .task(id: self.showsOnboardingHint) {- guard self.showsOnboardingHint else {- self.onboardingHighlight = false- return- }- withAnimation(self.reduceMotion ? nil : .easeOut(duration: 0.45)) {- self.onboardingHighlight = true- }- }}private var promptSelectorView: some View {@@ -2944,7 +2923,6 @@ struct BottomOverlayView: View {}.onTapGesture {guard self.layout.showsTopControls, self.isPromptSelectableMode, !self.contentState.isProcessing else { return }- self.contentState.showsOnboardingModeHint = falseself.closeModeMenu()self.closeActionsMenu()BottomOverlayPromptMenuController.shared.updateAnchor(@@ -3504,39 +3482,6 @@ struct BottomOverlayView: View {)// Reserve space around the pill so its drop shadow isn't clipped by the (content-sized) window..padding(self.isPillSize ? 26 : 0)- .overlay(alignment: .top) {- if self.showsOnboardingHint {- VStack(spacing: 5) {- Text("Meet your overlay")- .font(.fluidSystem(size: 14, weight: .semibold))- .foregroundStyle(.white.opacity(0.94))- Text("Your dictation controls, in any app.")- .font(.fluidSystem(size: 11))- .foregroundStyle(.white.opacity(0.62))- Image(systemName: "arrow.down")- .font(.fluidSystem(size: 11, weight: .medium))- .foregroundStyle(FluidOnboardingLandingColors.blue)- }- .fixedSize()- .opacity(self.reduceMotion || self.onboardingHighlight ? 1 : 0)- .offset(y: -64 + (self.reduceMotion || self.onboardingHighlight ? 0 : -8))- .allowsHitTesting(false)- }- }- .padding(.top, self.showsOnboardingHint ? 82 : 0)- .onChange(of: self.showsOnboardingHint) { _, _ in- BottomOverlayWindowController.shared.refreshSizeForContent()- }- .frame(maxHeight: .infinity, alignment: .top)- .scaleEffect(self.overlayAnimatedScale, anchor: .center)- .offset(y: self.overlayAnimatedOffsetY)- .opacity(self.overlayAnimatedOpacity)- .animation(.timingCurve(0.22, 0.0, 0.2, 1.0, duration: 0.02), value: self.contentState.isBottomOverlayDismissing)- .onChange(of: self.settings.overlaySize) { _, _ in- self.dynamicPreviewResizeBucket = self.previewResizeBucket(for: self.currentPreviewSizingText)- self.frozenDynamicPreviewHeight = nil- BottomOverlayWindowController.shared.refreshSizeForContent()- }.onChange(of: self.contentState.isBottomOverlayPresented) { _, presented inself.borderAnimationStartedAt = presented ? Date() : nil}diff --git a/Sources/Fluid/Views/NotchContentViews.swift b/Sources/Fluid/Views/NotchContentViews.swiftindex 0ed9d6a3..74a68bf2 100644--- a/Sources/Fluid/Views/NotchContentViews.swift+++ b/Sources/Fluid/Views/NotchContentViews.swift@@ -97,7 +97,6 @@ class NotchContentState: ObservableObject {/// Keep overlay state bounded even during very long recordings.private static let maxStoredTranscriptionCharacters = SettingsStore.transcriptionPreviewCharLimitRange.upperBound- @Published var showsOnboardingModeHint = false@Published var transcriptionText: String = ""@Published var mode: OverlayMode = .dictation@Published var promptPickerMode: SettingsStore.PromptMode = .dictatediff --git a/Tests/FluidDictationIntegrationTests/HotkeyShortcutTests.swift b/Tests/FluidDictationIntegrationTests/HotkeyShortcutTests.swiftindex 0ae95894..090d3276 100644--- a/Tests/FluidDictationIntegrationTests/HotkeyShortcutTests.swift+++ b/Tests/FluidDictationIntegrationTests/HotkeyShortcutTests.swift@@ -2170,54 +2170,3 @@ private final class ModifierOnlyFlagsReplay {self.keyDown()}}--@MainActor-final class FloatingOnboardingOverlayTests: XCTestCase {- func testOnboardingUsesRealFloatingWindowWithoutChangingPreferences() async {- let manager = NotchOverlayManager.shared- let owner = UUID()- let settings = SettingsStore.shared- let position = settings.overlayPosition- let selection = settings.dictationPromptSelection(for: .primary)- let audio = PassthroughSubject<CGFloat, Never>()- manager.beginOnboardingOverlay(owner: owner)- defer { manager.endOnboardingOverlay(owner: owner) }- manager.show(audioLevelPublisher: audio.eraseToAnyPublisher(), mode: .dictation)- audio.send(0.4)- try? await Task.sleep(for: .milliseconds(30))- XCTAssertEqual(NotchContentState.shared.bottomOverlayAudioLevel, 0.4)- XCTAssertTrue(manager.isBottomOverlayVisible)- XCTAssertFalse(manager.isOverlayVisible)- manager.setProcessing(true)- XCTAssertTrue(NotchContentState.shared.isProcessing)- XCTAssertTrue(manager.isBottomOverlayVisible)- XCTAssertFalse(manager.isOverlayVisible)- let outcome = await manager.hideAndWait()- XCTAssertEqual(outcome, .hidden)- audio.send(0.9)- try? await Task.sleep(for: .milliseconds(30))- XCTAssertEqual(NotchContentState.shared.bottomOverlayAudioLevel, 0)- XCTAssertEqual(settings.overlayPosition, position)- XCTAssertEqual(settings.dictationPromptSelection(for: .primary), selection)- }-- func testStalePageExitDoesNotReleaseNewFloatingPresentation() async {- let manager = NotchOverlayManager.shared- let first = UUID()- let second = UUID()- manager.beginOnboardingOverlay(owner: first)- manager.beginOnboardingOverlay(owner: second)- defer { manager.endOnboardingOverlay(owner: second) }- manager.endOnboardingOverlay(owner: first)- manager.show(audioLevelPublisher: Empty<CGFloat, Never>().eraseToAnyPublisher(), mode: .dictation)- manager.setProcessing(true)- XCTAssertTrue(manager.isBottomOverlayVisible)- XCTAssertFalse(manager.isOverlayVisible)- manager.hideImmediately()- manager.show(audioLevelPublisher: Empty<CGFloat, Never>().eraseToAnyPublisher(), mode: .dictation)- await Task.yield()- XCTAssertTrue(manager.isBottomOverlayVisible)- XCTAssertFalse(manager.isOverlayVisible)- _ = await manager.hideAndWait()- }-}