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: tighten the browser address bar and clear it while typing (#12852)

Michael Han0a540cbc90f4
diff --git a/studio/frontend/src/features/browser/browser-panel.tsx b/studio/frontend/src/features/browser/browser-panel.tsx
index d22bfa6b944..099c3318013 100644
--- a/studio/frontend/src/features/browser/browser-panel.tsx
+++ b/studio/frontend/src/features/browser/browser-panel.tsx
@@ -734,7 +734,7 @@ function AddressBar({
actions,
}: {
tab: BrowserTab | undefined;
- /** Shown in place of the site button while the address isn't being edited. */
+ /** Shown in place of the site button. */
leading?: ReactNode;
actions?: ReactNode;
}) {
@@ -770,8 +770,9 @@ function AddressBar({
inputRef.current?.blur();
}}
>
- <div className={cn("flex h-9 items-center gap-1 rounded-lg pl-1 pr-1 transition-colors", URLBAR)}>
- {leading && !editing ? leading : <SiteIdentity address={editing ? "" : address} tab={tab} />}
+ <div className={cn("flex h-9 items-center gap-0.5 rounded-lg pl-1 pr-1 transition-colors", URLBAR)}>
+ {/* Icons step aside while typing and come back after. */}
+ {editing ? null : (leading ?? <SiteIdentity address={address} tab={tab} />)}
<div className="relative min-w-0 flex-1">
<input
ref={inputRef}
@@ -798,7 +799,8 @@ function AddressBar({
autoCapitalize="off"
autoCorrect="off"
className={cn(
- "h-9 w-full min-w-0 bg-transparent px-1 text-ui-14 text-foreground outline-none placeholder:text-muted-foreground",
+ "h-9 w-full min-w-0 bg-transparent pe-1 text-ui-13 text-foreground outline-none placeholder:text-muted-foreground",
+ editing ? "ps-2" : "ps-0",
// The input keeps the full URL, so focusing never changes its text or selection.
!editing && address && "text-transparent",
)}
@@ -806,13 +808,13 @@ function AddressBar({
{!editing && address ? (
<span
aria-hidden={true}
- className="pointer-events-none absolute inset-0 flex items-center px-1 text-ui-14 text-foreground"
+ className="pointer-events-none absolute inset-0 flex items-center ps-0 pe-1 text-ui-13 text-foreground"
>
<span className="truncate">{displayAddress(address, showFullUrl)}</span>
</span>
) : null}
</div>
- {actions}
+ {editing ? null : actions}
</div>
</form>
);
@@ -844,7 +846,7 @@ function SiteIdentity({ address, tab }: { address: string; tab: BrowserTab | und
}
if (!url || !/^https?:$/.test(url.protocol)) {
return (
- <span className="flex size-7 shrink-0 items-center justify-center text-muted-foreground">
+ <span className="flex h-7 w-[26px] shrink-0 items-center justify-center text-muted-foreground">
<HugeiconsIcon icon={Search01Icon} strokeWidth={1.75} aria-hidden={true} className="size-4" />
</span>
);
@@ -872,7 +874,7 @@ function SiteIdentity({ address, tab }: { address: string; tab: BrowserTab | und
<button
type="button"
aria-label={label}
- className="flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-[color-mix(in_oklab,var(--foreground)_calc(8%*var(--contrast-wash-gain,1)),transparent)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-expanded:bg-[color-mix(in_oklab,var(--foreground)_calc(10%*var(--contrast-wash-gain,1)),transparent)] aria-expanded:text-foreground"
+ className="flex h-7 w-[26px] shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-[color-mix(in_oklab,var(--foreground)_calc(8%*var(--contrast-wash-gain,1)),transparent)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring aria-expanded:bg-[color-mix(in_oklab,var(--foreground)_calc(10%*var(--contrast-wash-gain,1)),transparent)] aria-expanded:text-foreground"
>
{secure ? (
<ShieldCheck strokeWidth={2} className="size-4" />