Skip to content

Model picker: lay the rows out in columns - #7770

Merged
shimmyshimmer merged 8 commits into
mainfrom
model-picker-row-columns
Aug 3, 2026
Merged

shimmyshimmer merged 8 commits into
mainfrom
model-picker-row-columns

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

What

The model picker packed each row's meta to the right at its natural width, so whatever a row happened to carry decided where its chips landed. A missing vision badge, a longer size string or the wider Safetensors tag slid everything on that row sideways, and rows holding a single quant on disk read as the worst of it: the quant chip sat wherever the badges left it.

Rows now share fixed columns, in one order across both lists:

[format dot] name [quant chip]   [badges] [params] [size]   [gear ⋮]

Widths are em of each slot's own text, so they follow the UI font scale rather than being pinned to 10px, and every badge column carries min-w-min. That last part matters: a width is the column held open, not a clamp. Recommended reports exact parameter counts, so 2779.5B needs more room than On Device's 27B, and under a hard width it painted straight over the OOM pill next to it. Now it widens its own slot and the rest of the row stays put. Below the picker's full width the slots collapse back to their content, so narrow windows stay compact.

Also in here

  • Names drop the unsloth/ prefix, since nearly every model listed is ours, and the section is titled Unsloth rather than Downloaded. Other owners keep their prefix, which is what tells the two apart, and the full repo id stays in the row tooltip.
  • Format is a coloured dot ahead of the name, named on hover and in the row tooltip, instead of a GGUF / Safetensors / MLX pill. The word was wide enough to shove the rest of the row around, and Safetensors was the only reason that column was ever wide.
  • Row actions show on hover for the row the pointer is on, and stay put while their menu is open, in a gutter every row holds open so nothing shifts as they appear. The gear, dots menu and delete button now share one 20px hover box; they were 20px, 22px and 26px, and the last two overflowed the gutter on a fine-tuned row carrying both.
  • Sizes are mono, with no space before the unit, the decimal point pulled in on both sides and a hair of air before the unit, so 4.7GB reads as a number rather than three spaced tokens.
  • Recommended shows a size only where a row can name one. A GGUF repo holds several quants, so it has no single size until you expand it, and the column was an empty gap on nearly every row. It stays out of the All and GGUF filters, and comes back on MLX and Safetensors, where a repo is one download with one size. An already downloaded repo is marked in green rather than grey.
  • Pinned quants render through ModelRow rather than their own markup, which is what puts their chip in the same column as the rows below them.

Touch outside the picker is one line: the Hub catalog's dots trigger is pinned to size-8, since it was getting its box from padding that the shared button no longer applies.

Testing

npm run typecheck, npm run build and npm test (302 passing, including two new cases covering which owner gets dropped from a row name).

The On Device and Recommended lists packed each row's meta to the right at
its natural width, so a missing vision badge, a longer size string or a wider
format tag slid every chip on that row sideways. Rows with a single quant on
disk read as the worst of it, since the quant chip landed wherever the badges
left it.

Rows now share fixed columns: format dot, name, quant chip, badges, params,
size. Widths are em of each slot's own text so they follow the UI font scale,
and they carry min-w-min, so an outsized badge (Hub reports "2779.5B") grows
its own slot instead of painting over the column beside it. Below the picker's
full width the slots collapse back to their content.

Alongside that:

- Drop the "unsloth/" prefix from row names, since nearly every model listed
  is ours, and name the section "Unsloth" instead of "Downloaded". Other
  owners keep their prefix, which is what tells the two apart.
- Replace the GGUF / Safetensors / MLX pill with a coloured dot ahead of the
  name, named on hover. The word was wide enough to shove the rest of the row
  around, and "Safetensors" is the only reason the column was ever wide.
- Show the gear and dots menu on the hovered row only, in one gutter every row
  holds open, and give them the same 20px hover box.
- Sizes in mono with no space before the unit ("145MB").
- Hub rows drop the size column, which only the odd safetensors repo fills
  before it is expanded, and mark an already downloaded repo in green.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

…ors filters

Sizes render through one helper now: the mono decimal point is pulled in on
both sides, and the unit gets a hair of air before it, so "4.7GB" reads as a
number rather than as three spaced tokens.

