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: keep the find query readable when nothing matches (#11252)

Michael Han3c89dd64b768
diff --git a/studio/frontend/src/features/find-in-page/components/find-bar.tsx b/studio/frontend/src/features/find-in-page/components/find-bar.tsx
index 8fc2dd9661a..95025debe36 100644
--- a/studio/frontend/src/features/find-in-page/components/find-bar.tsx
+++ b/studio/frontend/src/features/find-in-page/components/find-bar.tsx
@@ -187,7 +187,6 @@ export default function FindBar({
}, [focusToken, restoreSelection]);
const searching = query.length > 0;
- const empty = !queryPending && searching && count === 0;
// A pending query has no count of its own yet, so the settled one's zero must not disable the
// walk: `stepWhenSettled` queues the press and runs it once the count arrives.
const canStep = searching && (count > 0 || queryPending);
@@ -226,10 +225,9 @@ export default function FindBar({
spellCheck={false}
autoComplete="off"
autoCorrect="off"
- className={cn(
- "min-w-0 flex-1 bg-transparent text-ui-15 outline-none placeholder:text-muted-foreground",
- empty && "text-destructive",
- )}
+ // The query keeps its colour with no matches: the 0/0 counter beside it
+ // already says so, and recolouring the text reads as a typing error.
+ className="min-w-0 flex-1 bg-transparent text-ui-15 outline-none placeholder:text-muted-foreground"
/>
<span
aria-live="polite"
diff --git a/studio/frontend/tests/find-in-page.test.ts b/studio/frontend/tests/find-in-page.test.ts
index eabb8c587c1..7505d8458c1 100644
--- a/studio/frontend/tests/find-in-page.test.ts
+++ b/studio/frontend/tests/find-in-page.test.ts
@@ -1488,7 +1488,9 @@ test("the bar stays out of a backgrounded scope, and off the document origin", a
// 22.25/28.25rem is exactly the previous short-counter width: fixed input + 12rem chrome.
assert.match(surface[1], /(?:^|\s)w-\[22\.25rem\](?:\s|$)/);
assert.match(surface[1], /(?:^|\s)sm:w-\[28\.25rem\](?:\s|$)/);
- const input = /<input[\s\S]*?className=\{cn\([\s\S]*?"([^"]*)"/.exec(
+ // Either form: the field's classes are the point, not whether they go
+ // through cn().
+ const input = /<input[\s\S]*?className=\{?(?:cn\()?\s*"([^"]*)"/.exec(
FIND_BAR,
);
assert.ok(input);