Skip to content

Commit 42cf5a1

Browse files
fix(web): compact model picker row indicators (pingdotgg#26415)
1 parent b7ab02e commit 42cf5a1

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎apps/web/src/components/chat/ModelListRow.tsx‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
7979
{/* The logo is decorative, so name the provider for screen readers. */}
8080
<span className="sr-only">, {props.providerDisplayName}</span>
8181
</div>
82+
{props.isSelected ? <CheckIcon className="size-3.5 shrink-0" aria-hidden="true" /> : null}
8283
{props.subProvider ? (
8384
<span className="min-w-0 shrink truncate text-xs text-muted-foreground/70">
8485
{props.subProvider}
@@ -100,14 +101,12 @@ export const ModelListRow = memo(function ModelListRow(props: {
100101
</div>
101102

102103
<div className="flex shrink-0 items-center gap-1.5">
103-
{props.jumpLabel ? <Kbd>{props.jumpLabel}</Kbd> : null}
104104
<Tooltip>
105105
<TooltipTrigger
106106
render={
107107
<Button
108108
size="icon-xs"
109109
variant="ghost-muted"
110-
className="-mr-1 shrink-0"
111110
onClick={(event) => {
112111
event.stopPropagation();
113112
props.onToggleFavorite(props.instanceId, props.slug);
@@ -133,11 +132,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
133132
{props.isFavorite ? "Remove from favorites" : "Add to favorites"}
134133
</TooltipPopup>
135134
</Tooltip>
136-
{/* Last, and always reserved, so stars and the check keep fixed columns. */}
137-
<CheckIcon
138-
className={cn("size-3.5", !props.isSelected && "invisible")}
139-
aria-hidden="true"
140-
/>
135+
{props.jumpLabel ? <Kbd>{props.jumpLabel}</Kbd> : null}
141136
</div>
142137
</ComboboxItem>
143138
);

0 commit comments

Comments
 (0)