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
Improve onboarding flow: prioritize Preferences after voice model setup, fix notch shadow artifacts
altic-dev9841bcb44d3a
diff --git a/Sources/Fluid/ContentView.swift b/Sources/Fluid/ContentView.swiftindex aaf4025b..463cbf63 100644--- a/Sources/Fluid/ContentView.swift+++ b/Sources/Fluid/ContentView.swift@@ -72,7 +72,7 @@ struct ContentView: View {@State private var pendingModifierOnly = false@FocusState private var isTranscriptionFocused: Bool- @State private var selectedSidebarItem: SidebarItem? = .welcome+ @State private var selectedSidebarItem: SidebarItem?@State private var previousSidebarItem: SidebarItem? = nil // Track previous for mode transitions@State private var playgroundUsed: Bool = SettingsStore.shared.playgroundUsed@State private var recordingAppInfo: (name: String, bundleId: String, windowTitle: String)? = nil@@ -163,6 +163,13 @@ struct ContentView: View {// Ensure no restart UI shows if we already have trustif self.accessibilityEnabled { self.showRestartPrompt = false }+ // Set default selection if none exists (from menu bar navigation)+ // Show Preferences as default once voice model is ready (AI enhancement is optional)+ if self.selectedSidebarItem == nil {+ let isOnboarded = self.asr.isAsrReady || self.asr.modelsExistOnDisk+ self.selectedSidebarItem = isOnboarded ? .preferences : .welcome+ }+// Reset auto-restart flag if permission was revoked (allows re-triggering if user re-grants)if !self.accessibilityEnabled {UserDefaults.standard.set(false, forKey: self.hasAutoRestartedForAccessibilityKey)@@ -363,7 +370,8 @@ struct ContentView: View {// Close mode views if activeif self.selectedSidebarItem == .commandMode || self.selectedSidebarItem == .rewriteMode {DebugLogger.shared.debug("NSEvent monitor: Escape pressed, closing mode view", source: "ContentView")- self.selectedSidebarItem = .welcome+ let isOnboarded = self.asr.isAsrReady || self.asr.modelsExistOnDisk+ self.selectedSidebarItem = isOnboarded ? .preferences : .welcomehandled = true}@@ -710,11 +718,22 @@ struct ContentView: View {private var sidebarView: some View {List(selection: self.$selectedSidebarItem) {- NavigationLink(value: SidebarItem.welcome) {- Label("Welcome", systemImage: "house.fill")- .font(.system(size: 15, weight: .medium))+ // Priority section: Welcome (if not onboarded) or Preferences (if voice model ready)+ // Voice model readiness is the key onboarding milestone; AI enhancement is optional+ let isOnboarded = self.asr.isAsrReady || self.asr.modelsExistOnDisk+ if !isOnboarded {+ NavigationLink(value: SidebarItem.welcome) {+ Label("Welcome", systemImage: "house.fill")+ .font(.system(size: 15, weight: .medium))+ }+ .listRowBackground(self.sidebarRowBackground(for: .welcome))+ } else {+ NavigationLink(value: SidebarItem.preferences) {+ Label("Preferences", systemImage: "gearshape.fill")+ .font(.system(size: 15, weight: .medium))+ }+ .listRowBackground(self.sidebarRowBackground(for: .preferences))}- .listRowBackground(self.sidebarRowBackground(for: .welcome))Button(action: {withAnimation(.easeInOut(duration: 0.2)) {@@ -750,11 +769,14 @@ struct ContentView: View {.listRowBackground(self.sidebarRowBackground(for: .aiEnhancements))}- NavigationLink(value: SidebarItem.preferences) {- Label("Preferences", systemImage: "gearshape.fill")- .font(.system(size: 15, weight: .medium))+ // If NOT onboarded, Preferences comes here (below AI Settings)+ if !isOnboarded {+ NavigationLink(value: SidebarItem.preferences) {+ Label("Preferences", systemImage: "gearshape.fill")+ .font(.system(size: 15, weight: .medium))+ }+ .listRowBackground(self.sidebarRowBackground(for: .preferences))}- .listRowBackground(self.sidebarRowBackground(for: .preferences))NavigationLink(value: SidebarItem.commandMode) {Label("Command Mode", systemImage: "terminal.fill")@@ -797,6 +819,15 @@ struct ContentView: View {.font(.system(size: 15, weight: .medium))}.listRowBackground(self.sidebarRowBackground(for: .feedback))++ // If onboarded, "Getting Started" comes at the bottom+ if isOnboarded {+ NavigationLink(value: SidebarItem.welcome) {+ Label("Getting Started", systemImage: "house.fill")+ .font(.system(size: 15, weight: .medium))+ }+ .listRowBackground(self.sidebarRowBackground(for: .welcome))+ }}.listStyle(.sidebar).animation(nil, value: self.selectedSidebarItem)@@ -1030,13 +1061,15 @@ struct ContentView: View {private var commandModeView: some View {CommandModeView(service: self.commandModeService, onClose: {- self.selectedSidebarItem = .welcome+ let isOnboarded = self.asr.isAsrReady || self.asr.modelsExistOnDisk+ self.selectedSidebarItem = isOnboarded ? .preferences : .welcome})}private var rewriteModeView: some View {RewriteModeView(service: self.rewriteModeService, onClose: {- self.selectedSidebarItem = .welcome+ let isOnboarded = self.asr.isAsrReady || self.asr.modelsExistOnDisk+ self.selectedSidebarItem = isOnboarded ? .preferences : .welcome})}diff --git a/Sources/Fluid/Services/NotchOverlayManager.swift b/Sources/Fluid/Services/NotchOverlayManager.swiftindex e650c252..f1db58d8 100644--- a/Sources/Fluid/Services/NotchOverlayManager.swift+++ b/Sources/Fluid/Services/NotchOverlayManager.swift@@ -235,6 +235,23 @@ final class NotchOverlayManager {// Only update state if we're still the active generationguard let self = self, self.generation == currentGeneration else { return }self.state = .visible+ self.disableNotchShadows()+ }+ }++ /// Disable system window shadows for notch windows to prevent "gray traces" during animations+ private func disableNotchShadows() {+ // Notch is pure black and matches the bezel, so system shadows look like artifacts.+ // We do this matching what's done in BottomOverlayWindowController.+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {+ for window in NSApplication.shared.windows where window.styleMask.contains(.borderless) {+ // Identify candidates: near top of screen or contains Notch in class name+ let isNearTop = (window.screen ?? NSScreen.main)?.frame.maxY ?? 0+ if window.frame.maxY >= isNearTop - 50 || window.className.contains("Notch") {+ window.hasShadow = false+ window.invalidateShadow()+ }+ }}}@@ -403,6 +420,7 @@ final class NotchOverlayManager {guard self.commandOutputGeneration == currentGeneration else { return }self.commandOutputState = .visible+ self.disableNotchShadows()}/// Hide expanded command output notch - force close regardless of hover statediff --git a/Sources/Fluid/UI/WelcomeView.swift b/Sources/Fluid/UI/WelcomeView.swiftindex a2592864..11a87bfb 100644--- a/Sources/Fluid/UI/WelcomeView.swift+++ b/Sources/Fluid/UI/WelcomeView.swift@@ -39,7 +39,7 @@ struct WelcomeView: View {Image(systemName: "book.fill").font(.title2).foregroundStyle(self.theme.palette.accent)- Text("Welcome to FluidVoice")+ Text((self.asr.isAsrReady || self.asr.modelsExistOnDisk) ? "Getting Started" : "Welcome to FluidVoice").font(.title2.weight(.bold))}.padding(.bottom, 4)diff --git a/Sources/Fluid/Views/NotchContentViews.swift b/Sources/Fluid/Views/NotchContentViews.swiftindex 561b57ba..a9747207 100644--- a/Sources/Fluid/Views/NotchContentViews.swift+++ b/Sources/Fluid/Views/NotchContentViews.swift@@ -464,15 +464,15 @@ struct NotchWaveformView: View {// Computed glow values based on phase (sine wave for smooth pulsing)private var currentGlowIntensity: CGFloat {- self.contentState.isProcessing ? 0.4 + 0.4 * sin(self.glowPhase * .pi * 2) : 0.4+ self.contentState.isProcessing ? 0.35 + 0.25 * sin(self.glowPhase * .pi * 2) : 0.35}private var currentGlowRadius: CGFloat {- self.contentState.isProcessing ? 2 + 4 * sin(self.glowPhase * .pi * 2) : 2+ self.contentState.isProcessing ? 1 + 3 * sin(self.glowPhase * .pi * 2) : 1.5}private var currentOuterGlowRadius: CGFloat {- self.contentState.isProcessing ? 6 * sin(self.glowPhase * .pi * 2) : 0+ self.contentState.isProcessing ? 4 * sin(self.glowPhase * .pi * 2) : 0}init(audioPublisher: AnyPublisher<CGFloat, Never>, color: Color, isProcessing: Bool = false) {