From a1814d016c20e8464214f696d781cd668f2e9c47 Mon Sep 17 00:00:00 2001 From: ARIA Date: Fri, 21 Aug 2026 00:01:13 +0200 Subject: [PATCH] User bubbles: move timestamp + delivery checkmarks to their own bottom-right line (Telegram look, matching agent bubbles) instead of inline at the end of the text --- .../kotlin/iris/ui/screens/ChatScreen.kt | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/app/shared/src/commonMain/kotlin/iris/ui/screens/ChatScreen.kt b/app/shared/src/commonMain/kotlin/iris/ui/screens/ChatScreen.kt index ffd89e5..0de9df7 100644 --- a/app/shared/src/commonMain/kotlin/iris/ui/screens/ChatScreen.kt +++ b/app/shared/src/commonMain/kotlin/iris/ui/screens/ChatScreen.kt @@ -1912,33 +1912,35 @@ private fun MessageBubble( Spacer(modifier = Modifier.height(6.dp)) } if (isUser) { - // M7: text + inline timestamp / delivery status at the end - // (reference look); the bubble hugs its content. User text is - // rendered as markdown too (bold / italic / inline code), so a - // pasted snippet or emphasis shows up the same as in replies. - Row(verticalAlignment = Alignment.Bottom) { - if (msg.text.isNotBlank() || msg.streaming) { - MarkdownText( - text = msg.text.prepareForMarkdown().preserveNewlinesAsHardBreaks() + - if (msg.streaming) " ▉" else "", - color = textColor, - fontSize = 15.sp, - ) + // M7: user text rendered as markdown (bold / italic / inline + // code), so a pasted snippet or emphasis shows up the same as + // in replies. + if (msg.text.isNotBlank() || msg.streaming) { + MarkdownText( + text = msg.text.prepareForMarkdown().preserveNewlinesAsHardBreaks() + + if (msg.streaming) " ▉" else "", + color = textColor, + fontSize = 15.sp, + ) + } + // M7: timestamp + delivery status on their own line at the + // bottom-right (Telegram look, same as agent bubbles). + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.End, + verticalAlignment = Alignment.CenterVertically, + ) { + if (time.isNotEmpty()) { + Text(time, fontSize = 10.sp, color = textColor.copy(alpha = 0.6f)) } - Spacer(modifier = Modifier.width(8.dp)) - Row(verticalAlignment = Alignment.CenterVertically) { - if (time.isNotEmpty()) { - Text(time, fontSize = 10.sp, color = textColor.copy(alpha = 0.6f)) - } - when (msg.status) { - MsgStatus.Pending -> - Text(" sending…", fontSize = 10.sp, color = textColor.copy(alpha = 0.6f)) - MsgStatus.Sent -> - Text(" ✓", fontSize = 10.sp, color = textColor.copy(alpha = 0.8f)) - MsgStatus.Read -> - Text(" ✓✓", fontSize = 10.sp, color = textColor.copy(alpha = 0.8f)) - MsgStatus.Failed -> Unit - } + when (msg.status) { + MsgStatus.Pending -> + Text(" sending…", fontSize = 10.sp, color = textColor.copy(alpha = 0.6f)) + MsgStatus.Sent -> + Text(" ✓", fontSize = 10.sp, color = textColor.copy(alpha = 0.8f)) + MsgStatus.Read -> + Text(" ✓✓", fontSize = 10.sp, color = textColor.copy(alpha = 0.8f)) + MsgStatus.Failed -> Unit } } if (msg.status == MsgStatus.Failed) {