From 1afa90af5853ea1f38a22cda889b5934594652f7 Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 11 Oct 2026 21:07:49 +0800 Subject: [PATCH] fix(forms): align the thinking level picker with the model list row The thinking level trigger in the Codex model list still used the old field style (h-9, rounded-md, shadow, up-down chevron), so it stood taller than the inputs next to it and the row looked misaligned. It now shares fieldClass and the h-8 height with Input and SelectTrigger, uses the same chevron and placeholder color, and the delete button drops its h-9 override for the default icon size. --- .../providers/forms/CodexFormFields.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/providers/forms/CodexFormFields.tsx b/src/components/providers/forms/CodexFormFields.tsx index 4220415d6..6076025f3 100644 --- a/src/components/providers/forms/CodexFormFields.tsx +++ b/src/components/providers/forms/CodexFormFields.tsx @@ -11,7 +11,7 @@ import { Button } from "@/components/ui/button"; import { HelpTip } from "@/components/ui/help-tip"; import { HoverTip } from "@/components/ui/hover-tip"; import { FormLabel } from "@/components/ui/form"; -import { Input } from "@/components/ui/input"; +import { fieldClass, Input } from "@/components/ui/input"; import { Switch } from "@/components/ui/switch"; import { Select, @@ -43,7 +43,6 @@ import { Check, ChevronDown, ChevronRight, - ChevronsUpDown, Download, Loader2, Plus, @@ -417,14 +416,18 @@ function ReasoningLevelsEditor({ type="button" role="combobox" aria-expanded={open} - className="flex h-9 w-full items-center justify-between gap-1 rounded-md border border-border bg-surface px-3 py-1 text-sm shadow-sm focus:outline-none focus-visible:outline-none focus:border-border focus-visible:border-border focus:ring-0 focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50" + // 和同一行的 Input、Select 同一套外观,行高才对得齐。 + className={cn( + fieldClass, + "flex h-8 items-center justify-between gap-1 whitespace-nowrap text-start data-[state=open]:border-ring data-[state=open]:ring-[3px] data-[state=open]:ring-ring/20", + )} > {triggerLabel} - + @@ -1611,7 +1614,7 @@ export function CodexFormFields({ type="button" variant="ghost" size="icon" - className="h-9 w-9 text-fg-2 hover:text-destructive" + className="text-fg-2 hover:text-destructive" onClick={() => handleRemoveCatalogRow(index)} >