clear merged

This commit is contained in:
Ian Gulliver
2026-10-18 21:44:53 -07:00
parent a367e4bb73
commit 41490b2251
+10 -2
View File
@@ -379,7 +379,14 @@ private struct ChatHead: View {
}
case .task(let id):
if let id, let task = store.findTask(id) {
if task.status != .active {
if task.status == .merged {
let commit = task.mergeCommit ?? ""
header(background: Palette.okTint) {
Text("✓").foregroundStyle(Palette.ok)
Text("Merged\(commit.isEmpty ? "" : " as \(commit.prefix(7))")")
.foregroundStyle(Palette.text)
}
} else if task.status != .active {
header {
Text(task.status.rawValue)
}
@@ -401,13 +408,14 @@ private struct ChatHead: View {
}
}
private func header<Content: View>(@ViewBuilder _ content: () -> Content) -> some View {
private func header<Content: View>(background: Color = .clear, @ViewBuilder _ content: () -> Content) -> some View {
HStack(spacing: 8) {
content()
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 16)
.padding(.vertical, 8)
.background(background)
.overlay(alignment: .bottom) {
Rectangle().fill(Palette.border).frame(height: 1)
}