Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: test that the picker keeps a Hub search tab when a local model lands (#14180)

Mrityunjay Kumar643b3b40d1a7
diff --git a/studio/frontend/tests/picker-tab-policy.test.ts b/studio/frontend/tests/picker-tab-policy.test.ts
index 9572a16d8ae..2c8cd9adebd 100644
--- a/studio/frontend/tests/picker-tab-policy.test.ts
+++ b/studio/frontend/tests/picker-tab-policy.test.ts
@@ -207,3 +207,19 @@ test("a current visit's deliberate Device choice remains available when empty",
assert.equal(resolvePickerTab({ ...input, hasCurrentTabChoice: false }), "hub");
assert.equal(resolvePickerTab({ ...input, hasDeviceItems: true }), "device");
});
+
+test("a saved Device preference keeps the Hub search tab when a model lands", () => {
+ const savedDevice = {
+ ...inferredBase,
+ hasExplicitTabPreference: true,
+ isDeviceInventorySettled: true,
+ selectedTab: "device" as const,
+ };
+ const opening = { ...savedDevice, hasDeviceItems: false, lockedInferredTab: null };
+ assert.equal(resolvePickerTab(opening), "hub");
+ // Typing locks the shown tab; a model appearing mid-search must not flip it.
+ assert.equal(
+ resolvePickerTab({ ...savedDevice, hasDeviceItems: true, lockedInferredTab: "hub" }),
+ "hub",
+ );
+});