fix(web): prevent text overflow in user message component by adding min-w-0 constraint

This commit is contained in:
weishu
2025-12-21 09:16:46 +08:00
parent afe0e8b892
commit 76a82c27c5
@@ -36,7 +36,7 @@ export function HappyUserMessage() {
const canRetry = status === 'failed' && typeof localId === 'string' && Boolean(ctx.onRetryMessage)
const onRetry = canRetry ? () => ctx.onRetryMessage!(localId) : undefined
const userBubbleClass = 'w-fit max-w-[92%] ml-auto rounded-xl bg-[var(--app-secondary-bg)] px-3 py-2 text-[var(--app-fg)] shadow-sm'
const userBubbleClass = 'w-fit min-w-0 max-w-[92%] ml-auto rounded-xl bg-[var(--app-secondary-bg)] px-3 py-2 text-[var(--app-fg)] shadow-sm'
if (isCliOutput) {
return (
@@ -51,7 +51,7 @@ export function HappyUserMessage() {
return (
<MessagePrimitive.Root className={userBubbleClass}>
<div className="flex items-end gap-2">
<div className="flex-1">
<div className="flex-1 min-w-0">
<LazyRainbowText text={text} />
</div>
{status ? (