fix(onboarding): restore chat bubble styling

main
Peter Steinberger 2025-12-20 21:47:43 +00:00
parent 9ccf80848d
commit cd77dc9563
3 changed files with 13 additions and 4 deletions

View File

@ -1134,7 +1134,7 @@ struct OnboardingView: View {
.buttonStyle(.borderedProminent) .buttonStyle(.borderedProminent)
} }
.padding(.horizontal, 28) .padding(.horizontal, 28)
.padding(.bottom, 36) .padding(.bottom, 16)
.frame(minHeight: 60) .frame(minHeight: 60)
} }

View File

@ -9,9 +9,10 @@ private enum ChatUIConstants {
@MainActor @MainActor
struct ChatMessageBubble: View { struct ChatMessageBubble: View {
let message: ClawdisChatMessage let message: ClawdisChatMessage
let style: ClawdisChatView.Style
var body: some View { var body: some View {
ChatMessageBody(message: self.message, isUser: self.isUser) ChatMessageBody(message: self.message, isUser: self.isUser, style: self.style)
.frame(maxWidth: ChatUIConstants.bubbleMaxWidth, alignment: self.isUser ? .trailing : .leading) .frame(maxWidth: ChatUIConstants.bubbleMaxWidth, alignment: self.isUser ? .trailing : .leading)
.frame(maxWidth: .infinity, alignment: self.isUser ? .trailing : .leading) .frame(maxWidth: .infinity, alignment: self.isUser ? .trailing : .leading)
.padding(.horizontal, 2) .padding(.horizontal, 2)
@ -24,6 +25,7 @@ struct ChatMessageBubble: View {
private struct ChatMessageBody: View { private struct ChatMessageBody: View {
let message: ClawdisChatMessage let message: ClawdisChatMessage
let isUser: Bool let isUser: Bool
let style: ClawdisChatView.Style
var body: some View { var body: some View {
let text = self.primaryText let text = self.primaryText
@ -87,7 +89,14 @@ private struct ChatMessageBody: View {
} }
private var bubbleBackground: AnyShapeStyle { private var bubbleBackground: AnyShapeStyle {
let fill = self.isUser ? ClawdisChatTheme.userBubble : ClawdisChatTheme.assistantBubble let fill: Color
if self.isUser {
fill = ClawdisChatTheme.userBubble
} else if self.style == .onboarding {
fill = ClawdisChatTheme.card
} else {
fill = ClawdisChatTheme.assistantBubble
}
return AnyShapeStyle(fill) return AnyShapeStyle(fill)
} }

View File

@ -70,7 +70,7 @@ public struct ClawdisChatView: View {
ScrollView { ScrollView {
LazyVStack(spacing: Layout.messageSpacing) { LazyVStack(spacing: Layout.messageSpacing) {
ForEach(self.visibleMessages) { msg in ForEach(self.visibleMessages) { msg in
ChatMessageBubble(message: msg) ChatMessageBubble(message: msg, style: self.style)
.frame( .frame(
maxWidth: .infinity, maxWidth: .infinity,
alignment: msg.role.lowercased() == "user" ? .trailing : .leading) alignment: msg.role.lowercased() == "user" ? .trailing : .leading)