Highlight the task switch icon when other tasks need attention

This commit is contained in:
Ian Gulliver
2026-10-24 07:23:20 -07:00
parent 409bda373a
commit ee26e27f3b
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -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())
}
+1 -1
View File
@@ -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())
+5
View File
@@ -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?