From 52a2dfe08b5ef681991b40bcaa740684be7c2673 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 20 Dec 2025 19:46:06 +0000 Subject: [PATCH] feat(onboarding): hide kickoff bubble and tweak typing --- .../Sources/ClawdisChatUI/ChatMessageViews.swift | 15 ++++++++++----- .../Sources/ClawdisChatUI/ChatView.swift | 11 +++++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatMessageViews.swift b/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatMessageViews.swift index bba3ef2d7..3f6793e9e 100644 --- a/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatMessageViews.swift +++ b/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatMessageViews.swift @@ -120,15 +120,20 @@ private struct AttachmentRow: View { @MainActor struct ChatTypingIndicatorBubble: View { + let style: ClawdisChatView.Style + var body: some View { HStack(spacing: 10) { TypingDots() - Text("Clawd is thinking…") - .font(.subheadline) - .foregroundStyle(.secondary) - Spacer() + if self.style == .standard { + Text("Clawd is thinking…") + .font(.subheadline) + .foregroundStyle(.secondary) + Spacer() + } } - .padding(12) + .padding(.vertical, self.style == .standard ? 12 : 10) + .padding(.horizontal, self.style == .standard ? 12 : 14) .background( RoundedRectangle(cornerRadius: 16, style: .continuous) .fill(ClawdisChatTheme.assistantBubble)) diff --git a/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatView.swift b/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatView.swift index 227b030e7..c20959265 100644 --- a/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatView.swift +++ b/apps/shared/ClawdisKit/Sources/ClawdisChatUI/ChatView.swift @@ -69,7 +69,7 @@ public struct ClawdisChatView: View { ScrollViewReader { proxy in ScrollView { LazyVStack(spacing: Layout.messageSpacing) { - ForEach(self.viewModel.messages) { msg in + ForEach(self.visibleMessages) { msg in ChatMessageBubble(message: msg) .frame( maxWidth: .infinity, @@ -77,7 +77,7 @@ public struct ClawdisChatView: View { } if self.viewModel.pendingRunCount > 0 { - ChatTypingIndicatorBubble() + ChatTypingIndicatorBubble(style: self.style) .frame(maxWidth: .infinity, alignment: .leading) } @@ -111,4 +111,11 @@ public struct ClawdisChatView: View { } } } + + private var visibleMessages: [ClawdisChatMessage] { + guard self.style == .onboarding else { return self.viewModel.messages } + guard let first = self.viewModel.messages.first else { return [] } + guard first.role.lowercased() == "user" else { return self.viewModel.messages } + return Array(self.viewModel.messages.dropFirst()) + } }