Repository navigation
Studio: size the composer and model picker to the window and zoom - #18074
Conversation
The composer reserves two rows when empty, grows to 10 rows (fewer on short or zoomed windows), sits 16px off the window foot in a thread, and drops to the foot on a new chat in a window under 34rem tall. The composer model picker tracks the window: 30vw between 360px and 520px wide, and fits its rows between a 240px floor and 56dvh capped at 540px. Its caps grow by the page's zoom-out factor so zooming out keeps its on-screen size. It opens 8px under Select model and rides up over the composer only when its rows do not fit below. A connected model in use can be ejected from the composer picker again.
…room below The picker is at least 420px tall (380px on short landscape windows, judged in on-screen px so zoom does not move it). It grows past that, up to 540px, only into the room under Select model, and rides up over the composer only when that room is shorter than the floor. Run settings opens at the floor again and its advanced view can reach 640px. [skip ci]
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
A model with no maker logo (flint, a local folder, snac) now shows the coloured letter tile a connection without a logo already gets, at 16px so the disc reads as large as the logos beside it. Tile colours take any hue from the name (FNV-1a with murmur3's finalizer, four lightness steps), and the tile redraws once fonts load and on resize so the letter stays centred. Also trims two picker comments.
…or default The rule declaring --picker-floor sits in the utilities layer after Tailwind, so its default beat the [--picker-floor:available-height] utility on upward panels and capped them against the whole viewport. Use the default only as a var() fallback. [skip ci]
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
## Studio: keep the composer one row tall inside a conversation #18074 raised the empty composer from one row to two (`COMPOSER_MIN_ROWS = 2`, a 64px editor instead of 40px) so a new chat has room to start typing. Inside a conversation that extra row only pushed the messages up and made the docked composer read as a large empty box. Now the empty editor reserves two rows only on the new chat screen (`thread.isEmpty`) and one row once a conversation exists. Typing still grows the box the same way, up to the window-based row limit from #18074. - `components/assistant-ui/thread.tsx`: the min editor height is `(16 + 24 * (threadEmpty ? COMPOSER_MIN_ROWS : 1)) * uiSpaceScale`. - `tests/ui-font-size-scales-spacing.test.ts`: pins the one-row rule for the main composer; Compare's shared composer keeps two rows. ### Verification - `npm run typecheck` and `npm test` (16735 passed, 0 failed) on a branch that included this change. - In a local Studio with gemma-3-270m loaded: after one message, the composer's editor measured 40px; on a new chat it measured 64px. ### Not covered - Compare (`features/chat/shared-composer.tsx`) is unchanged and still reserves two rows.
…ender fixes, settings tidy (#18576) ## Summary A set of chat polish fixes: wallpaper conversations no longer show text through or under the composer, the model picker keeps one height across tabs again, wallpaper effects stop failing on transient errors, the header matches the wallpaper shade without glass, and a few settings and composer sizes are tidied. ## Wallpaper: thread fades out behind the composer With a chat wallpaper, the conversation scrolled behind the composer and kept showing through it and in the gap below it, because the wallpaper hides the solid bottom fade that normally covers that area. The thread now runs to the composer's top edge and fades out within the 10px beneath it (scaled with interface scale), so no text shows through the composer body or below it. - `ThreadComposerDock` measures the composer surface against the bottom of the thread viewport and publishes `--thread-composer-clip` and `--thread-composer-fade` on the thread root (cleared when the thread is empty or the dock unmounts). - The wallpaper mask on `.aui-thread-viewport` gains a steep fade starting at that height. Without a wallpaper nothing changes: only the wallpaper rules read these variables. ## Wallpaper: header shade without glass The wallpaper wash now sits on the thread root for every material (it already did for Glass), so the header strip has the same shade as the conversation instead of the brighter raw wallpaper. The extra header darkening (`.chat-wallpaper::after`) is dropped for conversations without glass. Glass, the new chat view and page routes keep their current look. ## Wallpaper: "Could not render the effect" The message, with blank previews, came from steps that fail for reasons unrelated to the image: - `HTMLImageElement.decode()` may reject while the image still loads (the HTML spec allows it), and every wallpaper load awaited it directly. Images now load through `loadImage`, which only fails when the image itself fails to load. - A tab still running the previous build asks for an effect worker file the new build no longer has (404), so every effect failed until reload. A worker that cannot start now falls back to the same transform on the main thread. - A later successful render clears a stale effect error instead of leaving it up until the next setting change. Both failure modes were reproduced by fault injection (a 404 for the worker asset, and `decode()` rejecting every other call): before, the error showed for Dither, Halftone and ASCII; after, no error and the effect paints. Without injection I could not reproduce the error in Chromium or WebKit. ## Model picker height Since #18074 the open picker grew from 420px up to 540px with the number of rows in the current tab, so it changed size when switching tabs. Its height now comes from the window only, so every tab has the same height: 400px on short landscape windows, 420px up to a 1080px-tall window, rising to 540px at 1380px and taller. It is measured in on-screen pixels, so zoom does not change it, and it is still capped to the window. The growth into the room under Select model (`--composer-picker-max-h`, `--picker-room`) is removed; Run settings keeps its own height. Measured on every tab: 1440x900 = 400, 1920x1080 = 420, 2560x1230 = 480, 2560x1440 = 540. ## Settings and composer sizes - **Customization section:** Settings > Chat gets a Customization section under Composer, holding Chat width, Composer position, Composer outline and Monochrome model icons (moved from Model selection). Composer keeps Send shortcut, Follow-up behavior, Share drafts and Plain text composer, and gains Scroll while generating and Speed and context stats from Chat defaults. The title is added to every locale. - **Chat defaults:** Condense long pastes, Context window usage, Sent attachments and Rich text paste (last) move there from Composer. - **Composer position:** the new chat default is 45 (was 40). Saved preferences keep their value. - **New chat composer:** 8px shorter on the new chat page only (118px at 100% scale), all from the gap between the text and the bottom row. An empty saved chat or the floating chat keeps 126px. - **Compare composer:** reserves one row, like a conversation's composer, instead of two (102px at 100% scale). - **Compare cursor:** the Compare textarea carries `role="combobox"`, which the global pointer-cursor rule turned into a hand. Text fields with that role now keep the text cursor; button comboboxes keep the pointer. ## Verification - `npm run typecheck`, `npm run build`, `npm test` (16826 pass). - Isolated Studio on CPU driven with Playwright: wallpaper conversation screenshots (text fades just under the composer edge, none inside it, no wash seam), header strip before/after with glass off, picker height on every tab at four window sizes, settings sections, new chat and Compare composer heights, and the effect error under fault injection. Not checked here: Glass materials and the Desktop shell on macOS / Windows / Linux, and GPU-only flows. --------- Co-authored-by: Unsloth <[email protected]>
The chat composer and the composer model picker now size themselves to the window and to zoom, connected (cloud) models can be ejected from the composer picker again, and models with no logo get a letter tile.
Composer
Composer model picker
outerWidth / innerWidth; desktop: the webview zoom), so the picker keeps its on-screen size instead of shrinking. A large monitor at 100% stays capped.On-screen picker size and position (Room = space under Select model):
Connected models can be ejected again
A connected model is never "loaded", so since the picker moved into the composer the chip's hover eject, the panel's Eject button and the row menu's Eject were all hidden for it. They now show for a connected model in use, and ejecting clears the selection (
ejectModelalready handled external ids). With two or more local models loaded, the panel's "Eject all" still unloads only the local models, as before.Screenshots
Before is main's fixed 420x420 picker on its default tab; after shows the tab named in each caption.
1920x1080, Discover tab after: wider, and taller into the room under Select model.
MacBook Air (1440x900), Discover tab after: 431px of room, so it grows to 432px and stays under Select model.
1366x768, Discover tab after: 352px of room is under the 380px floor, so it rides up 20px.
MacBook Pro 14 zoomed out to 50%, Discover tab after: the picker used to shrink to 210px on screen, now it keeps its size.
Composer with a 40-line prompt on a MacBook Air, before (12 rows) and after (10 rows):
A connected model in use, before (no Eject) and after (Eject on the chip and in the panel):
Letter tiles for models with no logo
A model with no maker logo (flint, Ornith, snac_24khz, a local folder) used to show no icon. It now gets the coloured letter tile that a connection without a logo already uses, drawn from the model's name.
-GGUFdo not cluster) with four lightness steps that keep white text readable. Connections without a logo get the same colours.Verification
npm run typecheck,npm test(16476 pass, 0 fail),npm run build.composerMaxRows,pickerWidth,pickerZoomOut,pickerMinHeight,pickerRoomBelow,pickerDropOffsetand the letter tile colours, plus source checks for the picker height and eject rules.Not tested here
outerWidth.