From 944e6ce644caaba0ec08f291f862bc488f65dc63 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 00:54:08 -0700 Subject: [PATCH] Chat View Refinement Nucleic-Session: 4E56990A-96AE-4597-9140-753CB82E769D Co-authored-by: Nucleic --- .../NucleicRemote/Views/TranscriptRow.swift | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/NucleicRemote/NucleicRemote/Views/TranscriptRow.swift b/NucleicRemote/NucleicRemote/Views/TranscriptRow.swift index b73264b..5781050 100644 --- a/NucleicRemote/NucleicRemote/Views/TranscriptRow.swift +++ b/NucleicRemote/NucleicRemote/Views/TranscriptRow.swift @@ -63,20 +63,27 @@ struct TranscriptRow: View { /// Render an assistant/user message with the full Markdown renderer the Mac transcript uses /// (fenced code blocks, headings, lists, tables, and inline emphasis/links/`code`), preserving /// the line breaks of multi-paragraph replies. Falls back to plain text if parsing fails. +/// The user's messages sit right-aligned in a soft accent bubble; the assistant's prose runs +/// open on the background — no box — so the transcript reads as a page, not a stack of cards. struct MessageBubble: View { let role: TranscriptItem.Role let text: String var body: some View { - HStack { - if role == .user { Spacer(minLength: 40) } + if role == .user { + HStack { + Spacer(minLength: 48) + MarkdownText(markdown: text) + .textSelection(.enabled) + .padding(.horizontal, 14) + .padding(.vertical, 9) + .background(Palette.accent.opacity(0.15), + in: RoundedRectangle(cornerRadius: 18, style: .continuous)) + } + } else { MarkdownText(markdown: text) .textSelection(.enabled) - .padding(10) - .background(role == .user ? Palette.accent.opacity(0.15) : Color(.secondarySystemBackground), - in: RoundedRectangle(cornerRadius: 12)) - .frame(maxWidth: .infinity, alignment: role == .user ? .trailing : .leading) - if role == .assistant { Spacer(minLength: 40) } + .frame(maxWidth: .infinity, alignment: .leading) } }