Repository navigation
Model picker: lay the rows out in columns - #7770
Conversation
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.
|
@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.
There was a problem hiding this comment.
💡 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".
| <span | ||
| className={cn( | ||
| "flex shrink-0 items-baseline font-mono text-ui-10", | ||
| META_COLUMN.quant, | ||
| )} |
There was a problem hiding this comment.
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 👍 / 👎.
| 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"; |
There was a problem hiding this comment.
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 👍 / 👎.
| <span | ||
| aria-label={label} | ||
| className="flex size-[14px] shrink-0 items-center justify-center" |
There was a problem hiding this comment.
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 👍 / 👎.
| 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"; |
There was a problem hiding this comment.
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 👍 / 👎.
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.
|
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 Fine-tuned gutter. Correct. Trigger disappearing under its own menu. Correct. Radix portals the dropdown content and moves focus into it, so 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 Typecheck, build and the test suite pass on the result. |
|
@codex review |
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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
Safetensorstag 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:
Widths are
emof each slot's own text, so they follow the UI font scale rather than being pinned to 10px, and every badge column carriesmin-w-min. That last part matters: a width is the column held open, not a clamp. Recommended reports exact parameter counts, so2779.5Bneeds more room than On Device's27B, and under a hard width it painted straight over theOOMpill 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
unsloth/prefix, since nearly every model listed is ours, and the section is titledUnslothrather thanDownloaded. Other owners keep their prefix, which is what tells the two apart, and the full repo id stays in the row tooltip.GGUF/Safetensors/MLXpill. The word was wide enough to shove the rest of the row around, andSafetensorswas the only reason that column was ever wide.4.7GBreads as a number rather than three spaced tokens.ModelRowrather 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 buildandnpm test(302 passing, including two new cases covering which owner gets dropped from a row name).