From 7b61703b01a125d9248295d1ac436860755d74e6 Mon Sep 17 00:00:00 2001 From: Dmytro Stanchiev Date: Wed, 22 Apr 2026 17:35:12 -0400 Subject: [PATCH] refactor(ai-toolbar): stack attachment previews by row --- src/components/ai-toolbar.tsx | 4 +--- tests/ai-toolbar.test.ts | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/ai-toolbar.tsx b/src/components/ai-toolbar.tsx index f3c26ed..9ce3143 100644 --- a/src/components/ai-toolbar.tsx +++ b/src/components/ai-toolbar.tsx @@ -466,9 +466,7 @@ export const AIToolbar = ({ animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: 4 }} transition={{ duration: 0.15 }} - className={ - isMobile ? "mt-3 grid gap-2" : "mt-3 grid gap-2 grid-cols-2" - } + className="mt-3 grid gap-2" > {imagePreviews.map((preview, index) => ( { expect(source).toContain("rounded-[10px] bg-card p-3 shadow-sm"); }); + + test("attachment previews stack one per row instead of using a two-column desktop grid", () => { + const source = readToolbarSource(); + + expect(source).not.toContain('"mt-3 grid gap-2 grid-cols-2"'); + expect(source).toContain('"mt-3 grid gap-2"'); + }); }); // ─── Cycle 6: Composer footer bar ────────────────────────────────────────────