Skip to content

Studio: background fit and position controls, outline strength slider, composer setting in Appearance, audio and library polish - #16287

Merged
shimmyshimmer merged 8 commits into
mainfrom
studio-appearance-polish-batch
Nov 1, 2026
Merged

shimmyshimmer merged 8 commits into
mainfrom
studio-appearance-polish-batch

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

A batch of Studio settings and polish fixes.

Settings

  • Settings > API and the API page quick start no longer show a Training chip. The Train page's "Use via API" button still opens the Training example, and the chip shows up only while that example is open, so the button keeps working.
  • "Composer at the bottom" moved from Settings > Chat to Settings > Appearance, under Chat width. It is still the same setting and keeps its saved value.
  • The settings dialog is 40px wider (1000px, 1160px on very large screens), and the content column has 4px more padding on each side. The rail still stacks when the scaled dialog no longer fits.
  • Appearance is now shown by default in the account menu (the avatar menu at the bottom of the sidebar), with a "New" tag. It was already an optional item there but hidden. Existing users adopt it once: the local store moves to version 9 and the synced personalization record to version 6, and after that a user who hides it keeps it hidden.
  • "Background image" in Settings > Appearance carries the same "New" tag. SettingsSection gained an optional badge beside its heading for this.
  • Every settings icon (account menu, sidebar cog, command palette, model load settings, Edit menu items and the rest) uses Hugeicons "settings-01" in its newest drawing. The pinned @hugeicons/core-free-icons 4.1.1 has an older one, so the 4.4.0 drawing is copied into lib/hugeicons-derived.ts, as other newer icons already are.
  • The browser's site information button shows a two-slider icon, as browsers use for "View site information", instead of a shield; its hover is a 26px circle. An insecure page still shows the warning shield.
  • While typing in the browser's address bar, the text starts 14px from the pill's edge instead of 12px.

Background image

  • New sizing options: Fit width and Fit height, next to Fill, Fit, Stretch and Original size.
  • Sizing and position share one "Image sizing & position" dropdown: the sizing options, then a 3x3 position pad beside X and Y fields (0 to 100%), so the image can be framed anywhere instead of only at the nine presets. The separate Position row is gone.
  • "Composer outline" is now a strength slider instead of a switch. The default ring is 30% of the text color, which shows up much better over an image than the old --border line. A saved "off" becomes 0 and a saved "on" becomes the new default.

Library

  • In the Chats and Archived grid views, the line under each date heading (and the Projects / Chats headings) is gone. List view keeps it, since it lines up the rows there.

Audio

  • The Transcribe button now looks like Generate on the other audio pages and on Images and Video: the large accent button, with an outline Stop button while it runs (it used to be a smaller dark button with a red Stop).
  • The hint line under Generate / Transcribe ("Load a speech model to generate.", "Loads X first.") now keeps its space when it is empty, so the button no longer jumps down once a model loads.

Chat dictation

  • The microphone waveform has 48 rounded bars instead of 84 thin ones. The bars change height instead of being stretched, so their ends stay round, and older samples fade out at the left edge. A pulsing red dot next to the timer shows that recording is live.

Images

  • The empty output panel on the right of the Images page uses the same icon as the Images tab.

Verification

  • npm run typecheck, npm run i18n:check:strict, npm test (14,523 pass), npm run build, npm run bundle:check
  • tests/chat-background.test.ts covers the outline migration (booleans to 0 / default, clamping), custom positions and the new sizing values. tests/training-api-snippets.test.ts checks that the Training chip shows only when the Train page asks for it.
  • Checked by hand in a local Studio build on macOS (CPU): Settings > Appearance / Chat / API, the background controls and live composer ring, Library Chats and Archived in grid and list view, the Images placeholder icon, the Speak and Transcribe footers, and the dictation bar with Chromium's fake microphone.

Not testable here

  • Dictation with a real microphone and real speech: the waveform was checked with Chromium's fake microphone tone.
  • Loading audio models on a GPU. The Generate / Transcribe footer was checked in its unloaded and blocked states.

…ser setting in Appearance, audio and library polish

- Background image: Fit width / Fit height sizing, horizontal and vertical
  position sliders, and the composer outline as a 0-100% strength slider
  (default 30%, stronger than the old border line; saved on/off migrate).
