Skip to content

ui: fix the phone model sheet's search field and reasoning row - #33144

Merged
allozaur merged 5 commits into
ggml-org:masterfrom
allozaur:allozaur/fix/ui-models-sheet-layout
Nov 26, 2026
Merged

allozaur merged 5 commits into
ggml-org:masterfrom
allozaur:allozaur/fix/ui-models-sheet-layout

Conversation

@allozaur

@allozaur allozaur commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Overview

On phones, the model picker's search field lines up with the rows above it and looks like every other text field, and Reasoning looks like the All models row, with its levels opening inside the same box. While a search is typed, Reasoning steps aside for the results. Holding a model that hears offers Use for dictation.

Demo

Video What it shows
Phone model picker Phone model picker

Reasoning is a rounded row like All models and opens its levels inside its own box; the search is a plain text field in the same margins, and Reasoning hides while a search is typed.
Use a model for dictation Use a model for dictation

Holding a model that hears offers Use for dictation, as the microphone on a desktop row does.
Header fields Header fields

A header value field has the same background and border as the name beside it.

Recorded at ed3f7db; click a preview for its full video.

Additional information

Follow-up to #33036.

What changed
  • The sheet's foot (Reasoning and the search) uses the lists' px-4 gutter instead of px-2, so the search field is no wider than the inset groups.
  • The search is a plain SearchInput (field background and border) in the chat form's pill shape, instead of the chat form's glass surface with its gradient edge.
  • The phone variant of ModelsSelectorReasoning is an InsetList: its trigger is an inset-list-row with the lightbulb, the level in use and the chevron, and the levels are InsetListRows inside the same group, sliding open through CollapsibleSection. The desktop dropdown is unchanged.
  • Reasoning is hidden while a search is typed (kept mounted, so its levels stay as they were left), and comes back once it is cleared.
  • Holding a model that hears offers Use for dictation in its menu, as the microphone on a desktop row does (voiceStore.toggleDictation); on the model Automatic picked it offers Keep for dictation, and on the chosen one Pick dictation model automatically.
  • The header value fields in KeyValuePairs use the shared Textarea instead of a hand-styled transparent one, so they match the Input names beside them.
Testing
  • ModelsSelectorSheet stories now show Reasoning, and a new "Reasoning effort" story opens the levels, and "Search results" checks that Reasoning is hidden; a client test holds a row and checks the dictation option, for a model that hears, one that does not, the one Automatic picked and the chosen one; the sheet's and KeyValuePairs' story tests pass, type check and lint are clean.
  • Checked in Storybook at 390x844 in dark mode. Not tried on a real phone.
Demo script
const describe = (description: string) => ({
	annotation: { description, type: 'description' }
});

test.describe(() => {
	test.use({
		colorScheme: 'dark',
		hasTouch: true,
		isMobile: true,
		mockServer: {
			models: [
				'ggml-org/gemma-3-4b-it-GGUF:Q4_K_M',
				'ggml-org/Qwen3-8B-GGUF:Q4_K_M',
				'ggml-org/SmolLM3-3B-GGUF:Q8_0',
				'ggml-org/Voxtral-Mini-3B-2507-GGUF:Q4_K_M',
				'ggml-org/ultravox-v0_5-llama-3_2-1b-GGUF:Q8_0'
			]
		},
		viewport: { height: 844, width: 390 }
	});

	test(
		'Phone model picker',
		describe(
			'Reasoning is a rounded row like All models and opens its levels inside its own box; the search is a plain text field in the same margins, and Reasoning hides while a search is typed.'
		),
		async ({ demo, page }) => {
			const trigger = page
				.locator('.chat-form-surface button')
				.filter({ hasNotText: /Add files|Model actions|No model|Send|Expand/ })
				.filter({ hasText: /\w{3}/ })
				.filter({ visible: true })
				.first();
			const drawer = page.locator('[data-slot=drawer-content]');
			const reasoning = drawer.getByRole('button', { name: /^Reasoning/ });

			await demo.tap(trigger, 1200);
			await expect(reasoning).toBeVisible();
			await demo.caption('Reasoning is now a row like All models');
			await demo.tap(reasoning, 1200);
			await expect(drawer.getByRole('button', { name: /^Low/ })).toBeVisible();
			await demo.caption('Its levels slide open inside the same box');
			await demo.tap(drawer.getByRole('button', { name: /^Low/ }), 1000);
			await demo.tap(reasoning, 900);
			await demo.type(drawer.getByPlaceholder('Search models'), 'qwen', 1200);
			await expect(reasoning).toBeHidden();
			await demo.caption('While you search, Reasoning steps aside for the results');
			await demo.pause(800);
		}
	);
	test(
		'Use a model for dictation',
		describe(
			'Holding a model that hears offers Use for dictation, as the microphone on a desktop row does.'
		),
		async ({ demo, page }) => {
			// the mocked server lists no modalities: Voxtral and Ultravox hear here
			await page.route(/\/props\?model=[^&]*(Voxtral|ultravox)/, (route) =>
				route.fulfill({
					json: {
						build_info: 'mock',
						modalities: { audio: true, vision: false },
						model_path: 'none',
						role: 'router',
						ui_settings: {}
					}
				})
			);
			await page.reload();

			const trigger = page
				.locator('.chat-form-surface button')
				.filter({ hasNotText: /Add files|Model actions|No model|Send|Expand/ })
				.filter({ hasText: /\w{3}/ })
				.filter({ visible: true })
				.first();
			const drawer = page.locator('[data-slot=drawer-content]');
			const row = (name: string) => drawer.locator('.inset-list-row').filter({ hasText: name });

			await demo.tap(trigger, 1000);
			await expect(row('Voxtral')).toContainText('Dictation');
			await demo.caption('Voxtral transcribes dictation, picked automatically');
			await demo.hold(row('ultravox'), 900, 900);
			await demo.caption('Hold another model that hears to use it instead');
			await demo.tap(page.getByRole('menuitem', { name: 'Use for dictation' }), 1000);
			await expect(row('ultravox')).toContainText('Dictation');
			await demo.caption('Ultravox now transcribes dictation');
			await demo.pause(800);
		}
	);
});