Hub rows hid the size outright, which was too broad. GGUF repos are the ones
that cannot name a size before they are expanded, since they hold several
quants; an MLX or Safetensors repo is one download with one size. So the
column comes back on those two filters and stays out of All and GGUF.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aaee7a7f6a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3174 to +3178
<span
className={cn(
"flex shrink-0 items-baseline font-mono text-ui-10",
META_COLUMN.quant,
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep pinned quants in the shared quant column

When a pinned quant is displayed above ordinary On Device rows, this slot remains the last element in the button, immediately before the action gutter. Standard ModelRow device rows place their quant before the reserved badge, parameter, and size slots, so the pinned chip lands roughly the width of those trailing slots farther right despite the comment saying it shares their column. Reserve the same trailing metadata slots or render pinned rows through the shared device layout.

Useful? React with 👍 / 👎.

Comment on lines +564 to +565
const ROW_ACTIONS_CLASS =
"mr-0.5 flex w-[38px] shrink-0 items-center justify-end -space-x-0.5 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 [@media(hover:none)]:opacity-100";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Size the action gutter for fine-tuned row controls

When a fine-tuned row is both configurable and deletable, this 38px gutter cannot contain its controls: ModelLoadSettingsAction is 20px wide, while the unchanged ModelDeleteAction is 26px wide (size-3.5 plus p-1.5), leaving 44px after the negative 2px spacing. The controls therefore overflow six pixels into the model button and defeat the fixed-gutter alignment, with part of the settings hit target overlapping the row; either normalize the delete button to 20px or reserve the full combined width.

Useful? React with 👍 / 👎.

Comment on lines +462 to +464
<span
aria-label={label}
className="flex size-[14px] shrink-0 items-center justify-center"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose the format tooltip to keyboard users

When the picker is navigated by keyboard, focus stays on the enclosing row button and this plain span cannot receive focus, so the tooltip that now contains the only textual format label never opens. The previous format pill was directly readable, while the row-level tooltip only shows the model identifier or path; include the format in that focusable tooltip or otherwise expose a persistent keyboard-readable label instead of making it hover-only.

Useful? React with 👍 / 👎.

Comment on lines +564 to +565
const ROW_ACTIONS_CLASS =
"mr-0.5 flex w-[38px] shrink-0 items-center justify-end -space-x-0.5 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 [@media(hover:none)]:opacity-100";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep row actions visible while their menu is open

When a row's dots menu is opened and the pointer moves into its portaled dropdown content, the row stops matching group-hover and menu focus is outside this wrapper, so none of these opacity reveal conditions remain true and the trigger disappears while its menu is open. Preserve opacity when a descendant trigger has data-state="open" (as the catalog-row trigger already does) so the action remains anchored and visible for the duration of the menu interaction.

Useful? React with 👍 / 👎.

shimmyshimmer added 2 commits August 3, 2026 00:38
A GGUF repo holding several quants expands in place, but nothing on the row
said so: it looked like every other row, and the only way to find out was to
click it. Those rows now carry a chevron, right-aligned where the gear and
menu sit, pointing down once open.

On Device rows put it in the action gutter they already hold open. Hub rows
carry it inside the row instead, since they have no gutter, and rows that do
not expand hold the slot empty so a mixed list still lines up. The row itself
is still the toggle, so the chevron is decorative.

The hover gate moves off the gutter and onto what sits in it, so a fine-tuned
row can show a persistent chevron next to a delete button that still only
appears on hover.
Four things the columns work got wrong.

Pinned quants kept their own markup, so their chip sat at the end of the row
where the ordinary rows' chip sits ahead of the badge, param and size slots,
about those slots' width to the left. They render through ModelRow now, which
is what the comment claimed all along, and they pick up the format dot and
param chip with it.

ModelDeleteAction stayed at 26px (p-1.5 around a size-3.5 glyph) while the
gear and menu moved to 20px, so a fine-tuned row carrying both overflowed the
38px gutter by six pixels, back over the row button. It takes the same 20px
box as the other two.

An open dots menu portals its content and takes focus with it, so neither
hover nor focus-within held any more and the trigger faded out from under its
own menu. The gutter now also stays lit while a descendant reports
data-state=open.

The format dot names itself on hover, which keyboard focus never reaches, so
the row tooltip carries the format too.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

Went through the review. All four hold up, and all four are fixed in 6748522.

Pinned quants in the shared column. Correct, and the comment I left there was wrong. Pinned rows kept their own markup with the chip as the last element in the button, while an ordinary device row puts its chip ahead of the badge, param and size slots, so the pinned chip sat roughly those slots' combined width to the right. They render through ModelRow now rather than reserving the trailing slots by hand, which also gives them the format dot and param chip for free.

Fine-tuned gutter. Correct. ModelDeleteAction was still p-1.5 around a size-3.5 glyph, so 26px, while the gear and dots menu moved to a 20px box. A row that is both configurable and deletable came to 44px in a 38px gutter and spilled six pixels back over the row button. Normalized the delete button to the same 20px box, so the pair fits exactly.

Trigger disappearing under its own menu. Correct. Radix portals the dropdown content and moves focus into it, so group-hover and focus-within both stop matching and the gutter faded out mid interaction. Added has-[[data-state=open]]:opacity-100, matching what the catalog row already does.

Format tooltip and the keyboard. Correct that the dot's tooltip is hover-only and that the row tooltip previously carried the id or path alone. The format label now appears in the row tooltip, which opens on focus, so tabbing through the list surfaces it. Worth noting the dot's aria-label already fed the row button's accessible name, so this was a gap for sighted keyboard users rather than for screen readers.

Typecheck, build and the test suite pass on the result.

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

shimmyshimmer added 2 commits August 3, 2026 00:51
Its glyph is wider than the dots menu's, so right-aligned in the same gutter
it read as sitting closer to the edge than the menu on the rows below it. Off
the right edge by 4px when it is the only thing in the gutter, which lines the
two up.
It read as clutter next to the format dot, the quant chip and the badges,
and it was the least load-bearing of them: clicking the row already toggles
it, and the quants appearing underneath say the rest.

The gutter goes back to holding the gear and menu alone, which puts the hover
gate back on the gutter itself, so the fine-tuned row no longer needs its own
wrapper around the buttons.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 7bb4ecf74c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

shimmyshimmer added 2 commits August 3, 2026 01:25
They sat on 6px top and bottom, so a provider name ran into the last model of
the group above it. Same pt-3 pb-1 as the On Device section labels.
Nothing divides those groups but the gap, so they take pt-5 rather than the
On Device sections' pt-3.
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: f7ae4f286e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer
shimmyshimmer merged commit 5d9c7bf into main Aug 3, 2026
38 of 40 checks passed
@shimmyshimmer
shimmyshimmer deleted the model-picker-row-columns branch August 3, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant