From 4455472921a02b3f6af5dd1a531d1d25915a5901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 15 May 2026 18:32:28 +0200 Subject: [PATCH] chore(insights): apply the tap-target floor across the insights surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lift every interactive element on the insights hero + advisor + coach chrome to clear the 44 px WCAG 2.5.5 floor on touch. - `hero-strip.tsx`: drop `size="sm"` from the action buttons (weekly report, ask the Coach, weekly banner read/share/export). The default primitive height now sits at 40 px so the explicit `sm` was the only thing keeping these below the floor. - `suggested-prompts.tsx`: chip floor `min-h-9` → `min-h-11`. - `insight-advisor-card.tsx`: regenerate icon buttons drop their `h-7 w-7` override so the `size="icon"` primitive default (40 px) takes over; legacy-payload CTAs drop their `size="sm"`/`h-7` overrides. - `coach-drawer.tsx`: window pill `h-7` → `h-11`; the three header icon buttons (new chat, settings, close) `size-9` → `size-11`. - `coach-input.tsx`: composer hint icon trigger `h-7 w-7` → `h-11 w-11`. The Tooltip → Popover swap is owned by MB3 — distinct lines. - `message-thread.tsx`: thumbs feedback row `py-0.5 text-[11px]` → `min-h-11 py-1.5 text-xs`. Same surface row, padding does the lift. --- .../insights/coach-panel/coach-drawer.tsx | 31 ++++++++++++++----- .../insights/coach-panel/coach-input.tsx | 2 +- .../insights/coach-panel/message-thread.tsx | 4 +-- src/components/insights/hero-strip.tsx | 6 ---- .../insights/insight-advisor-card.tsx | 8 ++--- src/components/insights/suggested-prompts.tsx | 2 +- src/hooks/use-is-mobile.ts | 27 +++++++++------- 7 files changed, 45 insertions(+), 35 deletions(-) diff --git a/src/components/insights/coach-panel/coach-drawer.tsx b/src/components/insights/coach-panel/coach-drawer.tsx index 86f42a52e..51199a7ef 100644 --- a/src/components/insights/coach-panel/coach-drawer.tsx +++ b/src/components/insights/coach-panel/coach-drawer.tsx @@ -23,6 +23,7 @@ import { import { cn } from "@/lib/utils"; import { useTranslations } from "@/lib/i18n/context"; import { useCoachPrefs } from "@/hooks/use-coach-prefs"; +import { useIsMobile } from "@/hooks/use-is-mobile"; import { CoachDrawerBody } from "./coach-drawer-body"; import { CoachInput } from "./coach-input"; @@ -132,6 +133,13 @@ export function CoachDrawer({ composer, }: CoachDrawerProps) { const { t } = useTranslations(); + // v1.4.27 R3d MB1 — below the `sm` breakpoint (640 px) the Coach + // drawer slides up from the bottom edge of the viewport instead of + // sliding in from the right. Right-side slide makes the back-arrow + // / close-X drift far from the user's thumb on a phone; bottom-up + // keeps the drawer chrome reachable. Above `sm` the drawer keeps + // its existing right-side slide and `sm:max-w-[720px]` cap. + const isPhoneViewport = useIsMobile("sm"); const [currentConversationId, setCurrentConversationId] = useState< string | null @@ -256,7 +264,10 @@ export function CoachDrawer({ return (