Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(chat): wrap long unbroken text inside the user's own bubble

jimind903c42d2a95
diff --git a/src/components/ChatView.tsx b/src/components/ChatView.tsx
index 93d685792b..832efd1868 100644
--- a/src/components/ChatView.tsx
+++ b/src/components/ChatView.tsx
@@ -467,7 +467,7 @@ const Bubble = memo(function Bubble({
: attachmentsOnly || split || tabled
? cn("text-ink", simple && SIMPLE_BUBBLE_TEXT)
: user
- ? cn("whitespace-pre-wrap text-ink", simple ? SIMPLE_USER_BUBBLE : "bg-bubble-user px-4 py-2.5", ownBubbleStyle && "user-bubble-colored", simple && ownBubbleStyle && "antialiased")
+ ? cn("whitespace-pre-wrap [overflow-wrap:anywhere] text-ink", simple ? SIMPLE_USER_BUBBLE : "bg-bubble-user px-4 py-2.5", ownBubbleStyle && "user-bubble-colored", simple && ownBubbleStyle && "antialiased")
: formatted
? cn(formattedReplyWidth(text), "px-1 text-ink")
: simple ? SIMPLE_BOT_BUBBLE : "bg-card px-4 py-2.5 text-ink",
diff --git a/src/components/GroupView.tsx b/src/components/GroupView.tsx
index 6d962125da..ab2ee9cb4f 100644
--- a/src/components/GroupView.tsx
+++ b/src/components/GroupView.tsx
@@ -221,7 +221,7 @@ function RoomTextMessage({
: !simple && !user && isFormattedReply(m.text ?? "")
? cn(formattedReplyWidth(m.text ?? ""), "px-1 text-ink")
: user
- ? cn("chat-text whitespace-pre-wrap text-ink", simple ? SIMPLE_USER_BUBBLE : "bg-bubble-user px-4 py-2.5")
+ ? cn("chat-text whitespace-pre-wrap [overflow-wrap:anywhere] text-ink", simple ? SIMPLE_USER_BUBBLE : "bg-bubble-user px-4 py-2.5")
: simple ? SIMPLE_BOT_BUBBLE : "bg-card px-4 py-2.5 text-ink",
)}
title={new Date(m.at).toLocaleString()}