Repository navigation
Studio: one padding for every main button - #15122
Conversation
Filled Buttons (default, dark, primary, outline, secondary, muted, destructive) at sm, lg and hero now share the default 36px height and 12px side padding, and the per-call height and padding overrides on those buttons are gone. Ghost and link buttons, icon buttons, xs chips, toggles, pickers and option cards keep their sizes.
Run settings' Load model, Reset and Share used 16px sides from their own footer class, and the Data tab's archive buttons were 39px tall; both now take 36px and 12px sides.
Filled buttons no longer trim the side next to a leading or trailing icon to 10px, so an icon button has the same 12px sides as a plain one; the Decisions Run button drops its own uneven padding. The API page's model trigger label had leading-none inside a truncating span, which cropped the tails of g, p, q and y; it now gets a 20px line.
Filled buttons take their height from the label's line plus 8px above and below instead of a fixed 36px, and their icons get a negative block margin so a larger glyph cannot push the padding out. The 1px border now counts toward the 12px sides and 8px top and bottom. The Library New menus, the Hub Run, Load more and Clear filters buttons, and the other hand-built main buttons follow the same rule.
|
Two reds here:
|
Images and Video put Cancel load in the header row of 34px pills; it keeps the shared side padding but stays the row's height, as the desktop contract test expects.
|
@codex security review |
Codex Review SummaryThis 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. What shall we delve into next? 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". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Breezy! 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". |
|
Codex Review: Didn't find any major issues. More of your lovely PRs 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". |
# Conflicts: # studio/frontend/src/features/api-monitor/components/api-model-load-controls.tsx # studio/frontend/src/features/model-picker/components/model-config-page.tsx # studio/frontend/src/features/settings/components/cache-storage-rows.tsx
The Data tab's Archive all row button shows just the archive icon, labelled for screen readers and on hover; the confirm dialog keeps its text.
A chevron glyph sits inset in its icon box, so with 12px sides a dropdown button read as tight on the label side. Buttons ending in an icon (and the Library New menus) now use the select trigger's 15px from edge to content: label 15px from the left edge, chevron about 19px from the right, matching the Appearance selects.
The chevron had an extra 4px margin on top of the button's 6px gap.
7f64a61 to
86f096a
Compare
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ 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". |
|
@codex review |
…lish (#15232) ## Studio: control heights, composer fades, API page layout, settings polish A round of UI fixes on top of #15122 (one padding for every main button). ### Fields and pickers line up with buttons - In Settings, every option dropdown (selects and picker-style menus, 55 across the tabs) has one height, a filled Button's, with 14px sides, a pill shape and regular text-sm; they were 32, 34.75 or 36px with some at 11.25px, 12px sides or 16px corners. Scoped to `[data-settings-dialog]`, so other pages keep their pickers; action menus (Export, Delete all) keep the button look. - New `h-control` / `size-control` utilities give a field or picker the filled Button's height (label line + 7px padding + 1px border) at every UI font size. - Applied only where a field or picker shares a row with a filled button: Settings rows (HF token and endpoint, upload cap, idle seconds, sandbox memory, llama.cpp path and backend, LAN port and addresses, first-token timeout, dictation search and sort, embedding model picker), the accounts search, the API key form, Projects and Tasks search, and the Hub folders dialog. Shared `Input`, `SelectTrigger` and icon `Button` defaults are unchanged, so Images, Video and other pages look as before. - Dropdown rows round up to a whole pixel (`min-h-menu-row`), so the last hover pill and the menu's bottom edge no longer sit between pixels. A label pads itself the same way. ### Composer - The circular Stop buttons (Stop generating, research, queued message, dictation) draw their square at about 31% of the circle, up from 26%, and the queue Resume button's play glyph is 1.125x the icon size (18px at the default scale, from 16px), about a third of the circle's height. The send arrow keeps its size. - Stop, Send and Resume glyphs round up to an even pixel size, so their offset in the circle is a whole pixel. At UI scales where the glyph came out fractional (13.125px Stop, 19.5px Send) the browser snapped it up and left; measured at 2x, Stop sat 1px left and 0.5px up, Send 0.5px both ways, and both are now centred. Browsers without CSS `round()` keep the unrounded size. - Text cut off at the bottom fades; the last line of any draft gets a faint fade on its descenders, and lines scrolled past the top fade once you scroll. - The scrollbar sits 8px from the composer edge instead of 14px; text does not move. - On the welcome screen, expanding the composer keeps its bottom edge fixed and grows upward. Before, the whole composer jumped up and grew only to a viewport clamp that, on a short window, barely exceeded a long draft's compact height (#10863). - Attachment tiles are 14px round instead of 16px. The remove X is white in light mode and black in dark mode with a 1px outline. - The scroll-to-bottom button has a 0.5px ring. Its edge came from the outline Button border that #14919 replaced with a fill. ### Chat messages - The context usage popup (Chat header and API page) uses the dropdown surface instead of the black tooltip: popover background and text, the menu radius, the body font, the menus' soft shadow in light mode and page-coloured glow in dark mode. - The Response stopped bar's Resume icon sits on its label's centre line instead of 3.4px above it. As the button's last element (the label was bare text), the icon lost its bottom margin to the message's trailing-margin reset, so its box centred off-axis, and the button took the trailing-icon padding. The label is a span now. - The composer's solid play (Resume queue) is optically centred in its circle: its box was exactly centred, which left the triangle's weight 1.7px left of the middle; it moves right by 1/12 of its width. - Numbered list markers stay inside the message column. A fixed 1.25rem gutter let "10." (and "1." at a larger chat font) hang past the composer's edge; the gutter is now in em and widens at 10 and 100 items. ### API page - The model picker sits in the top-left bar like Chat, Images and Video, with Chat's label size and font. With nothing loaded it reads Load models, since the page can serve several. - The Base URL card lists every served model the same way, one or many ("1 model answering requests", "No models loaded"). Each row has the code example beside its name and Run settings, Reload and Eject at its end. - Card buttons read Reload / Eject for one model and Reload all / Eject all for several. Reload all reloads every served model, kept ones first so the primary stays primary; with nothing served it reloads the last local load as before. The reload logic moves to `use-api-model-reload.ts`. A row reloads by its checkpoint (not a kept slot's public alias), an MLX precision folder reloads as a model rather than a GGUF quant, and an AMD NPU model goes through the NPU loader, as the picker does. - Each row shows Context with Chat's context chip, its ring in front of the count and sized like the row's other icons: the latest request's prompt plus reply against that request's window. Hover shows the usage, prompt and completion split; a click pins it until a click elsewhere or Escape (`pinOnClick`, opt-in, so Chat's chip is unchanged). Only requests since the model's latest load count, and requests logged as `<id>:<quant>` match their model. - The row icons and the Context chip share one hover: the icons take the chip's colour in dark mode, the chip takes the icons' colour in light mode, and on this page the chip hovers as a full pill (`hoverClassName`, opt-in, so Chat's chip is unchanged). - A row's code example icon shows only while that row is hovered or the icon has keyboard focus (always on touch). Rows are subgrids rather than `display: contents`, so the whole row, gaps included, is the hover target. - After Context each row shows Speed (generation tok/s), Total time (average per request: queue wait, prompt processing and generation) and Requests (with errors in red), over requests since the model's latest load. Icons stand in for the labels (the lightning and timer from the request log, arrows for requests); the label stays in the hover title and for screen readers. - The page works at every width down to phones. Under a narrow card a model row stacks: the name on its own line (wrapping, never cut), then the facts and its buttons. The summary tiles go 2, 3 or 6 across by the page's own width rather than the window's, so the sidebar no longer squeezes six tiles into cut-off labels, and the settings button stays beside the title. - The rows drop the Slots fact. It only existed for the primary model, read "0/4 busy" nearly always, and opened the same Run settings as the gear; queued requests still show under In flight. - Fixed: after the code example dialog closed, the Context popup never opened again. The shared Tooltip latched every controlled tooltip shut when a modal opened, until its owner next said false; one that was already shut never says it again. The latch now applies only to a controlled tooltip that was open. - Empty-state icons are borderless circles; the saved load settings forget button is red. - The page fades into the sticky picker bar with Chat's 24px header fade instead of cutting off under it. ### Hub - The Run button's label and play icon are white in both themes (they used the success foreground, which is dark), and it has 15px of right padding against 12px on the left, since the play glyph's empty side already reads as left padding. ### Audio - The Record button (Clone, Edit and the other pages with an Upload / Record / From history source) uses the composer's microphone instead of Hugeicons `Mic01Icon`. ### Settings and sidebar - Settings > API: Create token uses the dark action button and is never disabled for an empty name. An unnamed token is called New Token N, one past the highest N in use (translated in every locale); the name field reads Token name. The expiry presets and Create token have tooltips (Create token names the token it will make). - Settings > API: access tokens are a table with Name, Token, Created, Last used and Expires columns. The token created panel, its field and the rows use the standard settings card, input and hover styles instead of the green panel, and the field no longer draws a focus ring around the preselected token. - Settings > API: the row menu adds Regenerate token, which makes a token with the same name and expiry period and then revokes the old one, after a confirmation. The new token is created first, so a failed create leaves the old one working. - Settings > API is regrouped: access first (tokens, usage examples, keyless access, MCP access), then the monitor link and model controls (memory, auto-switch, aliases), then the audio, image and video, and decision APIs. - Danger zone draws its divider above the heading, not under it. - Card icons (Remote access, LAN, Keyless API, MCP, Decision API, monitor) are borderless filled circles in both themes. - Sidebar New pills use the API page's green chip (`Badge` variant `accent`); #14938 had turned them grey through the shared secondary fill. - The sidebar More menu has pill hover rows in a matching corner radius. - The remaining lucide trash icons (API saved settings, prompt storage, OpenAI code exec, research panel, generation presets) use the Hugeicons `Delete02Icon` used everywhere else. - Controls that reload something draw Hugeicons' two-arc reload glyph (`Refresh04Icon`, re-exported as `ReloadIcon` from `lib/reload-icon.ts`; the package's own `ReloadIcon` is an older shape with bent arc ends): Images and Video Reapply (reloads the model), the in-app browser's Reload and Run again, and the browser tab menu's Reload (was lucide `RotateCw` / `Refresh01Icon`). Refresh, retry, regenerate and update keep `Refresh01Icon`. - Settings > Resources lists Model memory right after GPU devices, above the inference engine sections. - Settings > API gets a Model memory section with the two rows that decide what the server can answer: Keep model in GPU memory and Keep multiple models loaded. Same controls and saved values as Resources (`ModelMemorySection variant="api"`). A System settings link beside the heading opens System settings scrolled to Model memory for the rest (label in every locale). ### UI parity - The studiobench thread-structure check reports every action's thread scaffolding 84 or 172 characters longer. That is intended: it is the composer's new fade wrappers and control-height classes around the thread, not message content. The PR carries the `affects UI#` label for it. - The startup bundle budget is raised by this PR's measured growth (2,639 B raw / 717 B transfer, mostly the new strings in the eager locales), with the numbers in the comment above `BUDGET`. - The queue Resume glyph is deliberately right of geometric centre (optically centred), so `playwright_queue_localization.py` now asserts that offset instead of exact centring. ## Verification - `npm run typecheck`, `npm test` (13,947 pass, 0 fail), `npm run i18n:check:strict`, `npm run build`. - An isolated Studio from this branch, driven with Playwright: - A scan of every page and Settings tab for a filled button beside a control of a different height found 13 mismatches before and none after, at UI font scales 0.8, 1 and 1.25. - Menus measured at whole-pixel row heights with equal top and bottom gaps (8px / 8px, 6px / 6px). - Welcome composer expansion keeps the bottom edge fixed (650px window: 296-650 to 133-650; 900px window: 376-522 to 144-522). - The API card was checked with one real GGUF model and with three models (two faked in the browser by rewriting the status responses). - The API page at 375, 768, 1024 and 1440px wide: no horizontal overflow, and the row's ring and icons measure 14px on one centre line. - Token regenerate run against a token the script created with a 30 day expiry: the new token kept 30 days, the old one was revoked. ## Not covered here - Reloading several real models at once (keep-models-loaded mode) was not exercised; it was checked with one model and by reading the runtime code. - Desktop (Tauri) builds were not run from this host; the list marker fix was checked in Chromium with overlay scrollbars.
Studio: one padding for every main button
Filled action buttons came in five shapes: 32px and 36px tall, 40px tall with 28px sides, 20px or 14px sides. They now all have 12px from the edge to the label (or its icon) at the sides and 8px above and below the label's line, so "New chat", "Generate", "Export", "Eject" and every Settings action read as the same control.
What changed
Button: the filled variants (default, dark, primary, outline, secondary, muted, destructive) share one shape at every text size (default, sm, lg, hero). The height comes from the label's line plus 8px above and below, with the 1px border counted, instead of a fixed height.Dropdown buttons (a trailing chevron or other icon) get 15px on the label side and 14px on the chevron side, because the chevron glyph sits inset in its box; the label sits 15px from the left edge and the chevron about 18px from the right.
Icons never set the padding. A leading or trailing icon gets the same 12px side as a plain label, and icons take no block space, so a larger glyph cannot make a button taller.
Per-call height and padding overrides on filled buttons are removed (Images, Video and Audio Generate/Stop, Library New chat, Run settings Load model/Reset/Share, update banners, Settings actions, and others), and the hand-built main buttons follow the same rule (Library and Chats New menus, Hub Run, Load more and Clear filters, the Data tab's archive buttons, browser downloads and annotate, the reload prompt).
The API page's model trigger label had
leading-noneinside a truncating span, which cropped the tails of g, p, q and y. It now has a full line.Settings > Data: the Archive all chats row button is now just the archive icon (labelled for screen readers and on hover); the confirm dialog keeps its text.
Left alone on purpose: ghost and link buttons, icon-only buttons,
xschips, toggles and segmented controls, value pickers, and option cards.Verification
npm run typecheck,npm test(13,859 pass) andnpm run build.Screenshots
Same buttons on main (left) and this branch (right). Library New chat had 20px sides, Images Generate was 40px tall with 28px sides, API Eject had 14px sides:
Icon buttons: + Add and Archive all keep 12px sides next to the icon, Hub Run loses its fixed 112px width, and Library New drops its 16px left side:
Not covered here
herosize; Desktop builds are not run from this host.