Merge nucleic/upbeat-drift-newt into dev

This commit is contained in:
2026-06-13 21:51:59 -07:00
+21 -19
View File
@@ -150,6 +150,27 @@ struct RootView: View {
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
.background(AppTheme.background)
// Transient error bubble (e.g. "Autoship failed: "). Scoped to the detail
// pane so it centers over the chat interface, not the full window width.
.overlay(alignment: .bottom) {
if let error = store.lastError {
Text(error)
.font(.caption).padding(8)
.background(.red.opacity(0.85), in: .rect(cornerRadius: 8))
.foregroundStyle(.white).padding()
// Click anywhere on the bubble to dismiss it immediately
.onTapGesture { store.lastError = nil }
.help("Click to dismiss")
// and auto-dismiss after a few seconds so it never sticks. The
// task is keyed on the message so a new error restarts the timer.
.task(id: error) {
try? await Task.sleep(for: .seconds(6))
if store.lastError == error { store.lastError = nil }
}
.transition(.opacity)
}
}
.animation(.default, value: store.lastError)
.navigationTitle(windowTitle)
}
.preferredColorScheme(appearance.colorScheme)
@@ -198,25 +219,6 @@ struct RootView: View {
} message: {
Text("Removes the project and all its chats, worktrees, and branches. Your repository itself is not affected.")
}
.overlay(alignment: .bottom) {
if let error = store.lastError {
Text(error)
.font(.caption).padding(8)
.background(.red.opacity(0.85), in: .rect(cornerRadius: 8))
.foregroundStyle(.white).padding()
// Click anywhere on the bubble to dismiss it immediately
.onTapGesture { store.lastError = nil }
.help("Click to dismiss")
// and auto-dismiss after a few seconds so it never sticks. The
// task is keyed on the message so a new error restarts the timer.
.task(id: error) {
try? await Task.sleep(for: .seconds(6))
if store.lastError == error { store.lastError = nil }
}
.transition(.opacity)
}
}
.animation(.default, value: store.lastError)
}
/// Toggle the sidebar through the AppKit split-view item we own (see