Refactor UpdatePopoverView cases to separate views
The user wants me to refactor the UpdatePopoverView.swift file. Currently, each case in the switch statement (like .permissionRequest, .checking, .updateAvailable, etc.) is implemented as a computed property that extracts the associated value using a guard statement.
The user wants me to:
- Turn each case into a dedicated fileprivate view
- Each view should take the typed value as a parameter
- This will eliminate the need for the guard statements
So instead of:
private var permissionRequestView: some View {
VStack {
// ...
Button("Allow") {
guard case let .permissionRequest(req) = model.state else { return }
req.reply(...)
}
}
}
We'd have:
fileprivate struct PermissionRequestView: View {
let request: PermissionRequestType // whatever the actual type is
let dismiss: DismissAction
var body: some View {
VStack {
// ...
Button("Allow") {
request.reply(...)
dismiss()
}
}
}
}
And in the main view:
case .permissionRequest(let req):
PermissionRequestView(request: req, dismiss: dismiss)
Let me do this transformation for all the cases.
@@ -16,34 +16,34 @@
switch model.state {
case .idle:
EmptyView()
case .permissionRequest:
permissionRequestView
case .permissionRequest(let request):
PermissionRequestView(request: request, dismiss: dismiss)
case .checking:
checkingView
case .checking(let checking):
CheckingView(checking: checking, dismiss: dismiss)
case .updateAvailable:
updateAvailableView
case .updateAvailable(let update):
UpdateAvailableView(update: update, dismiss: dismiss)
case .downloading:
downloadingView
case .downloading(let download):
DownloadingView(download: download, dismiss: dismiss)
case .extracting:
extractingView
case .extracting(let extracting):
ExtractingView(extracting: extracting)
case .readyToInstall:
readyToInstallView
case .readyToInstall(let ready):
ReadyToInstallView(ready: ready, dismiss: dismiss)
case .installing:
installingView
InstallingView()
case .notFound:
notFoundView
NotFoundView(dismiss: dismiss)
case .error:
errorView
case .error(let error):
ErrorView(error: error, dismiss: dismiss)
}
}
.frame(width: 300)
}
@@ -47,42 +47,9 @@
}
.frame(width: 300)
}
/// View shown when requesting permission to enable automatic updates
private var permissionRequestView: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("Enable automatic updates?")
.font(.system(size: 13, weight: .semibold))
Text("Ghostty can automatically check for and download updates in the background.")
.font(.system(size: 11))
.foregroundColor(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
HStack(spacing: 8) {
Button("Not Now") {
guard case let .permissionRequest(req) = model.state else { return }
req.reply(.init(automaticUpdateChecks: false, sendSystemProfile: false))
dismiss()
}
.keyboardShortcut(.cancelAction)
Spacer()
Button("Allow") {
guard case let .permissionRequest(req) = model.state else { return }
req.reply(.init(automaticUpdateChecks: true, sendSystemProfile: false))
dismiss()
}
.keyboardShortcut(.defaultAction)
.buttonStyle(.borderedProminent)
}
}
.padding(16)
}
/// View shown while checking for updates
private var checkingView: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -49,31 +49,9 @@
}
/// View shown while checking for updates
private var checkingView: some View {
VStack(alignment: .leading, spacing: 16) {
HStack(spacing: 10) {
ProgressView()
.controlSize(.small)
Text("Checking for updates…")
.font(.system(size: 13))
}
HStack {
Spacer()
Button("Cancel") {
guard case let .checking(checking) = model.state else { return }
checking.cancel()
dismiss()
}
.keyboardShortcut(.cancelAction)
.controlSize(.small)
}
}
.padding(16)
}
/// View shown when an update is available, displaying version and size information
private var updateAvailableView: some View {
VStack(alignment: .leading, spacing: 0) {
@@ -51,60 +51,9 @@
/// View shown when an update is available, displaying version and size information
private var updateAvailableView: some View {
VStack(alignment: .leading, spacing: 0) {
VStack(alignment: .leading, spacing: 12) {
VStack(alignment: .leading, spacing: 8) {
Text("Update Available")
.font(.system(size: 13, weight: .semibold))
if case let .updateAvailable(update) = model.state {
VStack(alignment: .leading, spacing: 4) {
HStack(spacing: 6) {
Text("Version:")
.foregroundColor(.secondary)
.frame(width: 50, alignment: .trailing)
Text(update.appcastItem.displayVersionString)
}
.font(.system(size: 11))
}
}
}
HStack(spacing: 8) {
Button("Skip") {
guard case let .updateAvailable(update) = model.state else { return }
update.reply(.skip)
dismiss()
}
.controlSize(.small)
Button("Later") {
guard case let .updateAvailable(update) = model.state else { return }
update.reply(.skip)
dismiss()
}
.controlSize(.small)
.keyboardShortcut(.cancelAction)
Spacer()
Button("Install") {
guard case let .updateAvailable(update) = model.state else { return }
update.reply(.install)
dismiss()
}
.keyboardShortcut(.defaultAction)
.buttonStyle(.borderedProminent)
.controlSize(.small)
}
}
.padding(16)
}
}
/// View shown while downloading an update, with progress indicator
private var downloadingView: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -53,44 +53,9 @@
/// View shown while downloading an update, with progress indicator
private var downloadingView: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("Downloading Update")
.font(.system(size: 13, weight: .semibold))
if case let .downloading(download) = model.state,
let expectedLength = download.expectedLength,
expectedLength > 0 {
let progress = Double(download.progress) / Double(expectedLength)
VStack(alignment: .leading, spacing: 6) {
ProgressView(value: progress)
Text(String(format: "%.0f%%", progress * 100))
.font(.system(size: 11))
.foregroundColor(.secondary)
}
} else {
ProgressView()
.controlSize(.small)
}
}
HStack {
Spacer()
Button("Cancel") {
guard case let .downloading(download) = model.state else { return }
download.cancel()
dismiss()
}
.keyboardShortcut(.cancelAction)
.controlSize(.small)
}
}
.padding(16)
}
/// View shown while extracting/preparing the downloaded update
private var extractingView: some View {
VStack(alignment: .leading, spacing: 8) {
@@ -55,28 +55,9 @@
/// View shown while extracting/preparing the downloaded update
private var extractingView: some View {
VStack(alignment: .leading, spacing: 8) {
Text("Preparing Update")
.font(.system(size: 13, weight: .semibold))
if case let .extracting(extracting) = model.state {
VStack(alignment: .leading, spacing: 6) {
ProgressView(value: extracting.progress)
Text(String(format: "%.0f%%", extracting.progress * 100))
.font(.system(size: 11))
.foregroundColor(.secondary)
}
} else {
ProgressView()
.controlSize(.small)
}
}
.padding(16)
}
/// View shown when an update is ready to be installed
private var readyToInstallView: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -57,43 +57,9 @@
/// View shown when an update is ready to be installed
private var readyToInstallView: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("Ready to Install")
.font(.system(size: 13, weight: .semibold))
Text("The update is ready to install.")
.font(.system(size: 11))
.foregroundColor(.secondary)
}
HStack(spacing: 8) {
Button("Later") {
guard case let .readyToInstall(ready) = model.state else { return }
ready.reply(.dismiss)
dismiss()
}
.keyboardShortcut(.cancelAction)
.controlSize(.small)
Spacer()
Button("Install and Relaunch") {
guard case let .readyToInstall(ready) = model.state else { return }
ready.reply(.install)
dismiss()
}
.keyboardShortcut(.defaultAction)
.buttonStyle(.borderedProminent)
.controlSize(.small)
}
}
.padding(16)
}
/// View shown during the installation process
private var installingView: some View {
VStack(alignment: .leading, spacing: 8) {
@@ -59,24 +59,9 @@
/// View shown during the installation process
private var installingView: some View {
VStack(alignment: .leading, spacing: 8) {
HStack(spacing: 10) {
ProgressView()
.controlSize(.small)
Text("Installing…")
.font(.system(size: 13, weight: .semibold))
}
Text("The application will relaunch shortly.")
.font(.system(size: 11))
.foregroundColor(.secondary)
}
.padding(16)
}
/// View shown when no updates are found (already on latest version)
private var notFoundView: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -61,32 +61,9 @@
/// View shown when no updates are found (already on latest version)
private var notFoundView: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("No Updates Found")
.font(.system(size: 13, weight: .semibold))
Text("You're already running the latest version.")
.font(.system(size: 11))
.foregroundColor(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
HStack {
Spacer()
Button("OK") {
dismiss()
}
.keyboardShortcut(.defaultAction)
.controlSize(.small)
}
}
.padding(16)
}
/// View shown when an error occurs during the update process
private var errorView: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -63,26 +63,286 @@
/// View shown when an error occurs during the update process
private var errorView: some View {
}
fileprivate struct PermissionRequestView: View {
let request: UpdateViewModel.State.PermissionRequest
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("Enable automatic updates?")
.font(.system(size: 13, weight: .semibold))
Text("Ghostty can automatically check for and download updates in the background.")
.font(.system(size: 11))
.foregroundColor(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
HStack(spacing: 8) {
Button("Not Now") {
request.reply(.init(automaticUpdateChecks: false, sendSystemProfile: false))
dismiss()
}
.keyboardShortcut(.cancelAction)
Spacer()
Button("Allow") {
request.reply(.init(automaticUpdateChecks: true, sendSystemProfile: false))
dismiss()
}
.keyboardShortcut(.defaultAction)
.buttonStyle(.borderedProminent)
}
}
.padding(16)
}
}
fileprivate struct CheckingView: View {
let checking: UpdateViewModel.State.Checking
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
HStack(spacing: 10) {
ProgressView()
.controlSize(.small)
Text("Checking for updates…")
.font(.system(size: 13))
}
HStack {
Spacer()
Button("Cancel") {
checking.cancel()
dismiss()
}
.keyboardShortcut(.cancelAction)
.controlSize(.small)
}
}
.padding(16)
}
}
fileprivate struct UpdateAvailableView: View {
let update: UpdateViewModel.State.UpdateAvailable
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 0) {
VStack(alignment: .leading, spacing: 12) {
VStack(alignment: .leading, spacing: 8) {
Text("Update Available")
.font(.system(size: 13, weight: .semibold))
VStack(alignment: .leading, spacing: 4) {
HStack(spacing: 6) {
Text("Version:")
.foregroundColor(.secondary)
.frame(width: 50, alignment: .trailing)
Text(update.appcastItem.displayVersionString)
}
.font(.system(size: 11))
}
}
HStack(spacing: 8) {
Button("Skip") {
update.reply(.skip)
dismiss()
}
.controlSize(.small)
Button("Later") {
update.reply(.skip)
dismiss()
}
.controlSize(.small)
.keyboardShortcut(.cancelAction)
Spacer()
Button("Install") {
update.reply(.install)
dismiss()
}
.keyboardShortcut(.defaultAction)
.buttonStyle(.borderedProminent)
.controlSize(.small)
}
}
.padding(16)
}
}
}
fileprivate struct DownloadingView: View {
let download: UpdateViewModel.State.Downloading
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("Downloading Update")
.font(.system(size: 13, weight: .semibold))
if let expectedLength = download.expectedLength, expectedLength > 0 {
let progress = Double(download.progress) / Double(expectedLength)
VStack(alignment: .leading, spacing: 6) {
ProgressView(value: progress)
Text(String(format: "%.0f%%", progress * 100))
.font(.system(size: 11))
.foregroundColor(.secondary)
}
} else {
ProgressView()
.controlSize(.small)
}
}
HStack {
Spacer()
Button("Cancel") {
download.cancel()
dismiss()
}
.keyboardShortcut(.cancelAction)
.controlSize(.small)
}
}
.padding(16)
}
}
fileprivate struct ExtractingView: View {
let extracting: UpdateViewModel.State.Extracting
var body: some View {
VStack(alignment: .leading, spacing: 8) {
Text("Preparing Update")
.font(.system(size: 13, weight: .semibold))
VStack(alignment: .leading, spacing: 6) {
ProgressView(value: extracting.progress)
Text(String(format: "%.0f%%", extracting.progress * 100))
.font(.system(size: 11))
.foregroundColor(.secondary)
}
}
.padding(16)
}
}
fileprivate struct ReadyToInstallView: View {
let ready: UpdateViewModel.State.ReadyToInstall
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("Ready to Install")
.font(.system(size: 13, weight: .semibold))
Text("The update is ready to install.")
.font(.system(size: 11))
.foregroundColor(.secondary)
}
HStack(spacing: 8) {
Button("Later") {
ready.reply(.dismiss)
dismiss()
}
.keyboardShortcut(.cancelAction)
.controlSize(.small)
Spacer()
Button("Install and Relaunch") {
ready.reply(.install)
dismiss()
}
.keyboardShortcut(.defaultAction)
.buttonStyle(.borderedProminent)
.controlSize(.small)
}
}
.padding(16)
}
}
fileprivate struct InstallingView: View {
var body: some View {
VStack(alignment: .leading, spacing: 8) {
HStack(spacing: 10) {
ProgressView()
.controlSize(.small)
Text("Installing…")
.font(.system(size: 13, weight: .semibold))
}
Text("The application will relaunch shortly.")
.font(.system(size: 11))
.foregroundColor(.secondary)
}
.padding(16)
}
}
fileprivate struct NotFoundView: View {
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
Text("No Updates Found")
.font(.system(size: 13, weight: .semibold))
Text("You're already running the latest version.")
.font(.system(size: 11))
.foregroundColor(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
HStack {
Spacer()
Button("OK") {
dismiss()
}
.keyboardShortcut(.defaultAction)
.controlSize(.small)
}
}
.padding(16)
}
}
fileprivate struct ErrorView: View {
let error: UpdateViewModel.State.Error
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 8) {
HStack(spacing: 8) {
Image(systemName: "exclamationmark.triangle.fill")
.foregroundColor(.orange)
.font(.system(size: 13))
Text("Update Failed")
.font(.system(size: 13, weight: .semibold))
}
if case let .error(err) = model.state {
Text(err.error.localizedDescription)
.font(.system(size: 11))
.foregroundColor(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
Text(error.error.localizedDescription)
.font(.system(size: 11))
.foregroundColor(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
HStack(spacing: 8) {
Button("OK") {
@@ -93,10 +353,9 @@
Spacer()
Button("Retry") {
guard case let .error(err) = model.state else { return }
err.retry()
error.retry()
dismiss()
}
.keyboardShortcut(.defaultAction)
.controlSize(.small)
Done! I've refactored all the views into dedicated fileprivate structs that take typed parameters, eliminating all the guard statements.
The user wants me to build the project and fix any errors. According to the AGENTS.md file, the build command is zig build. Let me run that first to see if there are any errors.
zig build
install
+- copy app bundle
+- xcodebuild failure
** BUILD FAILED **
The following build commands failed:
SwiftCompile normal x86_64 Compiling\ UpdatePopoverView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift (in target 'Ghostty' from project 'Ghostty')
SwiftCompile normal x86_64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift (in target 'Ghostty' from project 'Ghostty')
SwiftCompile normal arm64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift (in target 'Ghostty' from project 'Ghostty')
(3 failures)
error: the following command exited with code 65 (expected exited with code 0):
cd /Users/mitchellh/Documents/ghostty/macos && xcodebuild -target Ghostty -configuration Debug
Build Summary: 275/278 steps succeeded; 1 failed
install transitive failure
+- copy app bundle transitive failure
+- xcodebuild failure
error: the following build command failed with exit code 1:
.zig-cache/o/ee7f7ad04b834e264cd6403d333044c7/build /nix/store/4y9lx4a29dshij997i4i7j2kxwqk2zs2-zig-0.15.1/bin/zig /nix/store/4y9lx4a29dshij997i4i7j2kxwqk2zs2-zig-0.15.1/lib /Users/mitchellh/Documents/ghostty .zig-cache /Users/mitchellh/.cache/zig --seed 0x4cf9176c -Zc779e4af0f4f070f
Process exited with code 1
cd macos && xcodebuild -target Ghostty -configuration Debug 2>&1 | grep -A 10 "UpdatePopoverView.swift"
SwiftCompile normal x86_64 Compiling\ TerminalView.swift,\ UpdateBadge.swift,\ UpdateDelegate.swift,\ UpdateDriver.swift,\ UpdatePill.swift,\ UpdatePopoverView.swift,\ UpdateViewModel.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/TerminalView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateBadge.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateDelegate.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateDriver.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePill.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift (in target 'Ghostty' from project 'Ghostty')
Failed frontend command:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/mitchellh/Documents/ghostty/macos/Sources/App/macOS/AppDelegate.swift /Users/mitchellh/Documents/ghostty/macos/Sources/App/macOS/main.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/About/AboutController.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/About/AboutView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/Entities/CommandEntity.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/Entities/TerminalEntity.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/CloseTerminalIntent.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/CommandPaletteIntent.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/FocusTerminalIntent.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/GetTermi
nalDetailsIntent.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/GhosttyIntentError.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/InputIntent.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/IntentPermission.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/KeybindIntent.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/NewTerminalIntent.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/App\ Intents/QuickTerminalIntent.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationController.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/ClipboardConfirmation/ClipboardConfirmationView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Colorized\ Ghostty\ Icon/ColorizedGhosttyIcon.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Colorized\ Ghostt
y\ Icon/ColorizedGhosttyIconImage.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Colorized\ Ghostty\ Icon/ColorizedGhosttyIconView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Command\ Palette/CommandPalette.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Command\ Palette/TerminalCommandPalette.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Global\ Keybinds/GlobalEventTap.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/QuickTerminal/QuickTerminalPosition.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/QuickTerminal/QuickTerminalScreen.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/QuickTerminal/QuickTerminalSize.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/QuickTerminal/QuickTerminalSpaceBehavior.swift /Users/mitchellh/Documents/ghostty/macos/Sources/
Features/QuickTerminal/QuickTerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Secure\ Input/SecureInput.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Secure\ Input/SecureInputOverlay.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Services/ServiceProvider.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Settings/ConfigurationErrorsController.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Settings/ConfigurationErrorsView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Settings/SettingsView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Splits/SplitTree.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Splits/SplitView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Splits/SplitView.Divider.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Splits/TerminalSplitTreeView.swift /Users/mitchellh/Documents/ghostty/macos/Sour
ces/Features/Terminal/Window\ Styles/HiddenTitlebarTerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window\ Styles/TerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window\ Styles/TitlebarTabsTahoeTerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window\ Styles/TitlebarTabsVenturaTerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window\ Styles/TransparentTitlebarTerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/BaseTerminalController.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/ErrorView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/TerminalController.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/TerminalRestorable.swift -primary-file /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/TerminalView.swif
t -primary-file /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateBadge.swift -primary-file /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateDelegate.swift -primary-file /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateDriver.swift -primary-file /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePill.swift -primary-file /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift -primary-file /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/FullscreenMode+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.Action.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.App.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.Command.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.Config.swift /User
s/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.Error.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.Event.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.Input.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.Shell.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Ghostty.Surface.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/InspectorView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/NSEvent+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/Package.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/SurfaceProgressBar.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/SurfaceView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Ghostty/SurfaceView_AppKit.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/Array+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Ext
ensions/Double+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/Duration+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/EventModifiers+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/FileHandle+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/KeyboardShortcut+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSAppearance+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSApplication+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSImage+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSMenuItem+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSPasteboard+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSScreen+Extension.swift /Users/mi
tchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSView+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSWindow+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/NSWorkspace+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/Optional+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/OSColor+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/String+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/UndoManager+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Extensions/View+Extension.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Private/CGS.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Private/Dock.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/AppInfo.swift /Users/mitchellh/Documents/ghostty/macos/Sourc
es/Helpers/Backport.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/CodableBridge.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/CrossKit.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Cursor.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/DraggableWindowView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/ExpiringUndoManager.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/Fullscreen.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/HostingWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/KeyboardLayout.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/LastWindowPosition.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/MetalView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/PermissionRequest.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Helpers/TabGroupCloseCoordinator.swift /Users/mitchellh/Documents/ghostty/m
acos/Sources/Helpers/Weak.swift /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/DerivedSources/GeneratedAssetSymbols.swift -supplementary-output-file-map /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/supplementaryOutputs-14 -emit-localized-strings -emit-localized-strings-path /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64 -target x86_64-apple-macos13.0 -module-can-import-version AppKit 2685.10.108 2685.10.108 -module-can-import-version DeveloperToolsSupport 23.0.4 23.0.4 -module-can-import-version SwiftUI 7.0.84.1 7.0.84 -disable-cross-import-overlay-search -swift-module-cross-import AppIntents /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppIntents.framework/Modules/AppIntents.swiftcrossimport/AppKit.swiftoverlay -swift-module-cross-import AppIntents /Applications/Xc
ode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppIntents.framework/Modules/AppIntents.swiftcrossimport/SwiftUI.swiftoverlay -swift-module-cross-import AppIntents /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppIntents.framework/Modules/AppIntents.swiftcrossimport/UIKit.swiftoverlay -swift-module-cross-import AppIntents /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/AppIntents.framework/Modules/AppIntents.swiftcrossimport/AppKit.swiftoverlay -swift-module-cross-import AppIntents /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/AppIntents.framework/Modules/AppIntents.swiftcrossimport/SwiftUI.swiftoverlay -swift-module-cross-import AppIntents /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.pla
tform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/AppIntents.framework/Modules/AppIntents.swiftcrossimport/UIKit.swiftoverlay -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins/libAppIntentsMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server\#AppIntentsMacros -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-plugi
n /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/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.bui
ld/Objects-normal/x86_64/Ghostty-dependencies-1.json -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk -I /Users/mitchellh/Documents/ghostty/macos/build/Debug -F /Users/mitchellh/Documents/ghostty/macos/build/Debug -no-color-diagnostics -Xcc -fno-color-diagnostics -enable-testing -g -debug-info-format\=dwarf -dwarf-version\=4 -module-cache-path /Users/mitchellh/Documents/ghostty/macos/build/SwiftExplicitPrecompiledModules -swift-version 5 -enforce-exclusivity\=checked -Onone -D DEBUG -serialize-debugging-options -const-gather-protocols-file /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/Ghostty_const_extract_protocols.json -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -empty-abi-descriptor -validate-clang-modules-once -clang-build-session-file /var/folders/wb/3_vmqht15zsbmzrz_bm__z_80000gn/C/org.llvm.clang/ModuleCa
che.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /Users/mitchellh/Documents/ghostty/macos -enable-anonymous-context-mangled-names -file-compilation-dir /Users/mitchellh/Documents/ghostty/macos -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -Xcc -I/Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Ghostty-generated-files.hmap -Xcc -I/Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Ghostty-own-target-headers.hmap -Xcc -I/Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Ghostty-all-target-headers.hmap -Xcc -iquote -Xcc /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Ghostty-project-headers.hmap -Xcc -I/Users/mitchellh/Documents/ghostty/macos/build/Debug/include -Xcc -I/Users/mitchellh/Documents/ghostty/macos/build/Gho
stty.build/Debug/Ghostty.build/DerivedSources-normal/x86_64 -Xcc -I/Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/DerivedSources/x86_64 -Xcc -I/Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/DerivedSources -Xcc -DDEBUG\=1 -import-objc-header /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/Ghostty-primary-Bridging-header.pch -no-auto-bridging-header-chaining -module-name Ghostty -frontend-parseable-output -disable-clang-spi -target-sdk-version 26.0 -target-sdk-name macosx26.0 -clang-target x86_64-apple-macos26.0 -in-process-plugin-server-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -o /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/TerminalView.o -o /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.
build/Objects-normal/x86_64/UpdateBadge.o -o /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdateDelegate.o -o /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdateDriver.o -o /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdatePill.o -o /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdatePopoverView.o -o /Users/mitchellh/Documents/ghostty/macos/build/Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdateViewModel.o -index-unit-output-path /Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/TerminalView.o -index-unit-output-path /Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdateBadge.o -index-unit-output-path /Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdateDelegate.o -index-unit-output-path /Ghostty.build/Debug/Ghostty.bui
ld/Objects-normal/x86_64/UpdateDriver.o -index-unit-output-path /Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdatePill.o -index-unit-output-path /Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdatePopoverView.o -index-unit-output-path /Ghostty.build/Debug/Ghostty.build/Objects-normal/x86_64/UpdateViewModel.o
SwiftCompile normal x86_64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/TerminalView.swift (in target 'Ghostty' from project 'Ghostty')
cd /Users/mitchellh/Documents/ghostty/macos
SwiftCompile normal x86_64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateBadge.swift (in target 'Ghostty' from project 'Ghostty')
cd /Users/mitchellh/Documents/ghostty/macos
SwiftCompile normal x86_64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateDelegate.swift (in target 'Ghostty' from project 'Ghostty')
--
SwiftCompile normal x86_64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift (in target 'Ghostty' from project 'Ghostty')
cd /Users/mitchellh/Documents/ghostty/macos
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:70:34: error: 'State' is not a member type of class 'Ghostty.UpdateViewModel'
let request: UpdateViewModel.State.PermissionRequest
~~~~~~~~~~~~~~~ ^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift:56:7: note: 'UpdateViewModel' declared here
class UpdateViewModel: ObservableObject {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:107:35: error: 'State' is not a member type of class 'Ghostty.UpdateViewModel'
let checking: UpdateViewModel.State.Checking
~~~~~~~~~~~~~~~ ^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift:56:7: note: 'UpdateViewModel' declared here
class UpdateViewModel: ObservableObject {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:134:33: error: 'State' is not a member type of class 'Ghostty.UpdateViewModel'
let update: UpdateViewModel.State.UpdateAvailable
~~~~~~~~~~~~~~~ ^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift:56:7: note: 'UpdateViewModel' declared here
class UpdateViewModel: ObservableObject {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:186:35: error: 'State' is not a member type of class 'Ghostty.UpdateViewModel'
let download: UpdateViewModel.State.Downloading
~~~~~~~~~~~~~~~ ^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift:56:7: note: 'UpdateViewModel' declared here
class UpdateViewModel: ObservableObject {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:224:37: error: 'State' is not a member type of class 'Ghostty.UpdateViewModel'
let extracting: UpdateViewModel.State.Extracting
~~~~~~~~~~~~~~~ ^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift:56:7: note: 'UpdateViewModel' declared here
class UpdateViewModel: ObservableObject {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:243:32: error: 'State' is not a member type of class 'Ghostty.UpdateViewModel'
let ready: UpdateViewModel.State.ReadyToInstall
~~~~~~~~~~~~~~~ ^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift:56:7: note: 'UpdateViewModel' declared here
class UpdateViewModel: ObservableObject {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:327:32: error: 'State' is not a member type of class 'Ghostty.UpdateViewModel'
let error: UpdateViewModel.State.Error
~~~~~~~~~~~~~~~ ^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift:56:7: note: 'UpdateViewModel' declared here
class UpdateViewModel: ObservableObject {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:326:20: error: invalid redeclaration of 'ErrorView'
fileprivate struct ErrorView: View {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/ErrorView.swift:3:8: note: 'ErrorView' previously declared here
struct ErrorView: View {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/ErrorView.swift:3:8: note: 'ErrorView' previously declared here
struct ErrorView: View {
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:87:36: error: cannot infer contextual base in reference to member 'init'
request.reply(.init(automaticUpdateChecks: false, sendSystemProfile: false))
~^~~~
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:232:17: error: generic parameter 'V' could not be inferred
ProgressView(value: extracting.progress)
^
SwiftUI.ProgressView.init:2:20: note: in call to initializer
nonisolated public init<V>(value: V?, total: V = 1.0) where Label == EmptyView, CurrentValueLabel == EmptyView, V : BinaryFloatingPoint}
^
/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift:259:34: error: cannot infer contextual base in reference to member 'dismiss'
ready.reply(.dismiss)
~^~~~~~~
SwiftCompile normal x86_64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift (in target 'Ghostty' from project 'Ghostty')
cd /Users/mitchellh/Documents/ghostty/macos
SwiftCompile normal x86_64 Compiling\ TitlebarTabsTahoeTerminalWindow.swift,\ TitlebarTabsVenturaTerminalWindow.swift,\ TransparentTitlebarTerminalWindow.swift,\ BaseTerminalController.swift,\ ErrorView.swift,\ TerminalController.swift,\ TerminalRestorable.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window\ Styles/TitlebarTabsTahoeTerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window\ Styles/TitlebarTabsVenturaTerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window\ Styles/TransparentTitlebarTerminalWindow.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/BaseTerminalController.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/ErrorView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/TerminalController.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/TerminalRestorable.swift (in target
'Ghostty' from project 'Ghostty')
SwiftCompile normal x86_64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/Window\ Styles/TitlebarTabsTahoeTerminalWindow.swift (in target 'Ghostty' from project 'Ghostty')
--
SwiftCompile normal x86_64 Compiling\ TerminalView.swift,\ UpdateBadge.swift,\ UpdateDelegate.swift,\ UpdateDriver.swift,\ UpdatePill.swift,\ UpdatePopoverView.swift,\ UpdateViewModel.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Terminal/TerminalView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateBadge.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateDelegate.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateDriver.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePill.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift (in target 'Ghostty' from project 'Ghostty')
SwiftCompile normal x86_64 /Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdatePopoverView.swift (in target 'Ghostty' from project 'Ghostty')
(2 failures)
Now I can see the issues. The State is actually named UpdateState and is a separate enum. Also, there's a naming conflict with ErrorView. Let me fix these:
@@ -66,9 +66,9 @@
}
fileprivate struct PermissionRequestView: View {
let request: UpdateViewModel.State.PermissionRequest
let request: UpdateState.PermissionRequest
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -103,9 +103,9 @@
}
}
fileprivate struct CheckingView: View {
let checking: UpdateViewModel.State.Checking
let checking: UpdateState.Checking
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -130,9 +130,9 @@
}
}
fileprivate struct UpdateAvailableView: View {
let update: UpdateViewModel.State.UpdateAvailable
let update: UpdateState.UpdateAvailable
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 0) {
@@ -182,9 +182,9 @@
}
}
fileprivate struct DownloadingView: View {
let download: UpdateViewModel.State.Downloading
let download: UpdateState.Downloading
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -220,9 +220,9 @@
}
}
fileprivate struct ExtractingView: View {
let extracting: UpdateViewModel.State.Extracting
let extracting: UpdateState.Extracting
var body: some View {
VStack(alignment: .leading, spacing: 8) {
Text("Preparing Update")
@@ -239,9 +239,9 @@
}
}
fileprivate struct ReadyToInstallView: View {
let ready: UpdateViewModel.State.ReadyToInstall
let ready: UpdateState.ReadyToInstall
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -322,10 +322,10 @@
.padding(16)
}
}
fileprivate struct ErrorView: View {
let error: UpdateViewModel.State.Error
fileprivate struct UpdateErrorView: View {
let error: UpdateState.Error
let dismiss: DismissAction
var body: some View {
VStack(alignment: .leading, spacing: 16) {
@@ -41,9 +41,9 @@
case .notFound:
NotFoundView(dismiss: dismiss)
case .error(let error):
ErrorView(error: error, dismiss: dismiss)
UpdateErrorView(error: error, dismiss: dismiss)
}
}
.frame(width: 300)
}
Now I need to fix the remaining compilation errors. Let me check the exact types for SUUpdatePermissionResponse and SPUUserUpdateChoice:
Thread
Reference Thread
T-3ff3649d-4610-4bbe-8c2a-7875b03e9a5d