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.
This commit is contained in:
Bohdan Triapitsyn
2026-06-28 13:33:55 +03:00
parent 1178c4e4f5
commit bf1d0d3a75
5 changed files with 34 additions and 17 deletions
@@ -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<MobileModelButtonProps> = ({ 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<MobileModelButtonProps> = ({ 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<MobileModelButtonProps> = ({ onOpenMode
style={{ height: '26px', maxHeight: '26px', minHeight: '26px' }}
title={modelLabel}
>
<span className="min-w-0 max-w-full overflow-x-auto whitespace-nowrap scrollbar-hidden">
{modelLabel}
<span className="flex h-full w-full min-w-0 items-center gap-1">
{currentProviderId ? (
<ProviderLogo providerId={currentProviderId} className="size-4 flex-shrink-0" />
) : null}
<span className="truncate">{modelLabel}</span>
</span>
</button>
);