From 69ce4b7b005975a905d3d24aab1bfa3b387c14ea Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Fri, 14 Aug 2026 11:57:58 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=B1=20style:=20Reclaim=20the=20Assista?= =?UTF-8?q?nt=20Avatar=20Gutter=20on=20Mobile=20(#14836)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assistant content sat 36px from the left edge on mobile (a 24px avatar column plus `gap-3`) against a 16px gutter on the right, costing ~13% of the reading width on every response. Move the avatar into the assistant heading and restore the gutter as `md:pl-9` on the content column, so the column only exists from `md` up. Geometry is unchanged on desktop: 768 - 24 - 12 and 768 - 36 both leave a 732px content box, and an absolutely positioned child resolves against the padding box, so `md:left-0` lands the avatar where the column started. `AuthorHeader` and `SteerPart` hard-coded `-ml-9` to reach back past that column; both are gated to `md` so they no longer outdent off-screen. Pure `md:` variants rather than `useMediaQuery`, which resolves desktop-first after paint and would reflow every row on mobile. Covers all five surfaces sharing `MessageRow`: the three message paths, the shared-conversation view, and search results. --- .../Messages/Content/Parts/AuthorHeader.tsx | 8 +++-- .../Chat/Messages/Content/Parts/SteerPart.tsx | 2 +- .../Parts/__tests__/AuthorHeader.spec.tsx | 29 +++++++++++++++++++ .../Parts/__tests__/SteerPart.test.tsx | 7 +++++ .../Chat/Messages/ui/MessageRow.tsx | 20 +++++-------- .../Messages/ui/__tests__/MessageRow.spec.tsx | 28 +++++++++++++++++- 6 files changed, 78 insertions(+), 16 deletions(-) create mode 100644 client/src/components/Chat/Messages/Content/Parts/__tests__/AuthorHeader.spec.tsx diff --git a/client/src/components/Chat/Messages/Content/Parts/AuthorHeader.tsx b/client/src/components/Chat/Messages/Content/Parts/AuthorHeader.tsx index d0deeb1fcc..4cc4e6497a 100644 --- a/client/src/components/Chat/Messages/Content/Parts/AuthorHeader.tsx +++ b/client/src/components/Chat/Messages/Content/Parts/AuthorHeader.tsx @@ -6,7 +6,8 @@ import type { ReactNode } from 'react'; * renders a full user turn inside the response, so the parts that resume * after it need the author's icon and label restated — the message-level * header only renders once, above the first part. Outdented past the icon - * column (like `SteerPart`) so it aligns with the top-level header. + * column (like `SteerPart`) so it aligns with the top-level header; that + * column only exists from `md` up, so the outdent is gated to match. */ const AuthorHeader = memo(function AuthorHeader({ icon, @@ -16,7 +17,10 @@ const AuthorHeader = memo(function AuthorHeader({ label: string; }) { return ( -
+