Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions build_log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
2026-01-08 00:49:15.446 xcodebuild[53214:2330497] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00008122-000104641ADA001C, name:My Mac }
{ platform:macOS, arch:x86_64, id:00008122-000104641ADA001C, name:My Mac }
/Users/orm/speaktype/speaktype/Views/HistoryView.swift:9:13: error: referencing initializer 'init(_:selection:rowContent:)' on 'List' requires that 'HistoryItem' conform to 'Hashable'
List(historyService.items, selection: $selectedItem) { item in
^
SwiftUI.List:2:11: note: where 'SelectionValue' = 'HistoryItem'
extension List {
^
/Users/orm/speaktype/speaktype/Views/HistoryView.swift:10:17: error: initializer 'init(value:label:)' requires that 'HistoryItem' conform to 'Hashable'
NavigationLink(value: item) {
^
SwiftUI.NavigationLink.init:2:20: note: where 'P' = 'HistoryItem'
nonisolated public init<P>(value: P?, @ViewBuilder label: () -> Label) where P : Decodable, P : Encodable, P : Hashable}
^
Failed frontend command:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/orm/speaktype/speaktype/App/speaktypeApp.swift /Users/orm/speaktype/speaktype/Models/AppSettings.swift /Users/orm/speaktype/speaktype/Models/AudioDevice.swift /Users/orm/speaktype/speaktype/Models/HotkeyConfiguration.swift /Users/orm/speaktype/speaktype/Models/RecordingSession.swift /Users/orm/speaktype/speaktype/Models/TranscriptionResult.swift /Users/orm/speaktype/speaktype/Models/TranscriptionState.swift /Users/orm/speaktype/speaktype/Services/AudioRecordingService.swift /Users/orm/speaktype/speaktype/Services/ClipboardService.swift /Users/orm/speaktype/speaktype/Services/HistoryService.swift /Users/orm/speaktype/speaktype/Services/HotkeyService.swift /Users/orm/speaktype/speaktype/Services/WhisperService.swift /Users/orm/speaktype/speaktype/Utilities/Extensions/Color+Extensions.swift /Users/orm/speaktype/speaktype/Utilities/Extensions/View+Extensions.swift /Users/orm/speaktype/speaktype/Utilities/AppColors.swift /Users/orm/speaktype/speaktype/Utilities/Constants.swift /Users/orm/speaktype/speaktype/Views/AIModelsView.swift /Users/orm/speaktype/speaktype/Views/AudioInputView.swift /Users/orm/speaktype/speaktype/Views/ContentView.swift /Users/orm/speaktype/speaktype/Views/DashboardView.swift -primary-file /Users/orm/speaktype/speaktype/Views/HistoryView.swift /Users/orm/speaktype/speaktype/Views/MainView.swift /Users/orm/speaktype/speaktype/Views/MiniRecorderView.swift /Users/orm/speaktype/speaktype/Views/OnboardingView.swift /Users/orm/speaktype/speaktype/Views/PermissionsView.swift /Users/orm/speaktype/speaktype/Views/SettingsView.swift /Users/orm/speaktype/speaktype/Views/ShortcutRecorderView.swift /Users/orm/speaktype/speaktype/Views/SidebarView.swift /Users/orm/speaktype/speaktype/Views/TranscribeAudioView.swift /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/DerivedSources/GeneratedAssetSymbols.swift -emit-dependencies-path /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/Objects-normal/arm64/HistoryView.d -emit-const-values-path /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/Objects-normal/arm64/HistoryView.swiftconstvalues -emit-reference-dependencies-path /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/Objects-normal/arm64/HistoryView.swiftdeps -serialize-diagnostics-path /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/Objects-normal/arm64/HistoryView.dia -emit-localized-strings -emit-localized-strings-path /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/Objects-normal/arm64 -target arm64-apple-macos26.1 -module-can-import-version AppKit 2685.20.119 2685.20.119 -module-can-import-version DeveloperToolsSupport 23.0.4 23.0.4 -module-can-import-version SwiftUI 7.1.13.1 7.1.13 -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libFoundationMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#FoundationMacros -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libObservationMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#ObservationMacros -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libPreviewsMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#PreviewsMacros -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libSwiftMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#SwiftMacros -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libSwiftUIMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#SwiftUIMacros -disable-implicit-swift-modules -Xcc -fno-implicit-modules -Xcc -fno-implicit-module-maps -explicit-swift-module-map-file /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/Objects-normal/arm64/speaktype-dependencies-1.json -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.1.sdk -I /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug -F /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug/PackageFrameworks -F /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug/PackageFrameworks -F /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug/PackageFrameworks -F /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug/PackageFrameworks -F /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug/PackageFrameworks -F /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug/PackageFrameworks -F /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug -no-color-diagnostics -Xcc -fno-color-diagnostics -enable-testing -g -debug-info-format\=dwarf -dwarf-version\=5 -module-cache-path /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules -profile-generate -profile-coverage-mapping -swift-version 5 -enforce-exclusivity\=checked -Onone -D DEBUG -serialize-debugging-options -const-gather-protocols-file /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/Objects-normal/arm64/speaktype_const_extract_protocols.json -enable-upcoming-feature DisableOutwardActorInference -enable-upcoming-feature InferSendableFromCaptures -enable-upcoming-feature GlobalActorIsolatedTypesUsability -enable-upcoming-feature MemberImportVisibility -enable-upcoming-feature InferIsolatedConformances -enable-upcoming-feature NonisolatedNonsendingByDefault -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -default-isolation\=MainActor -empty-abi-descriptor -validate-clang-modules-once -clang-build-session-file /Users/orm/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /Users/orm/speaktype -enable-anonymous-context-mangled-names -file-compilation-dir /Users/orm/speaktype -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -Xcc -ivfsstatcache -Xcc /Users/orm/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/macosx26.1-25B74-3ae1261907bdadc328169391a47051a6.sdkstatcache -Xcc -I/Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/speaktype-generated-files.hmap -Xcc -I/Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/speaktype-own-target-headers.hmap -Xcc -I/Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/speaktype-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype-a09c45879bccb08166620f197fcee798-VFS/all-product-headers.yaml -Xcc -iquote -Xcc /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/speaktype-project-headers.hmap -Xcc -I/Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Products/Debug/include -Xcc -I/Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/DerivedSources-normal/arm64 -Xcc -I/Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/DerivedSources/arm64 -Xcc -I/Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/DerivedSources -Xcc -DDEBUG\=1 -no-auto-bridging-header-chaining -module-name speaktype -frontend-parseable-output -disable-clang-spi -target-sdk-version 26.1 -target-sdk-name macosx26.1 -clang-target arm64-apple-macos26.1 -in-process-plugin-server-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -o /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Build/Intermediates.noindex/speaktype.build/Debug/speaktype.build/Objects-normal/arm64/HistoryView.o -index-unit-output-path /speaktype.build/Debug/speaktype.build/Objects-normal/arm64/HistoryView.o -index-store-path /Users/orm/Library/Developer/Xcode/DerivedData/speaktype-dhvydfokwnwfendhtkesaktuqgcq/Index.noindex/DataStore -index-system-modules
/Users/orm/speaktype/speaktype.xcodeproj: warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/orm/speaktype/speaktype/Resources/Info.plist'. (in target 'speaktype' from project 'speaktype')
** BUILD FAILED **

33 changes: 29 additions & 4 deletions speaktype.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/* Begin PBXBuildFile section */
1C547F2B2F0E7DC0008120A6 /* WhisperKit in Frameworks */ = {isa = PBXBuildFile; productRef = 1C547F2A2F0E7DC0008120A6 /* WhisperKit */; };
1CE4CB3F2F0EF6AF00C01C62 /* KeyboardShortcuts in Frameworks */ = {isa = PBXBuildFile; productRef = 1CE4CB3E2F0EF6AF00C01C62 /* KeyboardShortcuts */; };
1CE4CB412F0EF86B00C01C62 /* whisperkit-cli in Frameworks */ = {isa = PBXBuildFile; productRef = 1CE4CB402F0EF86B00C01C62 /* whisperkit-cli */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -57,6 +59,8 @@
buildActionMask = 2147483647;
files = (
1C547F2B2F0E7DC0008120A6 /* WhisperKit in Frameworks */,
1CE4CB3F2F0EF6AF00C01C62 /* KeyboardShortcuts in Frameworks */,
1CE4CB412F0EF86B00C01C62 /* whisperkit-cli in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -126,6 +130,8 @@
name = speaktype;
packageProductDependencies = (
1C547F2A2F0E7DC0008120A6 /* WhisperKit */,
1CE4CB3E2F0EF6AF00C01C62 /* KeyboardShortcuts */,
1CE4CB402F0EF86B00C01C62 /* whisperkit-cli */,
);
productName = speaktype;
productReference = 362947222F0DBC4E00BE895D /* speaktype.app */;
Expand Down Expand Up @@ -211,6 +217,7 @@
minimizedProjectReferenceProxies = 1;
packageReferences = (
1C547F222F0E7D07008120A6 /* XCRemoteSwiftPackageReference "WhisperKit" */,
1CE4CB3D2F0EF6AF00C01C62 /* XCRemoteSwiftPackageReference "KeyboardShortcuts" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 362947232F0DBC4E00BE895D /* Products */;
Expand Down Expand Up @@ -409,11 +416,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_ENTITLEMENTS = speaktype/Resources/speaktype.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
ENABLE_APP_SANDBOX = YES;
ENABLE_APP_SANDBOX = NO;
ENABLE_PREVIEWS = YES;
ENABLE_USER_SELECTED_FILES = readonly;
GENERATE_INFOPLIST_FILE = NO;
Expand Down Expand Up @@ -441,11 +448,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_ENTITLEMENTS = speaktype/Resources/speaktype.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
ENABLE_APP_SANDBOX = YES;
ENABLE_APP_SANDBOX = NO;
ENABLE_PREVIEWS = YES;
ENABLE_USER_SELECTED_FILES = readonly;
GENERATE_INFOPLIST_FILE = NO;
Expand Down Expand Up @@ -594,6 +601,14 @@
version = 0.9.4;
};
};
1CE4CB3D2F0EF6AF00C01C62 /* XCRemoteSwiftPackageReference "KeyboardShortcuts" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/sindresorhus/KeyboardShortcuts";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.4.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
Expand All @@ -602,6 +617,16 @@
package = 1C547F222F0E7D07008120A6 /* XCRemoteSwiftPackageReference "WhisperKit" */;
productName = WhisperKit;
};
1CE4CB3E2F0EF6AF00C01C62 /* KeyboardShortcuts */ = {
isa = XCSwiftPackageProductDependency;
package = 1CE4CB3D2F0EF6AF00C01C62 /* XCRemoteSwiftPackageReference "KeyboardShortcuts" */;
productName = KeyboardShortcuts;
};
1CE4CB402F0EF86B00C01C62 /* whisperkit-cli */ = {
isa = XCSwiftPackageProductDependency;
package = 1C547F222F0E7D07008120A6 /* XCRemoteSwiftPackageReference "WhisperKit" */;
productName = "whisperkit-cli";
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 3629471A2F0DBC4E00BE895D /* Project object */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions speaktype/App/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import SwiftUI
import KeyboardShortcuts

class AppDelegate: NSObject, NSApplicationDelegate {
private var miniRecorderController: MiniRecorderWindowController?

func applicationDidFinishLaunching(_ notification: Notification) {
// Initialize the controller
miniRecorderController = MiniRecorderWindowController()

// Setup global hotkey listener
KeyboardShortcuts.onKeyUp(for: .toggleRecord) { [weak self] in
// Direct toggle via controller.
// Bypasses URL schemes and SwiftUI Scene routing completely.
self?.miniRecorderController?.toggle()
}
}

// Critical: Prevent the app from quitting when the Mini Recorder panel closes.
// Since we are a Menu Bar app (mostly), we must stay alive.
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return false
}
}
49 changes: 47 additions & 2 deletions speaktype/App/speaktypeApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,57 @@
//

import SwiftUI
import SwiftData
import KeyboardShortcuts

@main
struct speaktypeApp: App {
@Environment(\.openWindow) var openWindow
@Environment(\.dismissWindow) var dismissWindow

@AppStorage("hasCompletedOnboarding") var hasCompletedOnboarding: Bool = false

@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

init() {
// KeyboardShortcuts init moved to AppDelegate to ensure early binding?
// Or keep here.
}

var body: some Scene {
WindowGroup {
ContentView()
// Main Dashboard Window (Hidden by default, opened via Menu Bar or Dock)
WindowGroup(id: "main-dashboard") {
Group {
if hasCompletedOnboarding {
MainView()
} else {
OnboardingView()
}
}
.preferredColorScheme(.dark)
.tint(.appRed)
}
.handlesExternalEvents(matching: ["main-dashboard", "open"]) // Only open for matching IDs
.commands {
SidebarCommands()
}

// Note: Mini Recorder is now managed manually by AppDelegate -> MiniRecorderWindowController
// to prevent SwiftUI from auto-opening the main dashboard on activation.

// Menu Bar Extra (Always running listener)
MenuBarExtra("SpeakType", systemImage: "mic.fill") {
Button("Open Dashboard") {
// Ensure we open the main dashboard via consistent ID or URL
// Using URL forces the specific window group to handle it
if let url = URL(string: "speaktype://open") {
NSWorkspace.shared.open(url)
}
}
Divider()
Button("Quit") {
NSApplication.shared.terminate(nil)
}
}
}
}
11 changes: 10 additions & 1 deletion speaktype/Assets.xcassets/AccentColor.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"colors" : [
{
"idiom" : "universal"
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.913",
"alpha" : "1.000",
"blue" : "0.352",
"green" : "0.293"
}
}
}
],
"info" : {
Expand Down
11 changes: 11 additions & 0 deletions speaktype/Constants/Shortcuts+Extensions.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Foundation
import KeyboardShortcuts
import AppKit

extension KeyboardShortcuts.Name {
static let toggleRecord = Self("toggleRecord", default: .init(.space, modifiers: [.control, .option]))
}

extension Notification.Name {
static let hotkeyTriggered = Notification.Name("hotkeyTriggered")
}
Loading