From 41490b2251135b8041866c1a7cd98a7551d31f0a Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 18 Oct 2026 21:44:53 -0700 Subject: [PATCH] clear merged --- mac/Sources/Byre/Chat.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mac/Sources/Byre/Chat.swift b/mac/Sources/Byre/Chat.swift index 672acdc..3fe9ad0 100644 --- a/mac/Sources/Byre/Chat.swift +++ b/mac/Sources/Byre/Chat.swift @@ -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(@ViewBuilder _ content: () -> Content) -> some View { + private func header(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) }