- Move "Composer at the bottom" from Settings > Chat to Appearance.
- Settings > API and the API page quick start drop the Training chip; it
  only appears while the Train page's API button has that example open.
- Library Chats / Archived grid view: no rule under the date headings.
- Audio: Transcribe matches Generate (accent button, outline Stop), and
  the hint line under both keeps its space so the button does not jump.
- Chat dictation: 48 rounded bars that grow in height, a fading left edge
  and a pulsing recording dot.
- Images: the empty output panel uses the Images tab icon.
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
shimmyshimmer added a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 31, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

Before / after

BEFORE is the merge base (3ecb1ba) and AFTER is this PR's head (27f05c3). The PR only touches studio/frontend, so both sides ran on the same Studio backend and data (same chats, same uploaded image), serving the merge-base build and then this PR's build. Each side's served bundle was checked (index-YSJ66FXJ.js before, index-DRSWsPdZ.js after). Light theme, macOS, headless Chromium.

Background image controls: the outline switch becomes a strength slider (30% by default), and Horizontal / Vertical position sliders sit under the preset grid.

Background image controls

Image sizing: Fit width and Fit height are new.

Image sizing options

Composer over the background: the ring goes from the light --border gray to 30% of the text color.

Composer ring over the background

Settings > Appearance: "Composer at the bottom" now sits under Chat width. It is gone from Settings > Chat (0 matches there after, 1 before).

Appearance preferences

Settings > API quickstart: no Training chip.

API quickstart chips

Library, Chats and Archived in grid view: no rule under the date headings (computed border-bottom-width goes from 1px to 0px on every heading).

Library chats grid

Library archived grid

Audio > Transcribe: the button matches Generate (44px tall, up from 34px).

Transcribe footer

Images: the empty output panel uses the Images tab icon.

Images placeholder

Chat dictation: 48 rounded bars instead of 84 stretched dots, a fading left edge and a red recording dot. This was driven by Chromium's fake microphone tone, not real speech.

