Skip to content

Studio: model picker intro how-to page, picker search and sizes, remembered expand, monochrome icons - #18445

Merged
shimmyshimmer merged 16 commits into
mainfrom
studio-model-picker-intro-pages
Nov 19, 2026
Merged

shimmyshimmer merged 16 commits into
mainfrom
studio-model-picker-intro-pages

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Studio: model picker intro how-to page, picker search and sizes, remembered expand, monochrome icons

Follow-up to #18427, which added the "Meet the new model picker" card and dialog.

Model picker intro dialog

  • Second page, "How to use it": the folded picker beside the full picker (with the up arrow, the row's menu, gear and star), then four short steps:

    1. Browse Discover for models that fit your device
    2. Click the gear to tweak settings before loading
    3. Star models to keep them in Favorites
    4. When a model is loaded, click its row or the arrow to expand or collapse the picker

    Open model picker sits under the steps. Page 1 keeps its picture, title, button and four feature pills; the third pill now reads "Adjust thinking effort easily".

  • Navigation: Back and Next, slightly larger than before, and the two page dots are buttons that jump to their page (aria-label="Page N", aria-current on the current one). The dialog always opens on page 1.

  • Close button: the dialog draws its own X, 8px higher and further right than the shared dialog close (top-3 right-3), fixed on phones like the shared one.

  • In the page 2 pictures the arrows sit in a hover circle and the folded mock is wide enough for the full model name. The expanded mock now matches the real picker more closely (search bar, full-pill rows, the loaded dot, less space above the tabs), and both effort sliders are the real slider at half size (track, level dots, white knob, using the slider's own composer-effort-* classes).

  • Page 1: the NEW badge, title and description sit at the top, the picker picture in the middle, then the pills (a narrower block, one line each on desktop) and Open model picker below them, with more space above and below the picture. Both Open model picker buttons use the neutral dark button style that Settings uses. The pills read "Find and switch models fast" (Model hub icon), "Run settings for each model", "Adjust thinking effort easily" (the composer's thinking bulb) and "Star the ones you use most", on a slightly darker fill in light mode. The badge reads NEW in bold, and the composer mock's + sits in a send-sized box so it lines up under "Ask anything".

Composer model picker

  • Custom folders: the heading's + only shows once a folder is added. Before, an empty Custom folders section had both the heading + and the "Add a folder to scan for models" row, which open the same chooser. Suggested folders (the dashed chips Studio finds on disk) are unchanged.
  • Folded view: the model row keeps 12px before Eject, so a long, truncated name no longer pushes the loaded dot into the Eject button.
  • Search: a clear (x) button appears once the search box has text, the same icon as the Settings search. It keeps focus in the box.
  • Sizes for MLX and Safetensors: with the MLX or Safetensors filter on in Discover, each row shows its download size after the parameter count. The size is summed from the repo's .safetensors files (hub-repo-size.ts, three listings at a time, cached per endpoint), because the Hub's safetensors.parameters counts packed MLX weights at full width: unsloth/Qwen3.6-27B-UD-MLX-4bit estimates at 97 GB but its files are 26 GB.
  • Fit warnings for non-GGUF repos: a Discover repo that is not a GGUF and does not fit the device is now greyed out with the "Does not fit" warning on hover, as GGUF repos already were. Before, only the "Only show models that fit" filter used this rule. The check uses the summed file size when it is known.
  • Discover sizes use the same 10px monospace style as the GB figures in a GGUF's quant list.
  • Quant lists in On Device: "Expand quantizations" (Settings > Chat > Model selection) now defaults on and sets the default for every model; opening or closing one model's quant list is remembered for that model (unsloth_composer_picker_quants_open, up to 200 models) and no longer resets when the picker remounts.
  • Quantization row removed: the footer row that switched the loaded GGUF's quant is gone for every model, with the quant listing it fetched on each open. Quants are still chosen from the model's row.
  • Remembered expand: expanding or collapsing the picker while a model is loaded now sets one global preference that every later load follows, replacing the per-model choice. It is also a switch in Settings > Chat > Model selection ("Show full model list"). An eject still expands without changing the preference.
  • Monochrome icons: a new "Monochrome model icons" switch in the same section draws picker and chip logos in the text colour (maker logos as silhouettes, other images and letter tiles in greyscale).

Glass

  • The zoom bar and find bar (.find-bar-surface) and the model picker intro card now take the glass menu material when glass mode is on, including the liquid rim and lift shadow. Menus, popovers, tooltips, toasts and dialogs already did.

Run settings

  • Context reset: in the right-hand Run settings sidebar the reset arrow now sits just left of the Context number. The picker's own Run settings keep it beside the label. tests/context-mode-ux.test.ts pins both placements.

Verification

  • npm run typecheck, npm run build, npm run i18n:check, npm test (16735 passed, 0 failed).
  • Live Studio: the search x clears the query and hides; with MLX on, Discover showed 26, 35, 38, 22, 16 and 6.6 GB, matching the Hub file listings; Qwen3.8-Flash-Next (360 GB) was greyed with the warning on hover; the Settings search finds both new switches and Monochrome turns the picker logos grey; with data-glass="frosted" the find bar and intro card report backdrop-filter: blur(26px) saturate(1.7).
  • An isolated Studio driven with Playwright in dark, light and at 390 px: Next, Back and both dots switch pages; the new X closes the dialog; Open model picker opens the picker. In the composer picker, a 50-character model name left 12px between the loaded dot and Eject, and an empty Custom folders section showed one add control. In the Run settings sidebar, setting Context to 32768 put the reset 6px left of the number on the same row, and clicking it returned Context to Auto.

Not covered

  • Phones never fold the picker and keep the gear inside the row menu, so steps 2 and 4 describe the desktop picker.
  • The remembered expand preference was checked by reading the code and tests, not by repeated model loads on this CPU host.
  • Removing the Quantization row was checked by typecheck and tests; it only showed for a loaded multi-quant GGUF, which was not loaded in the browser check.

Screenshots

Page 1 with the page dots and Next:

Intro page 1

Page 2, dark and light:

Intro page 2, dark

Intro page 2, light

Page 2 at 390 px:

Intro page 2 on a phone-width window

Folded picker with a long model name, the loaded dot clear of Eject:

Folded picker, long name

Run settings sidebar, Context reset beside the number:

Context reset in the sidebar

shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
…or MLX/Safetensors, remembered expand, monochrome icons, glass zoom and find bars

[skip ci]
@shimmyshimmer shimmyshimmer changed the title Studio: model picker intro gets a how-to page; custom folder and Run settings fixes Studio: model picker intro how-to page, picker search and sizes, remembered expand, monochrome icons Nov 19, 2026
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T11:01:58.656625Z b9752af Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: ccb47c8ef2

ℹ️ 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 pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 1c05a1c709

ℹ️ 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".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 19, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 19, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 19, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 19, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: b9752af6af

ℹ️ 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 pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 19, 2026
@shimmyshimmer
shimmyshimmer merged commit 5a75f5f into main Nov 19, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-model-picker-intro-pages branch November 19, 2026 11:21
danielhanchen added a commit that referenced this pull request Nov 19, 2026
…ttings (#18468)

## Summary

The strict i18n parity check (`npm run i18n:check:strict`, run by
"Frontend build + bundle sanity") fails on `main` for every PR:

```
Missing keys (will fall back to en): 4
  - settings.chat.modelSelection.pickerExpandLoaded
  - settings.chat.modelSelection.pickerExpandLoadedDescription
  - settings.chat.modelSelection.pickerMonochromeIcons
  - settings.chat.modelSelection.pickerMonochromeIconsDescription
...
Missing keys above. Add them to every overlay, or run without --strict to accept the English fallback.
```

## Root cause

#18445 added two settings under Settings > Chat > Model selection ("Show
full model list" and "Monochrome model icons") with their strings only
in `en.ts`. Every one of the 24 overlays is therefore missing the four
keys, so the strict parity check fails and non-English users see the
English fallback for those two rows. The feature itself is correct; only
the translations were missing.

## Changes

- Adds the four `settings.chat.modelSelection.picker*` keys to all 24
overlays in `studio/frontend/src/i18n/locales/`, placed right after
`fitOnDeviceOnlyDescription` to match `en.ts`. Each translation follows
the overlay's existing term for the model picker. `es-419` reuses the
`es` wording.

No code or behaviour change beyond the localized labels.

## Testing

- `npm run i18n:check:strict`: fails on `main` with the 4 keys missing
in all 24 overlays; passes on this branch ("All locale overlays pass
parity").
- `npm run typecheck`: passes.
- `node --test tests/lazy-locale-loading.test.ts
tests/chat-welcome-i18n.test.ts`: 34 passed.


## Screenshot

Settings > Chat with the German locale, scrolled to the model picker
rows. Before, "Show full model list" and "Monochrome model icons" fall
back to English; after, they read "Vollständige Modellliste anzeigen"
and "Einfarbige Modellsymbole". The surrounding rows are unchanged.

![Before and after: model picker settings in
German](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/18468/pr18468_before_after-47ad90fe0e78.png)
danielhanchen added a commit that referenced this pull request Nov 19, 2026
…ng, MLX batch sizes, QAT CUDA skip) (#18471)

## Summary

Four tests fail on `main` in the "Repo tests (CPU, studio)" shard, so
every PR that runs it is red (seen on the staging runs of #18353 and
others). Reproduced on `main` at `415cdcf1be`:

```
FAILED tests/python/test_accelerator_skip_guards.py::test_no_skip_guard_reads_a_spoofable_accelerator_probe
FAILED tests/studio/test_model_picker_contracts.py::test_batch_sizes_setting_wired_end_to_end
FAILED tests/studio/test_model_picker_contracts.py::test_batch_sizes_reach_an_api_load_through_the_server_mirror
FAILED tests/studio/test_chat_ui_picker_collapsed_row.py::test_a_loaded_model_still_opens_the_picker_collapsed
```

Each was attributed to the PR that changed the code it reads, and each
was checked for whether the PR or the test is wrong.

## Root causes and changes

### Picker collapsed after a load (#18445): test was wrong

#18445 added the "Show full model list" setting, so the load effect now
calls `setExpanded(useChatRuntimeStore.getState().pickerExpandLoaded)`
instead of a literal `?? false`. The setting defaults to off, so a fresh
browser (every CI driver) still opens the picker collapsed, which is
what this test protects: the drivers' expand click is still needed.

`test_a_loaded_model_still_opens_the_picker_collapsed` now accepts
either form, and when the setting drives it, also asserts the store
default is `loadBool(PICKER_EXPAND_LOADED_KEY, false)`. Flipping that
default to `true` fails the test, which the old literal check could not
see.

### Batch sizes sent on a load (#18426): test was wrong

#18426 brought MLX up to GGUF parity, so `n_batch` / `n_ubatch` are now
sent for `(target.isGguf || mlx)` and copied for MLX overrides too. GGUF
behaviour is unchanged; the tests pinned the old GGUF-only literal.

- `test_batch_sizes_setting_wired_end_to_end`: matches the gate with a
regex that allows widening to MLX but still requires `target.isGguf` and
"only when set". Dropping the gate (sending the fields to every engine)
fails it.
- `test_batch_sizes_reach_an_api_load_through_the_server_mirror`:
replaces the source-text check on the GGUF block with a behavioural
check through `_override_load_kwargs`, which the test already imports.
Dropping `n_ubatch` from the copied keys fails it.

### QAT stream test skip guard (#18434): PR was wrong

`tests/test_qat_weight_memo_guards.py` gated
`test_cached_weight_not_served_to_another_stream` on
`torch.cuda.is_available()`, which `tests/_zoo_aggressive_cuda_spoof.py`
patches to `True` process-wide, so on a CPU runner the test un-skips and
calls `.cuda()` when it shares a session with the spoofing suites. The
existing guard caught this. The skip now gates on `has_real_cuda()`
first, as the other CUDA-only tests do.

## Testing

- The four tests plus their files: `241 passed, 1 skipped` on this
branch; the same four fail on `main`.
- Sabotage, each against this branch:
- store default `pickerExpandLoaded` set to `true`: the picker test
fails;
- `n_batch` sent without the GGUF/MLX gate: the end-to-end batch test
fails;
- `n_ubatch` dropped from the backend override copy: the server-mirror
test fails;
  - QAT skip guard reverted: the skip-guard test fails.
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