From a93d95ee2e74148ca9f59ad63efd29c78da91ce2 Mon Sep 17 00:00:00 2001 From: Dmytro Stanchiev Date: Wed, 22 Apr 2026 17:45:57 -0400 Subject: [PATCH] fix(ai-toolbar): wrap masonry prompt cards correctly --- src/components/ai-toolbar.tsx | 2 +- tests/ai-toolbar.test.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/ai-toolbar.tsx b/src/components/ai-toolbar.tsx index 4d2c484..ac1417b 100644 --- a/src/components/ai-toolbar.tsx +++ b/src/components/ai-toolbar.tsx @@ -343,7 +343,7 @@ export const AIToolbar = ({ type="button" variant="secondary" size="sm" - className="h-auto w-full text-left justify-start rounded-2xl px-3 py-2 text-[11px] leading-relaxed" + className="h-auto w-full justify-start text-left whitespace-normal rounded-2xl px-3 py-2 text-[11px] leading-relaxed" onClick={() => onAiTemplateSelect(prompt)} disabled={aiLoading || !canUseAi} > diff --git a/tests/ai-toolbar.test.ts b/tests/ai-toolbar.test.ts index f686bbb..f7bc726 100644 --- a/tests/ai-toolbar.test.ts +++ b/tests/ai-toolbar.test.ts @@ -172,7 +172,10 @@ describe("AI capture redesign", () => { expect(source).toContain("Try:"); expect(source).toContain("columns-2"); expect(source).toContain("break-inside-avoid"); - expect(source).toContain("w-full text-left"); + expect(source).toContain("whitespace-normal"); + expect(source).toMatch( + /className="[^"]*\bw-full\b[^"]*\btext-left\b[^"]*\bwhitespace-normal\b[^"]*"/, + ); }); test("desktop composer uses a two-column row when the page gives it full-width space", () => {