Skip to content

Commit d479fc6

Browse files
committed
fix(web): preserve multiline connection banners
1 parent 41779f2 commit d479fc6

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

‎apps/web/src/components/chat/ComposerBannerStack.tsx‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,17 @@ function ComposerBannerStackAlert({
207207
>
208208
{item.icon}
209209
<AlertTitle>{item.title}</AlertTitle>
210-
{item.description ? <AlertDescription>{item.description}</AlertDescription> : null}
210+
{item.description ? (
211+
<AlertDescription
212+
className={
213+
typeof item.description === "string" && item.description.includes("\n")
214+
? "whitespace-pre-line break-words"
215+
: undefined
216+
}
217+
>
218+
{item.description}
219+
</AlertDescription>
220+
) : null}
211221
{item.actions || item.onDismiss ? (
212222
<AlertAction
213223
className={cn(

‎apps/web/src/components/cloud/ConnectOnboardingDialog.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ function PublishStep({
374374
onCheckedChange={onPublishAgentActivityChange}
375375
/>
376376
</div>
377-
{operationError ? <p className="text-xs text-destructive">{operationError}</p> : null}
377+
{operationError ? (
378+
<p className="whitespace-pre-line break-words text-xs text-destructive">{operationError}</p>
379+
) : null}
378380
</div>
379381
);
380382
}

0 commit comments

Comments
 (0)