Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix(frontend): UI breaks when user message contains codeblock that's too wide (#10276)

Hiep Le2b65b8aff2ab
diff --git a/frontend/src/components/features/chat/chat-message.tsx b/frontend/src/components/features/chat/chat-message.tsx
index 126b5b3880..34ea5a0684 100644
--- a/frontend/src/components/features/chat/chat-message.tsx
+++ b/frontend/src/components/features/chat/chat-message.tsx
@@ -53,7 +53,7 @@ export function ChatMessage({
onMouseEnter={() => setIsHovering(true)}
onMouseLeave={() => setIsHovering(false)}
className={cn(
- "rounded-xl relative w-fit",
+ "rounded-xl relative w-fit max-w-full",
"flex flex-col gap-2",
type === "user" && " p-4 bg-tertiary self-end",
type === "agent" && "mt-6 max-w-full bg-transparent",