Dictation bar

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T09:39:37.448267Z 126c4dc Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 27f05c3513

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: d6dbf6042b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 1f6c76df47

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 1, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 56b44e05a9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Nov 1, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 126c4dc672

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer
shimmyshimmer merged commit c510fc1 into main Nov 1, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-appearance-polish-batch branch November 1, 2026 09:42
shimmyshimmer added a commit that referenced this pull request Nov 1, 2026
…, or all pages) (#16297)

## Summary

Adds a **Show on** choice to Settings > Appearance > Background image,
so the background can be limited to the new chat page or shown
everywhere:

| Show on | New chat page | Open conversation | Other pages (Library,
Hub, ...) |
|---|---|---|---|
| New chat page | yes | no | no |
| Chats (default) | yes | yes | no |
| All pages | yes | yes | yes |

- "Chats" is today's behaviour and stays the default, so nobody's
background changes on update. Saved backgrounds without the field load
as "Chats".
- With "New chat page", the background goes away as soon as the chat has
messages. The new chat welcome marks itself on screen
(`useMarkChatWelcome`), and the app-level mount only shows the wallpaper
while it is.
- The settings preview follows the choice: the Conversation preview
shows no background on "New chat page".
- "All pages" uses the existing non-chat wallpaper styles that
`BACKGROUND_ON_ALL_PAGES` used to gate behind a constant; the constant
is gone.
- Labels in every locale.

Stacked on #16287 (the background fit, position and outline changes),
which this builds on.

## Verification

- `npm run typecheck`, `npm run i18n:check:strict`, `npm test`, `npm run
build`
- `tests/chat-background.test.ts` covers the scope default and repair of
bad stored values.
- In a local Studio build: checked the wallpaper on a new chat, an open
conversation and the Library for each of the three choices (9
combinations, all as in the table).
shimmyshimmer added a commit that referenced this pull request Nov 1, 2026
…n the greeting is off (#16301)

## Summary

- **Show greeting** moves from Settings > Chat to Settings > Appearance,
next to "Composer at the bottom". Same setting, so the saved choice
carries over, and settings search finds it under Appearance.
- With the greeting off, the centred new chat composer no longer jumps
up by the greeting's height. The greeting's row and gap become top
padding, so the composer stays where it sits with the greeting on.
Composer-at-bottom, the files layout, the expanded writing view and
incognito (which always shows its title) are unchanged.

Stacked on #16287, which moves "Composer at the bottom" to Appearance.

## Verification

- `npm run typecheck`, `npm test`, `npm run build`
- In a local Studio build at 1440x900, the composer's top edge is 376px
with the greeting on and 376px with it off (it was about 80px higher
before).
danielhanchen added a commit that referenced this pull request Nov 20, 2026
## What

Appearance settings can now be exported as a theme file and imported
back, so people can share a look or try one someone else made. It lives
in Settings > Appearance under "Theme file", below Code.

- **Export** writes `<name>.unsloth-theme.json`: color theme, light and
dark colors, contrast, element outline, fonts and sizes, code display,
chat width, composer outline and glass (including where it shows).
Sidebar layout, and imported fonts plus the background image, are opt-in
switches.
- **Import** opens a preview before anything changes: the name, light
and dark swatches, what will change, and any warnings (unknown keys,
invalid or out-of-range values, an unknown color theme, a file from a
newer Studio). Apply shows a toast with **Undo**, which puts back the
previous look.
- Personal settings never leave the device and are never overwritten,
Undo included: light/dark/system mode, interface scale, reduce motion
and pointer cursors.

## File format

```jsonc
{
  "kind": "unsloth-studio.appearance",
  "schemaVersion": 1,
  "name": "Midnight Matcha",
  "palette": "matcha",
  "look": { "colors": {...}, "contrast": 62, "uiFont": "Lato", "chatWidth": "wide", ... },
  "glass": { "material": "frosted", "strength": { "light": 40, "dark": 15 }, "lens": "off", "menus": true, "scope": "all" },
  "layout": {...},     // opt-in
  "fonts": [...],      // opt-in
  "background": {...}  // opt-in
}
```

`look` and `layout` use the customization field names directly. One
table, `FIELD_GROUP` in `appearance-theme/theme-file.ts`, says where
every `AppearanceCustomization` field goes (look, layout, fonts or
personal), and the typecheck fails if a new field has no entry. Applying
a theme first resets every look setting to its default, so the same file
always gives the same look; an older file just gets defaults for
settings added later, and a newer one is applied best-effort with a
warning.

## Untrusted input

- `JSON.parse` only, a 256 KB cap (8 MB when the file carries fonts or a
background) checked before the file is read, and at most 50 warnings
("And N more").
- Fields are read through own-property checks, so `__proto__` keys are
never followed, and every value goes through the existing
`sanitizeCustomization`, glass and background sanitizers.
- Embedded fonts must load through `FontFace.load()`, as in the font
picker, or they are dropped with a warning. Font names match
case-insensitively, as in CSS, and a theme never pushes a selected font
out of the 3-font limit.
- The background must be a PNG, JPEG or WebP base64 data URL and is
decoded and re-encoded through the normal upload path
(`uploadBackgroundImage`). No raw CSS, no URLs fetched.

## Also fixed

The sidebar menu's Appearance item defaults to visible in the frontend
since #16287, but the backend default (`SIDEBAR_MENU_ITEM_DEFAULTS`)
still said hidden, so a GET filled it in as hidden for records missing
it. It now says visible, and `sidebar-nav-backend-parity.test.ts` keeps
the two in sync.

## Verification

- `tests/appearance-theme-file.test.ts`: round trip, personal fields,
hostile input, case-variant and capped fonts, local fonts, layout
opt-in, unloadable fonts, Undo keeping personal settings.
- Frontend node suite, `npm run typecheck`, eslint on touched files,
`npm run i18n:check:strict`, and backend
`test_personalization_settings.py` pass.

## Before / after on two real installs

Two `install.sh --local` Studios, main and this branch, driven in
Chromium. The import file had a newer `schemaVersion`, an unknown key
and an out-of-range UI font size.

Settings > Appearance: the new Theme file section.

![Theme file
section](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/16564/pr16564_pair_00-5333ba1fe1e2.png)

Import preview: swatches, the change groups and the three warnings.

![Import
preview](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/16564/pr16564_pair_01-a2edaa4bceb4.png)

After Apply: Matcha, contrast 64, element outline 40, UI font size
clamped to 20, with the Undo toast. Undo then put every value back.

![Applied with
Undo](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/16564/pr16564_pair_02-f22e5ba3afd5.png)

---------

Co-authored-by: LeoBorcherding <[email protected]>
Co-authored-by: Daniel Han <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant