Skip to content

Commit 9bfdbb3

Browse files
fix(web): compact model picker row indicators
1 parent 2a73827 commit 9bfdbb3

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
5555
<div className="min-w-0 truncate text-sm font-normal leading-snug">
5656
{getDisplayModelName(model)}
5757
</div>
58+
{props.isSelected ? <CheckIcon className="size-3.5 shrink-0" aria-hidden="true" /> : null}
5859
{props.showNewBadge ? (
5960
<span
6061
className="shrink-0 rounded border border-update/35 bg-update/15 px-0.5 py-px text-3xs font-bold uppercase leading-none tracking-wide text-update-foreground"
@@ -87,14 +88,13 @@ export const ModelListRow = memo(function ModelListRow(props: {
8788
</div>
8889

8990
<div className="flex shrink-0 items-center gap-1.5">
90-
{props.jumpLabel ? <Kbd>{props.jumpLabel}</Kbd> : null}
9191
<Tooltip>
9292
<TooltipTrigger
9393
render={
9494
<Button
9595
size="icon-xs"
9696
variant="ghost-muted"
97-
className="-mr-1 shrink-0"
97+
className="shrink-0"
9898
onClick={(event) => {
9999
event.stopPropagation();
100100
props.onToggleFavorite(props.instanceId, props.slug);
@@ -120,11 +120,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
120120
{props.isFavorite ? "Remove from favorites" : "Add to favorites"}
121121
</TooltipPopup>
122122
</Tooltip>
123-
{/* Last, and always reserved, so stars and the check keep fixed columns. */}
124-
<CheckIcon
125-
className={cn("size-3.5", !props.isSelected && "invisible")}
126-
aria-hidden="true"
127-
/>
123+
{props.jumpLabel ? <Kbd>{props.jumpLabel}</Kbd> : null}
128124
</div>
129125
</ComboboxItem>
130126
);

0 commit comments

Comments
 (0)