From ee26e27f3b4e8929c7181abc032f288dd1f88fb9 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sat, 24 Oct 2026 07:23:20 -0700 Subject: [PATCH] Highlight the task switch icon when other tasks need attention --- mac/Sources/Byre/Panes.swift | 2 +- mac/Sources/Byre/Phone.swift | 2 +- mac/Sources/Byre/Store.swift | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mac/Sources/Byre/Panes.swift b/mac/Sources/Byre/Panes.swift index 516fb3c..1f458ab 100644 --- a/mac/Sources/Byre/Panes.swift +++ b/mac/Sources/Byre/Panes.swift @@ -343,7 +343,7 @@ struct TaskBar: View { } label: { Image(systemName: "list.bullet") .font(Fonts.font(13, weight: 600)) - .foregroundStyle(accent) + .foregroundStyle(store.otherTasksNeedAttention ? Palette.warn : accent) .padding(.vertical, 6) .contentShape(Rectangle()) } diff --git a/mac/Sources/Byre/Phone.swift b/mac/Sources/Byre/Phone.swift index 178ac38..2cf68e2 100644 --- a/mac/Sources/Byre/Phone.swift +++ b/mac/Sources/Byre/Phone.swift @@ -186,7 +186,7 @@ struct PhoneView: View { } label: { Image(systemName: "list.bullet") .font(Fonts.font(17, weight: 600)) - .foregroundStyle(Palette.accent) + .foregroundStyle(store.otherTasksNeedAttention ? Palette.warn : Palette.accent) .padding(.horizontal, 10) .padding(.vertical, 8) .contentShape(Rectangle()) diff --git a/mac/Sources/Byre/Store.swift b/mac/Sources/Byre/Store.swift index dd70080..d2c5f18 100644 --- a/mac/Sources/Byre/Store.swift +++ b/mac/Sources/Byre/Store.swift @@ -77,6 +77,11 @@ final class Store { var savedCommands: [SavedCommand] = [] var sessions: [String: [AgentSession]] = [:] var inbox: [InboxItem] = [] + var otherTasksNeedAttention: Bool { + inbox.contains { $0.taskId != selectedTaskId } || tasks.values.contains { list in + list.contains { $0.id != selectedTaskId && taskState($0).needsYou } + } + } private(set) var terminals: [String: [TaskTerminal]] = [:] private(set) var selectedTaskId: String? var pinned: Int?