From bf1d0d3a7580d9bb15b6b99566c0ae3ec5902052 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Sun, 28 Jun 2026 13:33:55 +0300 Subject: [PATCH] feat(mobile): polish composer model/agent controls and selection overlay Redesign the mobile composer model and agent buttons as borderless, full-bleed labels that hug their content, truncate with an ellipsis when space is tight, and show the provider logo inline before the model name. Tighten the footer action buttons (sessions / attach / auto-accept) so they sit close together, with a small left inset on the group. In the mobile model selection overlay, make the thinking-variant control text-only with a chevron, vertically center the variant and favorite controls in each row, and place the provider logo inline with the model name. --- packages/ui/src/components/chat/ChatInput.tsx | 4 ++-- .../ui/src/components/chat/MobileAgentButton.tsx | 8 +++++--- .../ui/src/components/chat/MobileModelButton.tsx | 13 +++++++++---- .../ui/src/components/chat/ModelControls.tsx | 16 ++++++++-------- packages/ui/src/styles/mobile.css | 10 ++++++++++ 5 files changed, 34 insertions(+), 17 deletions(-) diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index abf4bd4c..91e972c6 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -4514,7 +4514,7 @@ const ChatInputComponent: React.FC = ({ onOpenSettings, scrollTo {isMobile ? ( <>
-
+
= ({ onOpenSettings, scrollTo />
-
+
handleOpenMobilePanel('model')} className="min-w-0 flex-shrink" /> = ({ onCycleAge onPointerLeave={handlePointerLeave} onContextMenu={(e) => e.preventDefault()} className={cn( - 'inline-flex min-w-0 items-center select-none', - 'rounded-lg border border-border/50 px-1.5', + 'inline-flex min-w-0 items-stretch select-none', + 'rounded-lg', 'typography-micro font-medium', 'focus:outline-none hover:bg-[var(--interactive-hover)]', 'touch-none', @@ -88,7 +88,9 @@ export const MobileAgentButton: React.FC = ({ onCycleAge }} title={agentLabel} > - {agentLabel} + + {agentLabel} + ); }; diff --git a/packages/ui/src/components/chat/MobileModelButton.tsx b/packages/ui/src/components/chat/MobileModelButton.tsx index b34d45ed..10941836 100644 --- a/packages/ui/src/components/chat/MobileModelButton.tsx +++ b/packages/ui/src/components/chat/MobileModelButton.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { cn } from '@/lib/utils'; import { useConfigStore } from '@/stores/useConfigStore'; import { getModelDisplayName } from './mobileControlsUtils'; +import { ProviderLogo } from '@/components/ui/ProviderLogo'; import { useI18n } from '@/lib/i18n'; interface MobileModelButtonProps { @@ -12,6 +13,7 @@ interface MobileModelButtonProps { export const MobileModelButton: React.FC = ({ onOpenModel, className }) => { const { t } = useI18n(); const currentModelId = useConfigStore((state) => state.currentModelId); + const currentProviderId = useConfigStore((state) => state.currentProviderId); const getCurrentProvider = useConfigStore((state) => state.getCurrentProvider); const currentProvider = getCurrentProvider(); const modelLabel = getModelDisplayName(currentProvider, currentModelId, t('chat.modelControls.selectModel')); @@ -21,8 +23,8 @@ export const MobileModelButton: React.FC = ({ onOpenMode type="button" onClick={onOpenModel} className={cn( - 'inline-flex min-w-0 items-center justify-center', - 'rounded-lg border border-border/50 px-1.5', + 'inline-flex min-w-0 items-stretch', + 'rounded-lg', 'typography-micro font-medium text-foreground/80', 'focus:outline-none hover:bg-[var(--interactive-hover)]', className @@ -30,8 +32,11 @@ export const MobileModelButton: React.FC = ({ onOpenMode style={{ height: '26px', maxHeight: '26px', minHeight: '26px' }} title={modelLabel} > - - {modelLabel} + + {currentProviderId ? ( + + ) : null} + {modelLabel} ); diff --git a/packages/ui/src/components/chat/ModelControls.tsx b/packages/ui/src/components/chat/ModelControls.tsx index 3e254195..cca3e5ea 100644 --- a/packages/ui/src/components/chat/ModelControls.tsx +++ b/packages/ui/src/components/chat/ModelControls.tsx @@ -1671,7 +1671,7 @@ export const ModelControls: React.FC = ({ isSelected && 'bg-interactive-selection/15 text-interactive-selection-foreground' )} > -
+
) : null} -
+