Remove the task Project tab; ⌘P selects the project

This commit is contained in:
Ian Gulliver
2026-10-21 20:53:54 -07:00
parent f0213e2aed
commit e6da67087e
10 changed files with 230 additions and 281 deletions
+4 -7
View File
@@ -3,10 +3,10 @@ import Observation
import SwiftData
enum TaskTab: String {
case transcript, board, changes, files, page, terminal, workflow, project
case transcript, board, changes, files, page, terminal, workflow
}
let taskTabs: [TaskTab] = [.transcript, .board, .changes, .files, .page, .terminal, .workflow, .project]
let taskTabs: [TaskTab] = [.transcript, .board, .changes, .files, .page, .terminal, .workflow]
enum JumpTarget: Equatable {
case question(String)
@@ -470,10 +470,7 @@ final class Store {
}
var primaryTab: TaskTab {
guard let id = selectedTaskId else {
return .project
}
return findTask(id)?.workflow != nil ? .workflow : .transcript
selectedTaskId.flatMap { findTask($0) }?.workflow != nil ? .workflow : .transcript
}
func openTab(_ tab: TaskTab) {
@@ -661,7 +658,7 @@ final class Store {
func selectTask(_ taskId: String?) {
if case .task(let owner)? = sheet?.owner, owner != taskId {
sheet = sheet?.tab == .project && taskId != nil ? Sheet(owner: .task(taskId), view: .tab(.project)) : nil
sheet = nil
}
markVisited(selectedTaskId)
markVisited(taskId)