macOS client parity review

This commit is contained in:
Ian Gulliver
2026-10-17 10:54:06 -07:00
parent b85de9a2d0
commit 31037e1c9f
24 changed files with 651 additions and 225 deletions
+17 -3
View File
@@ -8,12 +8,14 @@ let goKeys: Set<String> = ["k", "p", "l", "s", "/"]
@MainActor
func runGo(_ key: String, _ store: Store, _ overlays: Overlays) {
overlays.image = nil
switch key {
case "k":
overlays.openSwitcher(store)
case "p":
store.focusTab(.project)
case "l":
overlays.switcher?.close()
overlays.leftTab = .lead
overlays.leadFocus += 1
case "s":
@@ -380,7 +382,7 @@ private struct SwitcherBox: View {
.padding(10)
.background(Palette.raised, in: RoundedRectangle(cornerRadius: 10))
.overlay(RoundedRectangle(cornerRadius: 10).stroke(Palette.border))
.shadow(color: .black.opacity(0.18), radius: 14, y: 8)
.shadow(color: overlayShadow, radius: 14, y: 8)
.onAppear {
DispatchQueue.main.async {
logFocus("switcher before focus")
@@ -406,7 +408,8 @@ private struct SwitcherRowView: View {
case .task(let project, let task, let count):
let ts = store.taskState(task)
let color = taskPalette[task.color]
StateMark(state: ts, color: color)
StateDot(filled: ts.kind == .working || ts.kind == .merging ? Palette.ok : ts.kind == .answer ? Palette.warn : ts.kind == .error ? Palette.danger : nil)
.help(ts.title)
Text(taskTitle(project, task, color))
.lineLimit(1)
.truncationMode(.tail)
@@ -429,32 +432,43 @@ private struct SwitcherRowView: View {
StateDot(filled: nil)
Text(p.name)
.foregroundStyle(Palette.muted)
.lineLimit(1)
.truncationMode(.tail)
.frame(maxWidth: .infinity, alignment: .leading)
state("project")
case .newTask(let p, let title):
Text(created([("New task in ", nil), (p.name, Palette.muted), (": \(title)", nil)]))
.foregroundStyle(Palette.accent)
.lineLimit(1)
.truncationMode(.tail)
.frame(maxWidth: .infinity, alignment: .leading)
state(models[0])
.help("Model for the first message")
case .startTask(let p, let title):
Text(created([("Start in ", nil), (p.name, Palette.muted), (": \(title)", nil)]))
.foregroundStyle(Palette.accent)
.lineLimit(1)
.truncationMode(.tail)
.frame(maxWidth: .infinity, alignment: .leading)
state(models[0])
.help("The title is the agent's first message")
case .startWorkflow(let p, let title):
Text(created([("Start workflow… in ", nil), (p.name, Palette.muted), (": \(title)", nil)]))
.foregroundStyle(Palette.accent)
.lineLimit(1)
.truncationMode(.tail)
.frame(maxWidth: .infinity, alignment: .leading)
state("workflow")
case .workflow(let p, let title, let w):
VStack(alignment: .leading, spacing: 0) {
Text(workflowTitle(p, title, w))
.lineLimit(1)
.truncationMode(.tail)
if !w.description.isEmpty {
Text(w.description)
.foregroundStyle(Palette.muted)
.fixedSize(horizontal: false, vertical: true)
.lineLimit(1)
.truncationMode(.tail)
}
}
.foregroundStyle(Palette.accent)