diff --git a/src/app/globals.css b/src/app/globals.css index 4fb534c4e..feaa0b505 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -710,12 +710,23 @@ .ui-chip-filter-active { @apply rounded-xl border border-accent-primary/30 bg-accent-muted px-4 py-3 text-sm font-medium text-text-primary transition-colors; } - /* Rounded-pill toggle — agent/health/category selector chips */ + /* Rounded-pill toggle — agent/health/category selector chips. + inline-flex + min-h-11 sm:min-h-0 enforces a 44px mobile tap target + (WCAG 2.5.5 / iOS HIG) while staying compact on desktop. */ .ui-chip-toggle { - @apply rounded-full border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-secondary transition-colors hover:border-border-default hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-40; + @apply inline-flex items-center min-h-11 sm:min-h-0 rounded-full border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-secondary transition-colors hover:border-border-default hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-40; } .ui-chip-toggle-active { - @apply rounded-full border border-accent-primary/30 bg-accent-muted px-3 py-1.5 text-sm font-medium text-text-primary transition-colors; + @apply inline-flex items-center min-h-11 sm:min-h-0 rounded-full border border-accent-primary/30 bg-accent-muted px-3 py-1.5 text-sm font-medium text-text-primary transition-colors; + } + /* Compact variant — tighter padding + text-xs for dense pickers like + the per-project LLM model selector (sonnet/haiku/opus). Same + mobile-tap-target trick keeps it usable on touch. */ + .ui-chip-toggle-compact { + @apply inline-flex items-center min-h-11 sm:min-h-0 rounded-full border border-border-subtle px-2.5 py-1 text-xs text-text-tertiary transition-colors hover:text-text-secondary; + } + .ui-chip-toggle-compact-active { + @apply inline-flex items-center min-h-11 sm:min-h-0 rounded-full border border-accent-primary bg-accent-muted px-2.5 py-1 text-xs text-text-primary transition-colors; } /* Inline category/scope chip — shape only; caller adds color classes */ .ui-chip { diff --git a/src/components/control/control-panel-helpers.tsx b/src/components/control/control-panel-helpers.tsx index dcb232ad4..4c4d29170 100644 --- a/src/components/control/control-panel-helpers.tsx +++ b/src/components/control/control-panel-helpers.tsx @@ -3,7 +3,6 @@ import React from "react"; import { Bot, ChevronUp, ChevronDown } from "lucide-react"; import { getIntentLabel, getAdapterLabel } from "@/config/control-intents"; -import { cn } from "@/lib/utils"; import { timeAgo } from "@/lib/dates"; import type { ControlData } from "@/lib/control-types"; @@ -158,12 +157,7 @@ export function BrainConfigPanel({ key={option} type="button" onClick={() => onModelChange(option)} - className={cn( - "rounded-full border px-2.5 py-1 text-xs transition-colors", - model === option - ? "border-accent-primary bg-accent-muted text-text-primary" - : "border-border-subtle text-text-tertiary hover:text-text-secondary", - )} + className={model === option ? "ui-chip-toggle-compact-active" : "ui-chip-toggle-compact"} > {option} diff --git a/src/components/control/control-panel-modals.tsx b/src/components/control/control-panel-modals.tsx index cd3f42a52..61e919906 100644 --- a/src/components/control/control-panel-modals.tsx +++ b/src/components/control/control-panel-modals.tsx @@ -1,7 +1,6 @@ "use client"; import { Plus, X, Loader2 } from "lucide-react"; -import { cn } from "@/lib/utils"; import { Modal } from "@/components/ui/modal"; import type { ControlData } from "@/lib/control-types"; @@ -163,12 +162,7 @@ export function LaunchTabModal({ key={option} type="button" onClick={() => onModelChange(option)} - className={cn( - "rounded-full border px-2.5 py-1 text-xs transition-colors", - selectedModel === option - ? "border-accent-primary bg-accent-muted text-text-primary" - : "border-border-subtle text-text-tertiary hover:text-text-secondary", - )} + className={selectedModel === option ? "ui-chip-toggle-compact-active" : "ui-chip-toggle-compact"} > {option}