From a827fcb0e93cd52d310b422848680a86d07929a6 Mon Sep 17 00:00:00 2001 From: Atai Barkai Date: Sat, 5 Dec 2026 12:25:13 -0800 Subject: [PATCH 1/2] On a phone, the sidebar's rows and the buttons around the message are a fingertip's size Where a finger is the pointer (pointer: coarse), and only there: - conversation rows in Chats and under an open Bot are 44px, titles 16px, the Chats orb 24px; - a Bot's row is 44px with its name at 16px, the gear 44x44, the caret 44px tall; - New conversation and Show more under a Bot are 44px; New conversation and New Bot in the panel headers are 44x44; - the sidebar toggle and a conversation's top-bar buttons are 40px, and the bar keeps 48px; - every button in the message box's toolbar is at least 40px. With a mouse or trackpad every size is what it was. A browser test on an iPhone 15 (WebKit) and a Pixel 7 (Chromium) profile checks the sizes and that a tap does what a press does, and that a narrow and a wide window with a mouse keep theirs. Co-Authored-By: Claude Opus 5.5 --- app/src/components/app-sidebar/bots-panel.tsx | 19 +- .../app-sidebar/channel-item-content.tsx | 8 +- app/src/components/app-sidebar/channel.tsx | 7 +- .../app-sidebar/conversations-panel.tsx | 2 +- .../components/channels/composer/composer.tsx | 9 +- .../components/computer/computer-controls.tsx | 6 +- app/src/components/layout/sidebar-toggle.tsx | 6 +- .../_authed/_app/channel/$channelId.tsx | 17 +- .../routes/_authed/_app/group/$channelId.tsx | 2 +- .../routes/_authed/_app/start.$startId.tsx | 2 +- .../bots-panel-start-conversation.test.tsx | 228 ++++++++++++++++-- 11 files changed, 271 insertions(+), 35 deletions(-) diff --git a/app/src/components/app-sidebar/bots-panel.tsx b/app/src/components/app-sidebar/bots-panel.tsx index d0e385d653..81762e4fc3 100644 --- a/app/src/components/app-sidebar/bots-panel.tsx +++ b/app/src/components/app-sidebar/bots-panel.tsx @@ -69,9 +69,12 @@ const HeldReads = createContext<(botId: string, held: unknown) => void>( () => {}, ); -/** The rows under a Bot that are not a conversation: New conversation, and Show more. */ +/** + * The rows under a Bot that are not a conversation: New conversation, and Show more. Where a finger + * is the pointer (`pointer-coarse`), 44px tall and a size up, as a conversation's row is there. + */ const BOT_LIST_ACTION_ROW = - "w-full justify-start px-2.5 font-normal text-muted-foreground text-sm"; + "w-full justify-start px-2.5 font-normal text-muted-foreground text-sm pointer-coarse:h-11 pointer-coarse:text-base"; /** * One Bot's latest conversations, under its row: {@link BOT_CONVERSATIONS_PAGE} at a time, read from @@ -184,10 +187,10 @@ function BotConversations({ botId }: { botId: string }) { /** * The gear on the open Bot's row, a square with a hover of its own. Positioned, so it sits above the - * Bot's press, which covers the rest of the row. + * Bot's press, which covers the rest of the row. 44px where a finger is the pointer, as the row is. */ const BOT_ROW_SQUARE = - "relative flex size-9 shrink-0 items-center justify-center rounded-lg bg-transparent text-muted-foreground outline-hidden ring-sidebar-ring transition-colors hover:bg-foreground/5 hover:text-sidebar-foreground focus-visible:ring-2"; + "relative flex size-9 pointer-coarse:size-11 shrink-0 items-center justify-center rounded-lg bg-transparent text-muted-foreground outline-hidden ring-sidebar-ring transition-colors hover:bg-foreground/5 hover:text-sidebar-foreground focus-visible:ring-2"; /** How the gear and a Bot's conversations come and go: the app's entrance (lib/motion.ts). */ const BOT_MOTION = { duration: ENTRANCE_SECONDS, ease: EASE_OUT } as const; @@ -231,14 +234,14 @@ function BotRow({ * space around it included; only the gear sits above it. */}
-
+ {/* + * Where a finger is the pointer, every button in this row (attach, the model, dictate, + * send) is at least 40px, a fingertip's size; with a mouse they keep their own. + */} +
{attachmentsEnabled ? (
-
+ {/* At least 40px under a finger, as in the other layout's row above. */} +
{attachmentsEnabled ? (