test.describe(() => {
	test.use({
		colorScheme: 'dark',
		story: 'llama-chat-forms-keyvaluepairs--default',
		viewport: { height: 450, width: 720 }
	});

	test(
		'Header fields',
		describe('A header value field has the same background and border as the name beside it.'),
		async ({ demo, page }) => {
			const value = page.getByRole('textbox').nth(1);

			await expect(value).toBeVisible();
			await demo.caption('Header names and values share one field style');
			await demo.zoom(value, 2.2, 2200);
			await demo.pause(600);
		}
	);
});

Requirements

Give the sheet's foot the lists' gutter, so the search field lines up
with the inset groups above it. Draw the reasoning effort as an inset
group like the All models row, with its levels sliding open inside it.

Assisted-by: Claude (Opus 5.5 Medium)
The phone model sheet's search borrowed the chat form's glass surface,
gradient edge and all; it is now a plain SearchInput in the chat form's
pill shape. The header value fields drew their own transparent textarea
next to Input keys; they use the shared Textarea, so every text field has
the same background and border.

Assisted-by: Claude (Opus 5.5 Medium)
@github-actions github-actions Bot added server/ui video demo PR features a video demo recorded with the UI demo pipeline labels Nov 26, 2026
A typed search gives the sheet to its results; the reasoning row comes
back once the search is cleared.

Assisted-by: Claude (Opus 5.5 Medium)
Holding a model that hears offers Use for dictation, as the desktop row's
microphone does, and the model chosen for it can hand the choice back to
Automatic.

Assisted-by: Claude (Opus 5.5 Medium)
@allozaur
allozaur force-pushed the allozaur/fix/ui-models-sheet-layout branch from 9273fa7 to b5be171 Compare November 26, 2026 18:28
@allozaur
allozaur marked this pull request as ready for review November 26, 2026 18:35
@allozaur
allozaur requested a review from a team as a code owner November 26, 2026 18:35
- Keep for dictation on the model Automatic picked, instead of Use for
  dictation on a model that already transcribes it.
- Keep the reasoning row mounted while a search hides it, so its levels
  are as they were left.
- Name the Reasoning row label once for both pickers.
- Restore the stores the dictation test changes, and cover the keep case.
- Mention the dictation options on the Mobile Flows page.

Assisted-by: Claude (Opus 5.5 Medium)
@allozaur
allozaur merged commit 5d7bb89 into ggml-org:master Nov 26, 2026
13 of 14 checks passed
abeloin added a commit to abeloin/llama.cpp-mix that referenced this pull request Nov 27, 2026
…re (2026-11-27)

