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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: Composer appearance section, composer outline on by default (#16455)
Michael Hanadfd9e0cc956
diff --git a/studio/backend/routes/settings.py b/studio/backend/routes/settings.pyindex e370f0368c0..590510caf1d 100644--- a/studio/backend/routes/settings.py+++ b/studio/backend/routes/settings.py@@ -4779,6 +4779,7 @@ class PersonalizationCustomization(BaseModel):chatWidth: Literal["standard", "wide", "full"] = "standard"sentAttachments: Literal["auto", "list", "chips"] = "auto"contrast: int = Field(50, ge = 0, le = 100)+ composerOutline: Optional[int] = Field(None, ge = 0, le = 100)pointerCursors: bool = FalsereduceMotion: Literal["system", "on", "off"] = "system"fontSmoothing: bool = Truediff --git a/studio/backend/tests/test_personalization_settings.py b/studio/backend/tests/test_personalization_settings.pyindex c763fbe04ca..841ef33f42e 100644--- a/studio/backend/tests/test_personalization_settings.py+++ b/studio/backend/tests/test_personalization_settings.py@@ -87,6 +87,7 @@ def test_customization_defaults():p = PersonalizationPayload.model_validate({})c = p.appearance.customizationassert c.contrast == 50+ assert c.composerOutline is Noneassert c.reduceMotion == "system"assert c.fontSmoothing is Trueassert c.pointerCursors is False@@ -505,6 +506,7 @@ def test_personalization_route_roundtrip_real_shape(monkeypatch):"uiFontSize": 14,"codeFontSize": 13,"contrast": 60,+ "composerOutline": 40,"pointerCursors": True,"reduceMotion": "off","fontSmoothing": True,diff --git a/studio/frontend/src/features/chat-background/background.tsx b/studio/frontend/src/features/chat-background/background.tsxindex fc5c408d821..8a18941c06f 100644--- a/studio/frontend/src/features/chat-background/background.tsx+++ b/studio/frontend/src/features/chat-background/background.tsx@@ -6,6 +6,7 @@ import {useState,type CSSProperties,} from "react";+import { useAppearanceCustomStore } from "@/features/settings/stores/appearance-custom-store";import { useChatBackground, setBackgroundError } from "./storage";import { acquireRender } from "./render";import { safeArtworkOpacity, type RGB } from "./contrast";@@ -124,6 +125,9 @@ export function ChatBackground({ active = true }: { active?: boolean }) {};}, [skin.safe, enabled, active]);const outline = value?.outline;+ const composerOutline = useAppearanceCustomStore(+ (s) => s.customization.composerOutline,+ );useEffect(() => {// The composer is a sibling subtree of the wallpaper, so the ring strength goes on the shared parent.const parent = host.current?.parentElement;@@ -286,7 +290,7 @@ export function ChatBackground({ active = true }: { active?: boolean }) {className="chat-wallpaper"data-ready={Boolean(frames.current) || undefined}data-reduced={skin.reduced || undefined}- data-outline={value.outline > 0}+ data-outline={(composerOutline ?? value.outline) > 0}style={{ "--wallpaper-safe": skin.safe } as CSSProperties}>{[frames.previous, frames.current].map((frame, i) => {diff --git a/studio/frontend/src/features/chat-background/controls.tsx b/studio/frontend/src/features/chat-background/controls.tsxindex d4f0c88ea2e..7a44e5cb3ba 100644--- a/studio/frontend/src/features/chat-background/controls.tsx+++ b/studio/frontend/src/features/chat-background/controls.tsx@@ -126,6 +126,7 @@ export function GlassControls() {return (<SettingsSectiontitle={t("chatBackground.glassTheme")}+ badge={<Badge variant="accent">{t("shell.navigation.newBadge")}</Badge>}action={<Switcharia-label={t("chatBackground.glassTheme")}@@ -225,7 +226,7 @@ function LensRow() {);}const SLIDERS: {- key: "visibility" | "conversation" | "blur" | "zoom" | "outline";+ key: "visibility" | "conversation" | "blur" | "zoom";label: TranslationKey;min: number;max: number;@@ -235,7 +236,6 @@ const SLIDERS: {{ key: "conversation", label: "chatBackground.conversationVisibility", min: 0, max: 100, unit: "%" },{ key: "blur", label: "chatBackground.blur", min: 0, max: 20, unit: "px" },{ key: "zoom", label: "chatBackground.zoom", min: 100, max: 300, unit: "%" },- { key: "outline", label: "chatBackground.outline", min: 0, max: 100, unit: "%" },];const errors = {storage: "chatBackground.storageError",diff --git a/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx b/studio/frontend/src/features/settings/components/appearance-custom-controls.tsxindex c2c5cf70b19..d5024395233 100644--- a/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx+++ b/studio/frontend/src/features/settings/components/appearance-custom-controls.tsx@@ -985,6 +985,38 @@ export function ContrastSliderRow() {);}+export function ComposerOutlineSliderRow() {+ const t = useT();+ const outline = useAppearanceCustomStore((s) => s.customization.composerOutline);+ const backgroundOutline = useBackgroundStore((s) => s.value?.outline);+ const patch = useAppearanceCustomStore((s) => s.patch);+ const value = outline ?? backgroundOutline ?? 0;+ const set = (next: number) => patch({ composerOutline: next });+ return (+ <div className="flex w-64 items-center gap-3">+ <Slider+ value={[value]}+ min={0}+ max={100}+ step={1}+ onValueChange={(values: number[]) => set(values[0])}+ aria-label={t("chatBackground.outline")}+ />+ <NumericValueInput+ value={value}+ min={0}+ max={100}+ step={1}+ onChange={set}+ ariaLabel={t("chatBackground.outline")}+ className="panel-field h-8 w-[calc(84px*var(--ui-space-scale,1))] shrink-0"+ fixedWidth={true}+ size={4}+ />+ </div>+ );+}+export function PointerCursorsSwitch() {const pointerCursors = useAppearanceCustomStore((s) => s.customization.pointerCursors,diff --git a/studio/frontend/src/features/settings/settings-dialog.tsx b/studio/frontend/src/features/settings/settings-dialog.tsxindex bfb668c249b..36a4bdf24ab 100644--- a/studio/frontend/src/features/settings/settings-dialog.tsx+++ b/studio/frontend/src/features/settings/settings-dialog.tsx@@ -24,6 +24,7 @@ import {ApiIcon,BotIcon,Cancel01Icon,+ CancelCircleIcon,CloudIcon,ComputerTerminal01Icon,DatabaseSettingIcon,@@ -46,6 +47,7 @@ import {type ReactNode,Suspense,lazy,+ useCallback,useDeferredValue,useEffect,useLayoutEffect,@@ -195,6 +197,7 @@ const TABS: TabDef[] = [id: "appearance",labelKey: "settings.tabs.appearance",icon: BrushCleaningIcon,+ badgeKey: "shell.navigation.newBadge",},{id: "resources",@@ -293,6 +296,29 @@ export function SettingsDialog() {const hubSource = useHubSource();const canUpgradeToFullInstall = useFullInstallUpgrade() !== null;const { attach: attachRail, onScroll: onRailScroll, className: railFadeClass } = useScrollFades();+ // The list's own scroll bar width, so the tab pills keep equal side insets with or without one.+ const railRef = useCallback(+ (node: HTMLElement | null) => {+ attachRail(node);+ if (!node) {+ return;+ }+ const sync = () => {+ const width = `${node.offsetWidth - node.clientWidth}px`;+ if (node.style.getPropertyValue("--rail-scrollbar") !== width) {+ node.style.setProperty("--rail-scrollbar", width);+ }+ };+ sync();+ const observer = new ResizeObserver(sync);+ observer.observe(node);+ return () => {+ observer.disconnect();+ attachRail(null);+ };+ },+ [attachRail],+ );const visibleTabs = useMemo(() => TABS.filter((tab) => settingsTabVisible(tab.id, isOwner)), [isOwner]);const open = useSettingsDialogStore((s) => s.open);const requestedTab = useSettingsDialogStore((s) => s.activeTab);@@ -519,7 +545,7 @@ export function SettingsDialog() {<HugeiconsIconicon={Search01Icon}strokeWidth={2}- className="pointer-events-none absolute top-1/2 left-3.5 size-4 -translate-y-1/2 text-muted-foreground"+ className="pointer-events-none absolute top-[calc(50%-0.5px)] left-[13.5px] size-4 -translate-y-1/2 text-muted-foreground"/><inputvalue={query}@@ -533,16 +559,16 @@ export function SettingsDialog() {data-type-to-activate="settings-search"placeholder={t("common.search")}aria-label={t("settings.dialog.searchPlaceholder")}- className="h-[calc(36px*var(--ui-space-scale,1))] w-full rounded-full border-0 bg-accent pr-8 pl-10 text-ui-14p5 text-foreground outline-none transition-colors placeholder:text-muted-foreground dark:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))] dark:focus-visible:bg-[rgb(255_255_255_/_calc(0.14*var(--contrast-wash-gain,1)))]"+ className="h-[calc(36px*var(--ui-space-scale,1))] w-full rounded-full border-0 bg-accent pt-px pr-9 pl-[39.5px] text-ui-14p5 text-foreground outline-none transition-colors placeholder:text-muted-foreground dark:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))] dark:focus-visible:bg-[rgb(255_255_255_/_calc(0.14*var(--contrast-wash-gain,1)))]"/>{query && (<buttontype="button"onClick={() => setQuery("")}aria-label={t("settings.dialog.closeAriaLabel")}- className="absolute top-1/2 right-2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground hover:text-foreground"+ className="absolute top-1/2 right-[12.5px] flex size-4 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground hover:text-foreground">- <HugeiconsIcon icon={Cancel01Icon} className="size-3.5" />+ <HugeiconsIcon icon={CancelCircleIcon} className="size-4" /></button>)}</div>@@ -587,13 +613,15 @@ export function SettingsDialog() {</div>) : null}<nav- ref={attachRail}+ ref={railRef}onScroll={onRailScroll}className={cn(// A short window leaves the list taller than the clipped sidebar, so scroll it.- "hover-scrollbar settings-rail-fade flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto p-1",+ // Full width, so the scroll bar sits at the panel edge; the right padding gives back+ // what the bar takes, and a bar wider than the inset widens the left to match.+ "hover-scrollbar settings-rail-fade -mx-2 flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto py-1 pl-[max(calc(var(--spacing)*3),var(--rail-scrollbar,0px))] pr-[max(0px,calc(var(--spacing)*3-var(--rail-scrollbar,0px)))]",railFadeClass,- "group-data-stacked/settings:flex-none group-data-stacked/settings:flex-row group-data-stacked/settings:overflow-x-auto group-data-stacked/settings:py-0",+ "group-data-stacked/settings:mx-0 group-data-stacked/settings:flex-none group-data-stacked/settings:flex-row group-data-stacked/settings:overflow-x-auto group-data-stacked/settings:px-1 group-data-stacked/settings:py-0",results !== null && "group-data-stacked/settings:flex hidden",)}>@@ -648,7 +676,8 @@ export function SettingsDialog() {{t(tab.labelKey)}</span>{tab.badgeKey ? (- <span className="relative z-10 ml-auto rounded-full bg-control-accent/10 px-2 py-1 text-ui-10 leading-none font-semibold text-control-accent">+ // Visual only, so the tab's accessible name stays its label.+ <span aria-hidden="true" className="relative z-10 ml-auto rounded-full bg-control-accent/10 px-2 py-1 text-ui-10 leading-none font-semibold text-control-accent">{t(tab.badgeKey)}</span>) : null}diff --git a/studio/frontend/src/features/settings/settings-search.ts b/studio/frontend/src/features/settings/settings-search.tsindex 51c954210ed..c02eafa5676 100644--- a/studio/frontend/src/features/settings/settings-search.ts+++ b/studio/frontend/src/features/settings/settings-search.ts@@ -70,7 +70,6 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {"chatBackground.fade","chatBackground.sizingPosition","chatBackground.zoom",- "chatBackground.outline","chatBackground.effect","chatBackground.visibility","chatBackground.blur",@@ -84,7 +83,9 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {"settings.appearance.custom.chatFont.label","settings.appearance.custom.chatWidth.label","settings.profile.greetingSloth",+ "settings.appearance.composer.title","settings.chat.composerAtBottom",+ "chatBackground.outline","settings.appearance.custom.sentAttachments.label","settings.appearance.code.title","settings.appearance.custom.codeFont.label",diff --git a/studio/frontend/src/features/settings/stores/appearance-custom-store.ts b/studio/frontend/src/features/settings/stores/appearance-custom-store.tsindex 33e5fdfabcc..a1582c2fba2 100644--- a/studio/frontend/src/features/settings/stores/appearance-custom-store.ts+++ b/studio/frontend/src/features/settings/stores/appearance-custom-store.ts@@ -230,6 +230,8 @@ export type AppearanceCustomization = {codeFontSize: number | null;/** 0–100; 50 is neutral. */contrast: number;+ /** 0–100; null = the background image's own outline, or none without one. */+ composerOutline: number | null;pointerCursors: boolean;reduceMotion: ReduceMotionSetting;/** true = the app default (antialiased). */@@ -261,6 +263,7 @@ export const DEFAULT_CUSTOMIZATION: AppearanceCustomization = {uiFontSize: null,codeFontSize: null,contrast: 50,+ composerOutline: null,pointerCursors: false,reduceMotion: "system",fontSmoothing: true,@@ -465,6 +468,11 @@ export function sanitizeCustomization(value: unknown): AppearanceCustomization {uiFontSize: sanitizeSize(source.uiFontSize, UI_FONT_SIZE_RANGE),codeFontSize: sanitizeSize(source.codeFontSize, CODE_FONT_SIZE_RANGE),contrast,+ composerOutline:+ typeof source.composerOutline === "number" &&+ Number.isFinite(source.composerOutline)+ ? Math.min(100, Math.max(0, Math.round(source.composerOutline)))+ : null,pointerCursors: source.pointerCursors === true,reduceMotion:source.reduceMotion === "on" || source.reduceMotion === "off"@@ -1024,6 +1032,10 @@ export function applyCustomizationToDocument(setVar(CONTRAST_SEAM_GAIN_VAR, null);}+ setVar(+ "--composer-outline",+ c.composerOutline === null ? null : `${c.composerOutline}%`,+ );el.classList.toggle("pointer-cursors", c.pointerCursors);el.classList.toggle("force-reduced-motion", c.reduceMotion === "on");// "off" overrides OS reduced motion; index.css media rules skip html.force-motion.@@ -1033,6 +1045,7 @@ export function applyCustomizationToDocument(["data-code-line-numbers", c.codeLineNumbers],["data-code-wrap", c.codeWordWrap],["data-code-no-ligatures", !c.codeLigatures],+ ["data-composer-outline", (c.composerOutline ?? 0) > 0],] as const) {if (on) el.setAttribute(name, "");else el.removeAttribute(name);diff --git a/studio/frontend/src/features/settings/tabs/appearance-tab.tsx b/studio/frontend/src/features/settings/tabs/appearance-tab.tsxindex 0a6665e8b0a..f95609bfb6e 100644--- a/studio/frontend/src/features/settings/tabs/appearance-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/appearance-tab.tsx@@ -22,6 +22,7 @@ import {SentAttachmentsSelect,CodeFontRow,CodeFontSizeRow,+ ComposerOutlineSliderRow,ContrastSliderRow,FontSmoothingSwitch,HeadingFontRow,@@ -252,13 +253,38 @@ export function AppearanceTab() {><InterfaceScaleRow /></SettingsRow>+ <GreetingSettingsRows />+ <SettingsRow+ label={t("settings.appearance.custom.pointerCursors.label")}+ description={t(+ "settings.appearance.custom.pointerCursors.description",+ )}+ >+ <PointerCursorsSwitch />+ </SettingsRow>+ <SettingsRow+ label={t("settings.appearance.custom.reduceMotion.label")}+ description={t("settings.appearance.custom.reduceMotion.description")}+ >+ <ReduceMotionSegmented />+ </SettingsRow>+ <SettingsRow+ label={t("settings.appearance.custom.fontSmoothing.label")}+ description={t(+ "settings.appearance.custom.fontSmoothing.description",+ )}+ >+ <FontSmoothingSwitch />+ </SettingsRow>+ </SettingsSection>++ <SettingsSection title={t("settings.appearance.composer.title")}><SettingsRowlabel={t("settings.appearance.custom.chatWidth.label")}description={t("settings.appearance.custom.chatWidth.description")}><ChatWidthSelect /></SettingsRow>- <GreetingSettingsRows /><SettingsRowlabel={t("settings.chat.composerAtBottom")}description={t("settings.chat.composerAtBottomDescription")}@@ -269,6 +295,9 @@ export function AppearanceTab() {onCheckedChange={setComposerAtBottom}/></SettingsRow>+ <SettingsRow label={t("chatBackground.outline")}>+ <ComposerOutlineSliderRow />+ </SettingsRow><SettingsRowlabel={t("settings.appearance.custom.sentAttachments.label")}description={t(@@ -277,28 +306,6 @@ export function AppearanceTab() {><SentAttachmentsSelect /></SettingsRow>- <SettingsRow- label={t("settings.appearance.custom.pointerCursors.label")}- description={t(- "settings.appearance.custom.pointerCursors.description",- )}- >- <PointerCursorsSwitch />- </SettingsRow>- <SettingsRow- label={t("settings.appearance.custom.reduceMotion.label")}- description={t("settings.appearance.custom.reduceMotion.description")}- >- <ReduceMotionSegmented />- </SettingsRow>- <SettingsRow- label={t("settings.appearance.custom.fontSmoothing.label")}- description={t(- "settings.appearance.custom.fontSmoothing.description",- )}- >- <FontSmoothingSwitch />- </SettingsRow></SettingsSection><SettingsSection title={t("settings.appearance.code.title")}>diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 5450621739c..400a52ea0a0 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -2348,6 +2348,9 @@ export const ar = {standard: "قياسية",moreThemes: "المزيد من السمات",},+ composer: {+ title: "محرر الرسائل",+ },code: {title: "الشيفرة",fontDescription: "كتل الشيفرة في المحادثة ومعاينات الملفات وأمثلة API.",diff --git a/studio/frontend/src/i18n/locales/cs.ts b/studio/frontend/src/i18n/locales/cs.tsindex 8866cc1572c..94c76c58863 100644--- a/studio/frontend/src/i18n/locales/cs.ts+++ b/studio/frontend/src/i18n/locales/cs.ts@@ -2563,6 +2563,9 @@ export const cs = {standard: "Standardní",moreThemes: "Další motivy",},+ composer: {+ title: "Editor zpráv",+ },code: {title: "Kód",fontDescription: "Bloky kódu v chatu, náhledy souborů a příklady API.",diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex ca517dbc998..0dee35a8643 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -2377,6 +2377,9 @@ export const de = {standard: "Standard",moreThemes: "Weitere Designs",},+ composer: {+ title: "Eingabefeld",+ },code: {title: "Code",fontDescription: "Codeblöcke im Chat, Dateivorschauen und API-Beispiele.",diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex a80d165ea78..0c66d8b73d5 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -2362,6 +2362,9 @@ export const en = {standard: "Standard",moreThemes: "More themes",},+ composer: {+ title: "Composer",+ },code: {title: "Code",fontDescription: "Code blocks in chat, file previews and API examples.",diff --git a/studio/frontend/src/i18n/locales/es-419.ts b/studio/frontend/src/i18n/locales/es-419.tsindex bb823cb5de6..1b55f349508 100644--- a/studio/frontend/src/i18n/locales/es-419.ts+++ b/studio/frontend/src/i18n/locales/es-419.ts@@ -2581,6 +2581,9 @@ export const es419 = {standard: "Estándar",moreThemes: "Más temas",},+ composer: {+ title: "Editor",+ },code: {title: "Código",fontDescription: "Bloques de código en el chat, vistas previas de archivos y ejemplos de la API.",diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex 9d8f1d7a9af..1d22876674f 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -2372,6 +2372,9 @@ export const es = {standard: "Estándar",moreThemes: "Más temas",},+ composer: {+ title: "Editor",+ },code: {title: "Código",fontDescription: "Bloques de código en el chat, vistas previas de archivos y ejemplos de la API.",diff --git a/studio/frontend/src/i18n/locales/fa.ts b/studio/frontend/src/i18n/locales/fa.tsindex 31532bcafc6..758050b0d36 100644--- a/studio/frontend/src/i18n/locales/fa.ts+++ b/studio/frontend/src/i18n/locales/fa.ts@@ -2535,6 +2535,9 @@ export const fa = {standard: "استاندارد",moreThemes: "پوستههای بیشتر",},+ composer: {+ title: "ویرایشگر پیام",+ },code: {title: "کد",fontDescription: "بلوکهای کد در گفتگو، پیشنمایش فایلها و نمونههای API.",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex dc6e76ea56f..ea0651c97c4 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -2375,6 +2375,9 @@ export const fr = {standard: "Standard",moreThemes: "Plus de thèmes",},+ composer: {+ title: "Zone de saisie",+ },code: {title: "Code",fontDescription: "Blocs de code dans le chat, aperçus de fichiers et exemples d’API.",diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.tsindex f5e05b8ddba..7999f7b850c 100644--- a/studio/frontend/src/i18n/locales/he.ts+++ b/studio/frontend/src/i18n/locales/he.ts@@ -2404,6 +2404,9 @@ export const he = {standard: "סטנדרטית",moreThemes: "ערכות נושא נוספות",},+ composer: {+ title: "תיבת הכתיבה",+ },code: {title: "קוד",fontDescription: "בלוקי קוד בצ׳אט, תצוגות מקדימות של קבצים ודוגמאות API.",diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 8e948965295..1f295bc15e3 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -2354,6 +2354,9 @@ export const hi = {standard: "मानक",moreThemes: "और थीम",},+ composer: {+ title: "कंपोज़र",+ },code: {title: "कोड",fontDescription: "चैट में कोड ब्लॉक, फ़ाइल प्रीव्यू और API उदाहरण।",diff --git a/studio/frontend/src/i18n/locales/id.ts b/studio/frontend/src/i18n/locales/id.tsindex 31b0cfb87a2..49f71d4f9a0 100644--- a/studio/frontend/src/i18n/locales/id.ts+++ b/studio/frontend/src/i18n/locales/id.ts@@ -2546,6 +2546,9 @@ export const id = {standard: "Standar",moreThemes: "Tema lainnya",},+ composer: {+ title: "Penyusun pesan",+ },code: {title: "Kode",fontDescription: "Blok kode di chat, pratinjau file, dan contoh API.",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex 22f70be90dd..8aa98f74755 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -2277,6 +2277,9 @@ export const it = {standard: "Standard",moreThemes: "Altri temi",},+ composer: {+ title: "Editor",+ },code: {title: "Codice",fontDescription: "Blocchi di codice nella chat, anteprime dei file ed esempi API.",diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex aac92944ed9..c742ad8a293 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -2331,6 +2331,9 @@ export const ja = {standard: "スタンダード",moreThemes: "その他のテーマ",},+ composer: {+ title: "入力欄",+ },code: {title: "コード",fontDescription: "チャット内のコードブロック、ファイルのプレビュー、API の例。",diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex d2e4364d5a3..8338bd8ddc4 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -2342,6 +2342,9 @@ export const ko = {standard: "표준",moreThemes: "더 많은 테마",},+ composer: {+ title: "입력창",+ },code: {title: "코드",fontDescription: "채팅의 코드 블록, 파일 미리보기, API 예시.",diff --git a/studio/frontend/src/i18n/locales/nl.ts b/studio/frontend/src/i18n/locales/nl.tsindex e89d638bb94..49be4475690 100644--- a/studio/frontend/src/i18n/locales/nl.ts+++ b/studio/frontend/src/i18n/locales/nl.ts@@ -2583,6 +2583,9 @@ export const nl = {standard: "Standaard",moreThemes: "Meer thema's",},+ composer: {+ title: "Invoerveld",+ },code: {title: "Code",fontDescription: "Codeblokken in de chat, bestandsvoorbeelden en API-voorbeelden.",diff --git a/studio/frontend/src/i18n/locales/pl.ts b/studio/frontend/src/i18n/locales/pl.tsindex acbbddf12f1..9577f39d686 100644--- a/studio/frontend/src/i18n/locales/pl.ts+++ b/studio/frontend/src/i18n/locales/pl.ts@@ -2578,6 +2578,9 @@ export const pl = {standard: "Standardowy",moreThemes: "Więcej motywów",},+ composer: {+ title: "Pole wiadomości",+ },code: {title: "Kod",fontDescription: "Bloki kodu na czacie, podglądy plików i przykłady API.",diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex c309f7bcb16..f9a555d1e93 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -2363,6 +2363,9 @@ export const ptBR = {standard: "Padrão",moreThemes: "Mais temas",},+ composer: {+ title: "Editor",+ },code: {title: "Código",fontDescription: "Blocos de código no chat, prévias de arquivos e exemplos da API.",diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex 0b4d3150fb5..39344b33e29 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -2358,6 +2358,9 @@ export const ru = {standard: "Стандартная",moreThemes: "Другие темы",},+ composer: {+ title: "Поле ввода",+ },code: {title: "Код",fontDescription: "Блоки кода в чате, предпросмотр файлов и примеры API.",diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.tsindex c04be5d2339..af7647fa7d9 100644--- a/studio/frontend/src/i18n/locales/sv.ts+++ b/studio/frontend/src/i18n/locales/sv.ts@@ -2474,6 +2474,9 @@ export const sv = {standard: "Standard",moreThemes: "Fler teman",},+ composer: {+ title: "Inmatningsfält",+ },code: {title: "Kod",fontDescription: "Kodblock i chatten, filförhandsvisningar och API-exempel.",diff --git a/studio/frontend/src/i18n/locales/th.ts b/studio/frontend/src/i18n/locales/th.tsindex 7e348ef104f..814036b1d06 100644--- a/studio/frontend/src/i18n/locales/th.ts+++ b/studio/frontend/src/i18n/locales/th.ts@@ -2441,6 +2441,9 @@ export const th = {standard: "มาตรฐาน",moreThemes: "ธีมเพิ่มเติม",},+ composer: {+ title: "ช่องพิมพ์ข้อความ",+ },code: {title: "โค้ด",fontDescription: "บล็อกโค้ดในแชท ตัวอย่างไฟล์ และตัวอย่าง API",diff --git a/studio/frontend/src/i18n/locales/tr.ts b/studio/frontend/src/i18n/locales/tr.tsindex c3ca9141b6c..da2d17ec068 100644--- a/studio/frontend/src/i18n/locales/tr.ts+++ b/studio/frontend/src/i18n/locales/tr.ts@@ -2538,6 +2538,9 @@ export const tr = {standard: "Standart",moreThemes: "Diğer temalar",},+ composer: {+ title: "Mesaj kutusu",+ },code: {title: "Kod",fontDescription: "Sohbetteki kod blokları, dosya önizlemeleri ve API örnekleri.",diff --git a/studio/frontend/src/i18n/locales/uk.ts b/studio/frontend/src/i18n/locales/uk.tsindex ebaa393f50a..6218cff3ab6 100644--- a/studio/frontend/src/i18n/locales/uk.ts+++ b/studio/frontend/src/i18n/locales/uk.ts@@ -2570,6 +2570,9 @@ export const uk = {standard: "Стандартна",moreThemes: "Інші теми",},+ composer: {+ title: "Поле введення",+ },code: {title: "Код",fontDescription: "Блоки коду в чаті, попередній перегляд файлів і приклади API.",diff --git a/studio/frontend/src/i18n/locales/vi.ts b/studio/frontend/src/i18n/locales/vi.tsindex ff98e282f40..6e30d2c1f08 100644--- a/studio/frontend/src/i18n/locales/vi.ts+++ b/studio/frontend/src/i18n/locales/vi.ts@@ -2550,6 +2550,9 @@ export const vi = {standard: "Tiêu chuẩn",moreThemes: "Thêm chủ đề",},+ composer: {+ title: "Khung soạn tin",+ },code: {title: "Mã",fontDescription: "Khối mã trong trò chuyện, bản xem trước tệp và ví dụ API.",diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex eace76f230e..7d31c2628bd 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -2334,6 +2334,9 @@ export const zhCN = {standard: "标准",moreThemes: "更多主题",},+ composer: {+ title: "输入框",+ },code: {title: "代码",fontDescription: "聊天中的代码块、文件预览和 API 示例。",diff --git a/studio/frontend/src/i18n/locales/zh-TW.ts b/studio/frontend/src/i18n/locales/zh-TW.tsindex f14edda3c57..802bf6c1b34 100644--- a/studio/frontend/src/i18n/locales/zh-TW.ts+++ b/studio/frontend/src/i18n/locales/zh-TW.ts@@ -2428,6 +2428,9 @@ export const zhTW = {standard: "標準",moreThemes: "更多主題",},+ composer: {+ title: "輸入框",+ },code: {title: "程式碼",fontDescription: "聊天中的程式碼區塊、檔案預覽和 API 範例。",diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.cssindex 86a7607dfe4..cd6a26d4ce5 100644--- a/studio/frontend/src/index.css+++ b/studio/frontend/src/index.css@@ -6057,9 +6057,13 @@ html[data-find-bar-open] [data-sonner-toaster][data-y-position="top"] {background: color-mix(in srgb, var(--background) max(92%, calc((1 - var(--wallpaper-safe, 0)) * 100%)), transparent);backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);/* An outline over the image instead of a drop shadow, through the composer's one shadow variable. */- --composer-shadow: inset 0 0 0 1px color-mix(in srgb, var(--foreground) var(--wallpaper-outline, 30%), transparent);+ --composer-shadow: inset 0 0 0 1px color-mix(in srgb, var(--foreground) var(--composer-outline, var(--wallpaper-outline, 30%)), transparent);box-shadow: var(--composer-shadow);}+/* The Appearance setting draws the same outline without a background image too. */+html[data-composer-outline] .unsloth-composer-surface {+ --composer-shadow: inset 0 0 0 1px color-mix(in srgb, var(--foreground) var(--composer-outline), transparent);+}.wallpaper-preview-prose { background: var(--background); }.chat-wallpaper::after {diff --git a/studio/frontend/tests/appearance-composer-outline.test.ts b/studio/frontend/tests/appearance-composer-outline.test.tsnew file mode 100644index 00000000000..399a8c8f04f--- /dev/null+++ b/studio/frontend/tests/appearance-composer-outline.test.ts@@ -0,0 +1,60 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import assert from "node:assert/strict";+import test from "node:test";++import { readSrc } from "./helpers/kit.ts";++const attributes = new Set<string>();+const vars = new Map<string, string>();+(globalThis as { document?: unknown }).document = {+ documentElement: {+ style: {+ setProperty: (name: string, value: string) => vars.set(name, value),+ removeProperty: (name: string) => vars.delete(name),+ },+ setAttribute: (name: string) => attributes.add(name),+ removeAttribute: (name: string) => attributes.delete(name),+ toggleAttribute: (name: string, on: boolean) => (on ? attributes.add(name) : attributes.delete(name)),+ classList: { toggle() {} },+ },+};++const { applyCustomizationToDocument, DEFAULT_CUSTOMIZATION, sanitizeCustomization } = await import(+ "../src/features/settings/stores/appearance-custom-store.ts"+);++test("records from before the setting keep the background image's own outline", () => {+ assert.equal(sanitizeCustomization({}).composerOutline, null);+ assert.equal(sanitizeCustomization({ composerOutline: "40" }).composerOutline, null);+ assert.equal(sanitizeCustomization({ composerOutline: 140 }).composerOutline, 100);+ assert.equal(sanitizeCustomization({ composerOutline: 12.6 }).composerOutline, 13);+});++test("a set outline reaches every composer, and 0 keeps the theme shadow", () => {+ applyCustomizationToDocument({ ...DEFAULT_CUSTOMIZATION, composerOutline: 40 }, "light");+ assert.equal(vars.get("--composer-outline"), "40%");+ assert.ok(attributes.has("data-composer-outline"));+ applyCustomizationToDocument({ ...DEFAULT_CUSTOMIZATION, composerOutline: 0 }, "light");+ assert.equal(vars.get("--composer-outline"), "0%");+ assert.ok(!attributes.has("data-composer-outline"));+ // Unset: off, except the background image's own outline over an image.+ applyCustomizationToDocument(DEFAULT_CUSTOMIZATION, "light");+ assert.ok(!vars.has("--composer-outline"));+ assert.ok(!attributes.has("data-composer-outline"));+ const css = readSrc("index.css");+ assert.match(css, /html\[data-composer-outline\] \.unsloth-composer-surface \{\s*--composer-shadow: inset 0 0 0 1px/);+ assert.match(css, /var\(--composer-outline, var\(--wallpaper-outline, 30%\)\)/);+});++test("the composer rows have their own Composer section", () => {+ const tab = readSrc("features/settings/tabs/appearance-tab.tsx");+ const section = tab.slice(tab.indexOf('t("settings.appearance.composer.title")'));+ assert.ok(section.indexOf("composerAtBottom") < section.indexOf("settings.appearance.code.title"));+ assert.ok(section.indexOf("<ComposerOutlineSliderRow />") < section.indexOf("settings.appearance.code.title"));+ assert.ok(section.indexOf("<ChatWidthSelect />") < section.indexOf("settings.appearance.code.title"));+ assert.ok(section.indexOf("<SentAttachmentsSelect />") < section.indexOf("settings.appearance.code.title"));+ const preferences = tab.slice(tab.indexOf("preferencesTitle"), tab.indexOf('t("settings.appearance.composer.title")'));+ assert.doesNotMatch(preferences, /composerAtBottom|ComposerOutlineSliderRow|ChatWidthSelect|SentAttachmentsSelect/);+});