A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
fix(macos): keep questions queued during view transitions instead of cancelling (#852)
Ohualtexef25bd70810a
diff --git a/NotchBuddy/Sources/App/HookServer.swift b/NotchBuddy/Sources/App/HookServer.swiftindex e785c34b..199cba0a 100644--- a/NotchBuddy/Sources/App/HookServer.swift+++ b/NotchBuddy/Sources/App/HookServer.swift@@ -159,6 +159,10 @@ final class HookServer: @unchecked Sendable {withAnimation(.spring(response: 0.5, dampingFraction: 0.72)) { state.focusId = prev }}}+ if questions.head != nil {+ showQuestionHead()+ return+ }if let note {state.noteMessage = notestate.view = .note@@ -301,7 +305,9 @@ final class HookServer: @unchecked Sendable {private func showQuestionHead() {let state = AppState.sharedstate.waitingQuestions = questions.entries- guard let head = questions.head, shownQuestion != head.id else { return }+ guard let head = questions.head else { return }+ let needsDisplay = shownQuestion != head.id || state.view != .question+ guard needsDisplay else { return }shownQuestion = head.idstate.pendingQuestion = head.questionstate.isPinned = true@@ -412,9 +418,13 @@ final class HookServer: @unchecked Sendable {}}shownQuestion = nil+ focusBeforeQuestion = nilstate.waitingQuestions = []state.pendingQuestion = nil- for pill in Set(gone.map(\.pillId)) { syncPill(pill) }+ for pill in Set(gone.map(\.pillId)) {+ syncPill(pill)+ clearPillBadge(id: pill)+ }}/// Called by QuestionView "Reply in terminal" button: question `id` (the card's when nil)diff --git a/NotchBuddy/Sources/App/IslandViewContent.swift b/NotchBuddy/Sources/App/IslandViewContent.swiftindex f88489c8..160c568e 100644--- a/NotchBuddy/Sources/App/IslandViewContent.swift+++ b/NotchBuddy/Sources/App/IslandViewContent.swift@@ -624,7 +624,6 @@ struct QuestionView: View {.onChange(of: state.pendingQuestion) { _, _ in resetQuestionState() }// The next session's question can read the same as the one just answered..onChange(of: state.waitingQuestions.first?.id) { _, _ in resetQuestionState() }- .onDisappear { HookServer.shared.releaseQuestionFD() }}private func resetQuestionState() {