8 reverts (pins ggml-org#402/ggml-org#411/ggml-org#412/ggml-org#414, biais indexé GPU et CPU, noyau tile
rdna3 47fa88c/1d51ca3ef) puis merge --no-ff de b12801 (f6127ef). Banc
r21 contre mix-b12723-r2 : Inkling tg +14 à +18 %, Gemma 4 prefill +8 %,
Qwen3.6 décodage -7.3 % à 64k de profondeur (retrait de 47fa88c), perte
acceptée par le propriétaire en attendant le report des chargeurs q8_0/q4_0
sur ggml-org#32901.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* mix/wip-b12801: (89 commits)
  mix: MIX.md — banc r21 de la base b12801 contre mix-b12723-r2 : Inkling tg +14 à +18 %, Gemma 4 prefill +8 %, Qwen3.6 décodage -7.3 % à 64k (retrait de 47fa88c, report non minimal sur ggml-org#32901) ; reste décision et accord du propriétaire
  mix: MIX.md — b12801 posée (f6127ef) : 8 couches marquées RETIRÉ (pins ggml-org#402/ggml-org#411/ggml-org#412/ggml-org#414, biais indexé GPU et CPU, noyau tile rdna3 47fa88c/1d51ca3ef), build vert, test-backend-ops 22658/22658 ; reste banc vs mix-b12723-r2 et accord du propriétaire
  Revert "cuda : read q8_0/q4_0 K/V directly in the tile FA kernel on RDNA3"
  Revert "cuda : larger K/V staging for the head size 256 two-column tile kernel on RDNA"
  Revert "pr: biais indexé CUDA/HIP + graphe Inkling 2 (ggml-org#32740 GPU retiré, commit 9cd1953 inversé ; ggml-org#32899, commit aa74da8)"
  Revert "mix: ggml-cpu : accepter FLASH_ATTN_EXT avec biais indexé (calque à nous ; lève le refus ajouté par ggml-org#32740, commit 2392423)"
  Revert "pin: CUDA: fuse the SiTU gate of the MoE experts (unslothai#402, commit 0bfd204)"
  Revert "pin: CUDA: fuse the short convolution chain with its state store and residual (unslothai#411, commit 7e633d6)"
  Revert "pin: CUDA: fuse tanh-mul-add/sub, router weight normalization and add + rms_norm chains (unslothai#412, commit 874c88c)"
  Revert "pin: CUDA: fuse the depth mix (stack concat, scores, softmax, mix) into one kernel (unslothai#414, commit f766457)"
  mix: MIX.md — base b12801 choisie (2a33525) ; décisions du propriétaire : biais indexé et fusions Inkling 2 pris de l'amont (ggml-org#33063/ggml-org#33053, ggml-org#33060), retrait de nos calques 8fcc3e0 et b92222d et des pins ggml-org#402/ggml-org#411/ggml-org#412/ggml-org#414
  ggml/CUDA+HIP: Flash Attention with indexed bias (ggml-org#33063)
  opencl: add MoE int8 bin kernel host side changes for Adreno A850 (ggml-org#33069)
  ci: relax spec dec acceptance length floor (ggml-org#33127)
  tests : relax the DEPTH_MIX tolerance to the mul_mat one (ggml-org#33141)
  ui: install the demo harness before the app's type check in CI (ggml-org#33145)
  ui: fix the phone model sheet's search field and reasoning row (ggml-org#33144)
  ui: NVFP4 as 4-bit in Discover, model details inside Search (ggml-org#33120)
  ui: move the demo harness to ui/lib/demo and render videos on the Llama brand (ggml-org#33125)
  CUDA: fuse the Inkling 2 short conv, depth mix, loop controller, L2 clip and situ chains (ggml-org#33060)
  ...
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Dec 1, 2026
…org#33144)

* ui: fix the phone model sheet's search width and reasoning row

Give the sheet's foot the lists' gutter, so the search field lines up
with the inset groups above it. Draw the reasoning effort as an inset
group like the All models row, with its levels sliding open inside it.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: give the sheet search and header values the plain text field look

The phone model sheet's search borrowed the chat form's glass surface,
gradient edge and all; it is now a plain SearchInput in the chat form's
pill shape. The header value fields drew their own transparent textarea
next to Input keys; they use the shared Textarea, so every text field has
the same background and border.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: hide the reasoning row while the phone model sheet searches

A typed search gives the sheet to its results; the reasoning row comes
back once the search is cleared.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: use a model for dictation from the phone model sheet

Holding a model that hears offers Use for dictation, as the desktop row's
microphone does, and the model chosen for it can hand the choice back to
Automatic.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: tidy the phone model sheet after review

- Keep for dictation on the model Automatic picked, instead of Use for
  dictation on a model that already transcribes it.
- Keep the reasoning row mounted while a search hides it, so its levels
  are as they were left.
- Name the Reasoning row label once for both pickers.
- Restore the stores the dictation test changes, and cover the keep case.
- Mention the dictation options on the Mobile Flows page.

Assisted-by: Claude (Opus 5.5 Medium)
(cherry picked from commit 5d7bb89)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server/ui video demo PR features a video demo recorded with the UI demo pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants