Skip to content

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

Added what's new pop up after an update and also manual button to check in settings

altic-dev42f3ac78bf21
diff --git a/Sources/Fluid/ContentView.swift b/Sources/Fluid/ContentView.swift
index dd2e6317..6b42a057 100644
--- a/Sources/Fluid/ContentView.swift
+++ b/Sources/Fluid/ContentView.swift
@@ -98,6 +98,9 @@ struct ContentView: View {
// MARK: - AI Enhancement checkbox state
@State private var enableAIProcessing: Bool = false
+
+ // What's New Sheet
+ @State private var showWhatsNewSheet: Bool = false
@State private var enableDebugLogs: Bool = SettingsStore.shared.enableDebugLogs
@State private var pressAndHoldModeEnabled: Bool = SettingsStore.shared.pressAndHoldMode
@State private var enableStreamingPreview: Bool = SettingsStore.shared.enableStreamingPreview
@@ -160,6 +163,9 @@ struct ContentView: View {
}
.withMouseTracking(mouseTracker)
.environmentObject(mouseTracker)
+ .sheet(isPresented: $showWhatsNewSheet) {
+ WhatsNewView()
+ }
.onAppear {
appear = true
accessibilityEnabled = checkAccessibilityPermissions()
@@ -1307,6 +1313,29 @@ struct ContentView: View {
.font(.caption2)
.foregroundStyle(.secondary.opacity(0.7))
}
+
+ // What's New Button
+ Button(action: {
+ DispatchQueue.main.async {
+ showWhatsNewSheet = true
+ }
+ }) {
+ Text("What's New")
+ .font(.headline)
+ .foregroundColor(.white)
+ .frame(maxWidth: .infinity)
+ .padding(.vertical, 10)
+ .background(
+ LinearGradient(
+ colors: [Color.blue.opacity(0.8), Color.blue.opacity(0.6)],
+ startPoint: .leading,
+ endPoint: .trailing
+ )
+ )
+ .clipShape(RoundedRectangle(cornerRadius: 8))
+ }
+ .buttonStyle(.plain)
+ .padding(.top, 8)
}
}
.padding(24)
diff --git a/Sources/Fluid/Persistence/SettingsStore.swift b/Sources/Fluid/Persistence/SettingsStore.swift
index ab24806c..c24f6298 100644
--- a/Sources/Fluid/Persistence/SettingsStore.swift
+++ b/Sources/Fluid/Persistence/SettingsStore.swift
@@ -33,6 +33,7 @@ final class SettingsStore
static let copyTranscriptionToClipboard = "CopyTranscriptionToClipboard"
static let autoUpdateCheckEnabled = "AutoUpdateCheckEnabled"
static let lastUpdateCheckDate = "LastUpdateCheckDate"
+ static let lastSeenVersion = "LastSeenVersion"
}
struct SavedProvider: Codable, Identifiable, Hashable
@@ -260,6 +261,30 @@ final class SettingsStore
lastUpdateCheckDate = Date()
}
+ // MARK: - What's New Tracking
+
+ var lastSeenVersion: String? {
+ get { defaults.string(forKey: Keys.lastSeenVersion) }
+ set { defaults.set(newValue, forKey: Keys.lastSeenVersion) }
+ }
+
+ func shouldShowWhatsNew() -> Bool {
+ let currentVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0.0"
+
+ guard let lastSeen = lastSeenVersion else {
+ // First launch, don't show what's new
+ lastSeenVersion = currentVersion
+ return false
+ }
+
+ // Show if versions are different
+ return lastSeen != currentVersion
+ }
+
+ func markWhatsNewAsSeen() {
+ lastSeenVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
+ }
+
// MARK: - Private Methods
private func updateLaunchAtStartup(_ enabled: Bool) {
diff --git a/Sources/Fluid/Services/MenuBarManager.swift b/Sources/Fluid/Services/MenuBarManager.swift
index 17348876..09b85e46 100644
--- a/Sources/Fluid/Services/MenuBarManager.swift
+++ b/Sources/Fluid/Services/MenuBarManager.swift
@@ -239,6 +239,13 @@ final class MenuBarManager: ObservableObject {
openItem.target = self
menu.addItem(openItem)
+ // Show What's New (for testing)
+ #if DEBUG
+ let whatsNewItem = NSMenuItem(title: "Show What's New", action: #selector(showWhatsNew), keyEquivalent: "")
+ whatsNewItem.target = self
+ menu.addItem(whatsNewItem)
+ #endif
+
// Check for Updates
let updateItem = NSMenuItem(title: "Check for Updates...", action: #selector(checkForUpdates(_:)), keyEquivalent: "")
updateItem.target = self
@@ -320,6 +327,11 @@ final class MenuBarManager: ObservableObject {
}
}
+ @objc private func showWhatsNew() {
+ // Post notification to show What's New view
+ NotificationCenter.default.post(name: NSNotification.Name("ShowWhatsNew"), object: nil)
+ }
+
@objc private func openMainWindow() {
// First, unhide the app if it's hidden
if NSApp.isHidden {
diff --git a/Sources/Fluid/Services/SimpleUpdater.swift b/Sources/Fluid/Services/SimpleUpdater.swift
index 14674c74..9822dd0e 100644
--- a/Sources/Fluid/Services/SimpleUpdater.swift
+++ b/Sources/Fluid/Services/SimpleUpdater.swift
@@ -35,6 +35,9 @@ struct GHRelease: Decodable {
let tag_name: String
let prerelease: Bool
let assets: [Asset]
+ let body: String?
+ let name: String?
+ let published_at: String?
}
@MainActor
@@ -47,6 +50,33 @@ final class SimpleUpdater {
"V4J43B279J"
]
+ // Fetch latest release notes from GitHub
+ func fetchLatestReleaseNotes(owner: String, repo: String) async throws -> (version: String, notes: String) {
+ let releasesURL = URL(string: "https://api.github.com/repos/\(owner)/\(repo)/releases")!
+
+ let (data, response) = try await URLSession.shared.data(from: releasesURL)
+ guard let http = response as? HTTPURLResponse, (200..<300).contains(http.statusCode) else {
+ throw SimpleUpdateError.invalidResponse
+ }
+
+ let releases: [GHRelease]
+ do {
+ releases = try JSONDecoder().decode([GHRelease].self, from: data)
+ } catch {
+ throw SimpleUpdateError.jsonDecoding
+ }
+
+ // Get latest non-prerelease release
+ guard let latest = releases.first(where: { !$0.prerelease }) else {
+ throw SimpleUpdateError.noSuitableRelease
+ }
+
+ let version = latest.tag_name
+ let notes = latest.body ?? "No release notes available."
+
+ return (version, notes)
+ }
+
// Silent check that returns update info without showing alerts or installing
func checkForUpdate(owner: String, repo: String) async throws -> (hasUpdate: Bool, latestVersion: String) {
let releasesURL = URL(string: "https://api.github.com/repos/\(owner)/\(repo)/releases")!
diff --git a/Sources/Fluid/UI/WhatsNewView.swift b/Sources/Fluid/UI/WhatsNewView.swift
new file mode 100644
index 00000000..be46d86d
--- /dev/null
+++ b/Sources/Fluid/UI/WhatsNewView.swift
@@ -0,0 +1,316 @@
+import SwiftUI
+
+struct WhatsNewView: View {
+ @Environment(\.dismiss) private var dismiss
+ @State private var showContent = false
+ @State private var features: [WhatsNewFeature] = []
+ @State private var isLoading = true
+ @State private var version: String = ""
+
+ init() {
+ // Set default version
+ _version = State(initialValue: Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0.0")
+
+ // Set fallback features (used if GitHub fetch fails)
+ // Update these to match your current version's features
+ _features = State(initialValue: [
+ WhatsNewFeature(
+ icon: "network",
+ title: "Release Notes Unavailable",
+ description: "Unable to fetch latest release notes. Please check your internet connection."
+ )
+ ])
+ }
+
+ var body: some View {
+ ZStack {
+ // Background
+ Color.black
+ .opacity(0.95)
+ .ignoresSafeArea()
+
+ VStack(spacing: 0) {
+ // Header
+ VStack(spacing: 12) {
+ // App Icon or Logo
+ Image(nsImage: NSApp.applicationIconImage)
+ .resizable()
+ .frame(width: 80, height: 80)
+ .clipShape(RoundedRectangle(cornerRadius: 16))
+ .shadow(color: .blue.opacity(0.3), radius: 20, x: 0, y: 10)
+ .scaleEffect(showContent ? 1 : 0.5)
+ .opacity(showContent ? 1 : 0)
+
+ Text("What's New in v\(version)")
+ .font(.system(size: 28, weight: .bold, design: .rounded))
+ .foregroundStyle(
+ LinearGradient(
+ colors: [.white, .white.opacity(0.8)],
+ startPoint: .top,
+ endPoint: .bottom
+ )
+ )
+ .opacity(showContent ? 1 : 0)
+ .offset(y: showContent ? 0 : -20)
+
+ Text("FluidVoice keeps getting better")
+ .font(.system(size: 14, weight: .medium))
+ .foregroundColor(.white.opacity(0.6))
+ .opacity(showContent ? 1 : 0)
+ .offset(y: showContent ? 0 : -20)
+ }
+ .padding(.top, 40)
+ .padding(.bottom, 30)
+
+ // Features List
+ ScrollView {
+ VStack(spacing: 20) {
+ ForEach(Array(features.enumerated()), id: \.offset) { index, feature in
+ FeatureRow(feature: feature)
+ .opacity(showContent ? 1 : 0)
+ .offset(y: showContent ? 0 : 30)
+ .animation(
+ .spring(response: 0.6, dampingFraction: 0.8)
+ .delay(Double(index) * 0.1),
+ value: showContent
+ )
+ }
+ }
+ .padding(.horizontal, 40)
+ .padding(.vertical, 20)
+ }
+
+ // Continue Button
+ Button(action: {
+ withAnimation(.spring(response: 0.3, dampingFraction: 0.7)) {
+ SettingsStore.shared.markWhatsNewAsSeen()
+ dismiss()
+ }
+ }) {
+ Text("Continue")
+ .font(.system(size: 16, weight: .semibold))
+ .foregroundColor(.white)
+ .frame(maxWidth: .infinity)
+ .frame(height: 50)
+ .background(
+ LinearGradient(
+ colors: [Color.blue, Color.blue.opacity(0.8)],
+ startPoint: .leading,
+ endPoint: .trailing
+ )
+ )
+ .clipShape(RoundedRectangle(cornerRadius: 12))
+ .shadow(color: .blue.opacity(0.3), radius: 10, x: 0, y: 5)
+ }
+ .buttonStyle(.plain)
+ .padding(.horizontal, 40)
+ .padding(.vertical, 30)
+ .opacity(showContent ? 1 : 0)
+ }
+ .frame(width: 500, height: 600)
+ .background(
+ RoundedRectangle(cornerRadius: 20)
+ .fill(Color(NSColor.windowBackgroundColor).opacity(0.95))
+ .shadow(color: .black.opacity(0.5), radius: 30, x: 0, y: 15)
+ )
+ }
+ .onAppear {
+ withAnimation(.spring(response: 0.6, dampingFraction: 0.8).delay(0.1)) {
+ showContent = true
+ }
+
+ // Fetch release notes from GitHub
+ Task {
+ await fetchReleaseNotes()
+ }
+ }
+ }
+
+ // MARK: - GitHub Release Notes Fetching
+
+ private func fetchReleaseNotes() async {
+ do {
+ let (fetchedVersion, notes) = try await SimpleUpdater.shared.fetchLatestReleaseNotes(
+ owner: "altic-dev",
+ repo: "Fluid-oss"
+ )
+
+ // Parse release notes into features
+ let parsedFeatures = parseReleaseNotes(notes)
+
+ await MainActor.run {
+ if !parsedFeatures.isEmpty {
+ self.features = parsedFeatures
+ }
+ // Update version to match GitHub release
+ if fetchedVersion.hasPrefix("v") {
+ self.version = String(fetchedVersion.dropFirst())
+ } else {
+ self.version = fetchedVersion
+ }
+ self.isLoading = false
+ }
+ } catch {
+ // If GitHub fetch fails, keep the fallback features
+ print("Failed to fetch release notes: \(error)")
+ await MainActor.run {
+ self.isLoading = false
+ }
+ }
+ }
+
+ private func parseReleaseNotes(_ notes: String) -> [WhatsNewFeature] {
+ var features: [WhatsNewFeature] = []
+
+ // Parse markdown format:
+ // - Look for bullet points (-, *, +)
+ // - Look for headings (##, ###)
+ // - Extract feature descriptions
+
+ let lines = notes.components(separatedBy: .newlines)
+ var currentTitle: String?
+ var currentDescription = ""
+
+ for line in lines {
+ let trimmed = line.trimmingCharacters(in: .whitespaces)
+
+ // Skip empty lines
+ if trimmed.isEmpty {
+ continue
+ }
+
+ // Check for bullet points or list items
+ if trimmed.hasPrefix("- ") || trimmed.hasPrefix("* ") || trimmed.hasPrefix("+ ") {
+ // Save previous feature if exists
+ if let title = currentTitle, !currentDescription.isEmpty {
+ features.append(createFeature(title: title, description: currentDescription))
+ }
+
+ // Extract new feature
+ let content = String(trimmed.dropFirst(2)).trimmingCharacters(in: .whitespaces)
+
+ // Check if it has a colon (title: description format)
+ if let colonIndex = content.firstIndex(of: ":") {
+ currentTitle = String(content[..<colonIndex]).trimmingCharacters(in: .whitespaces)
+ currentDescription = String(content[content.index(after: colonIndex)...]).trimmingCharacters(in: .whitespaces)
+ } else {
+ // Entire content is the title/description
+ currentTitle = content
+ currentDescription = ""
+ }
+ }
+ // Check for headings (secondary features)
+ else if trimmed.hasPrefix("###") {
+ if let title = currentTitle, !currentDescription.isEmpty {
+ features.append(createFeature(title: title, description: currentDescription))
+ }
+ currentTitle = String(trimmed.dropFirst(3)).trimmingCharacters(in: .whitespaces)
+ currentDescription = ""
+ }
+ // Continuation of description
+ else if currentTitle != nil && !trimmed.hasPrefix("#") {
+ if !currentDescription.isEmpty {
+ currentDescription += " "
+ }
+ currentDescription += trimmed
+ }
+ }
+
+ // Add last feature
+ if let title = currentTitle, !currentDescription.isEmpty {
+ features.append(createFeature(title: title, description: currentDescription))
+ } else if let title = currentTitle {
+ features.append(createFeature(title: title, description: title))
+ }
+
+ return features
+ }
+
+ private func createFeature(title: String, description: String) -> WhatsNewFeature {
+ // Determine icon based on keywords in title
+ let lowerTitle = title.lowercased()
+ let icon: String
+
+ if lowerTitle.contains("fix") || lowerTitle.contains("bug") {
+ icon = "checkmark.circle"
+ } else if lowerTitle.contains("performance") || lowerTitle.contains("faster") || lowerTitle.contains("speed") {
+ icon = "bolt.fill"
+ } else if lowerTitle.contains("new") || lowerTitle.contains("add") || lowerTitle.contains("feature") {
+ icon = "sparkles"
+ } else if lowerTitle.contains("audio") || lowerTitle.contains("sound") || lowerTitle.contains("microphone") {
+ icon = "waveform"
+ } else if lowerTitle.contains("ui") || lowerTitle.contains("design") || lowerTitle.contains("interface") {
+ icon = "paintbrush.fill"
+ } else if lowerTitle.contains("setting") || lowerTitle.contains("option") || lowerTitle.contains("config") {
+ icon = "gearshape.2"
+ } else if lowerTitle.contains("update") || lowerTitle.contains("improve") {
+ icon = "arrow.up.circle"
+ } else {
+ icon = "star.fill"
+ }
+
+ return WhatsNewFeature(icon: icon, title: title, description: description.isEmpty ? title : description)
+ }
+}
+
+struct FeatureRow: View {
+ let feature: WhatsNewFeature
+
+ var body: some View {
+ HStack(alignment: .top, spacing: 16) {
+ // Icon
+ ZStack {
+ Circle()
+ .fill(
+ LinearGradient(
+ colors: [
+ Color.blue.opacity(0.2),
+ Color.blue.opacity(0.1)
+ ],
+ startPoint: .topLeading,
+ endPoint: .bottomTrailing
+ )
+ )
+ .frame(width: 50, height: 50)
+
+ Image(systemName: feature.icon)
+ .font(.system(size: 22, weight: .medium))
+ .foregroundColor(.blue)
+ }
+
+ // Text
+ VStack(alignment: .leading, spacing: 6) {
+ Text(feature.title)
+ .font(.system(size: 16, weight: .semibold))
+ .foregroundColor(.white)
+
+ Text(feature.description)
+ .font(.system(size: 14, weight: .regular))
+ .foregroundColor(.white.opacity(0.7))
+ .fixedSize(horizontal: false, vertical: true)
+ }
+
+ Spacer()
+ }
+ .padding(16)
+ .background(
+ RoundedRectangle(cornerRadius: 12)
+ .fill(Color.white.opacity(0.05))
+ )
+ .overlay(
+ RoundedRectangle(cornerRadius: 12)
+ .stroke(Color.white.opacity(0.1), lineWidth: 1)
+ )
+ }
+}
+
+struct WhatsNewFeature {
+ let icon: String
+ let title: String
+ let description: String
+}
+
+#Preview {
+ WhatsNewView()
+}
+
diff --git a/Sources/Fluid/fluidApp.swift b/Sources/Fluid/fluidApp.swift
index 819570d1..1873b6da 100644
--- a/Sources/Fluid/fluidApp.swift
+++ b/Sources/Fluid/fluidApp.swift
@@ -13,6 +13,7 @@ import ApplicationServices
struct fluidApp: App {
@StateObject private var menuBarManager = MenuBarManager()
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
+ @State private var showWhatsNew = false
init() {
// Note: App UI is designed with dark color scheme in mind
@@ -25,6 +26,18 @@ struct fluidApp: App {
ContentView()
.environmentObject(menuBarManager)
.preferredColorScheme(.dark) // Force dark mode to prevent UI issues
+ .sheet(isPresented: $showWhatsNew) {
+ WhatsNewView()
+ }
+ .onAppear {
+ // Check if we should show what's new after a short delay
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
+ showWhatsNew = SettingsStore.shared.shouldShowWhatsNew()
+ }
+ }
+ .onReceive(NotificationCenter.default.publisher(for: NSNotification.Name("ShowWhatsNew"))) { _ in
+ showWhatsNew = true
+ }
}
}
}