From 89ff4b31ed2c5d31dddbb8c8baf6afd157a2ea08 Mon Sep 17 00:00:00 2001 From: Muzammil Hussain <58479501+Muzammil-Bit@users.noreply.github.com> Date: Mon, 23 Nov 2026 16:29:20 +0500 Subject: [PATCH 1/4] fix(web): model picker keeps the end of long model names visible Custom models often share a long prefix, such as magpie/refuseless/deepseek-v4-..., and cutting names off at the end left rows that all looked the same. Rows now cut the middle with MiddleTruncate, so the part that tells them apart stays visible. Screen readers still hear the full name, and the hover title still appears only when a name is cut. Fixes #41213 Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/chat/ModelListRow.tsx | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/apps/web/src/components/chat/ModelListRow.tsx b/apps/web/src/components/chat/ModelListRow.tsx index 74dae2dc23582..89859452dfd78 100644 --- a/apps/web/src/components/chat/ModelListRow.tsx +++ b/apps/web/src/components/chat/ModelListRow.tsx @@ -7,6 +7,7 @@ import { ComboboxItem } from "../ui/combobox"; import { Button } from "../ui/button"; import { Badge } from "../ui/badge"; import { Kbd } from "../ui/kbd"; +import { MiddleTruncate } from "../ui/middle-truncate"; import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; import { cn } from "~/lib/utils"; import { modelPickerModelKey } from "./modelPickerKeys"; @@ -36,11 +37,11 @@ export const ModelListRow = memo(function ModelListRow(props: { onToggleFavorite: (instanceId: ProviderInstanceId, slug: string) => void; }) { const gt = useGT(); - const model = { + const displayName = getDisplayModelName({ slug: props.slug, name: props.name, subProvider: props.subProvider, - }; + }); const row = (
-
{ - const name = event.currentTarget; - name.title = name.scrollWidth > name.clientWidth ? getDisplayModelName(model) : ""; - }} - > - {getDisplayModelName(model)} +
+ {/* Custom models often share a long prefix, so the cut keeps the end that tells them + apart. Its "…" would be read aloud, so screen readers get the sr-only name below. */} +
{props.isSelected ?