Skip to content

Studio: Decision tab loads at once, System and settings polish, main-theme borders restored - #15919

Merged
shimmyshimmer merged 11 commits into
mainfrom
studio-decision-connections-link
Oct 29, 2026
Merged

shimmyshimmer merged 11 commits into
mainfrom
studio-decision-connections-link

Conversation

@shimmyshimmer

@shimmyshimmer shimmyshimmer commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

What changed

Decision tab (Settings > API)

  • The section renders its header and a "Loading..." line straight away instead of nothing until GET /api/settings/systemone answers. On a cold server that request took 4 to 5 s, so the tab sat blank.
  • On installs without a torch GPU, gpu_available() asks llama-server --list-devices for its GPUs, cached for 60 s. Once the cached answer is older than 60 s, it is now returned at once and re-probed in a background thread (one at a time), so the settings request no longer waits on a cold llama-server. A new or reinstalled binary (new path or mtime) still probes synchronously.
  • The hosted-model hint reads "To use a cloud hosted decision model, add one in Connections.", with Connections as the inline link. Updated in all 14 locales.

System page

  • Floating window moves from a header button into its own section below GPU devices, with a "Show floating window" switch; "Detailed view" moves with it. Live updates keeps its pill in the header, now 36px tall with 14px side padding and the toggle at 88%.
  • Live monitor tiles: readings in the normal text colour (only the % pill and bar carry usage colour), a regular-weight % pill that no longer adds height to the label row, 4px more bottom padding to balance the pill above the label, and no pill on a tile with no reading (VRAM without a GPU).

Media headers (Images, Video, Audio)

  • Create / Train sits centred over the preview, and the API, Library and sibling links (new MediaHeaderActions) keep their place at every window size and zoom. As space runs short the header steps down: the pill moves left of centre (the links' column keeps at least its own width), then the pill padding and the link labels go compact, and only if even that cannot fit do the links hide as a group. Below a 40rem page (phone, small tablet) only the pill shows.

Settings

  • Logs gets a page title and intro like the other pages ("Logs", "Read the Unsloth logs without leaving the app.").
  • Sandbox is renamed Security (tab and page title, 14 locales).
  • The Scroll to bottom button setting is removed; the button always shows once you scroll up.
  • Add connection is the standard dark button, on the right of the connections header.
  • The settings rail's scrollbar sits at the sidebar's edge, so labels keep the width.
  • Appearance: Pin sidebar by default moves into the Sidebar navigation section, above the tab list.
  • Full access uses the same Lucide shield as Approve for me; the Hugeicons one drew 2px wider.

Icons

  • Chat with files uses a FileSearch glyph drawn 10% larger about the centre, matching the square glyphs beside it in the + menu.
  • Training Configuration uses PencilEdit01Icon instead of the New chat icon.

Light-mode lines in the main themes

Verification

  • Frontend: npm run typecheck, npm test (14378 pass), npm run build.
  • Backend: new test_an_expired_llama_cpp_gpu_answer_is_served_while_it_refreshes (fails on main, passes here). The rest of test_decision_native.py has the same 16 failures on main on this host, all from torch not being installed.
  • Local Studio, Playwright:
    • Decision loading line shows after 0.05 s with the response held 4 s; a stale-cache settings request took 27 ms.
    • Media headers measured at 1440 to 420 px (100% to about 200% zoom on a 1440 px screen): links stay shown through 823 px, the pill shifts or goes compact before they hide, and they never overlap the pill or clip.
    • Computed light-mode --border, --sidebar-border and the Images border for Standard, Classic, Minimal match the pre-Studio: visible light-mode borders, aligned media pickers, new image icons, modern login #15726 stylesheet; Cherry and Matcha are unchanged.
    • Permission icons measure 13.3 x 16.7 px for both Approve for me and Full access.
  • Staging (macOS, Windows, Linux with Playwright) was green on the previous head.

Not testable here

The original 4 to 5 s cold request was not reproduced on this host. The Video page and the Train page need PyTorch / a GPU, so they were checked through code, not on screen. No Desktop build was run.

@shimmyshimmer shimmyshimmer changed the title Studio: Decision tab loads at once, Floating window section in System Studio: Decision tab loads at once, System and settings polish, main-theme borders restored Oct 29, 2026
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 29, 2026
shimmyshimmer pushed a commit to shimmyshimmer/unsloth-staging-4 that referenced this pull request Oct 29, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@shimmyshimmer

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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-10-29T08:19:51.847250Z 1b1413b 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. 👍

Reviewed commit: 1b1413ba32

ℹ️ 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 4d345ab into main Oct 29, 2026
1 of 55 checks passed
@shimmyshimmer
shimmyshimmer deleted the studio-decision-connections-link branch October 29, 2026 08:54
shimmyshimmer added a commit that referenced this pull request Oct 29, 2026
…15944)

## What changed

The four permission icons (chat permission menu and Settings > Security)
are drawn from one set and sized together.

- **Shields:** Approve for me, Run automatically and Full access share
Hugeicons' shield outline. Full access is back to Hugeicons
`shield-alert` (#15919 had swapped it for Lucide's). Approve for me is
Hugeicons `shield-check` with `tick-02` (stroke-rounded) at 55% inside,
a touch larger than the stock check. Run automatically is the same
shield with Hugeicons `sparkle` (stroke-rounded) at 55% inside, raised
2% to the shield's visual middle.
- **Ask for approval:** Hugeicons `hand`, shrunk to 94% only in the menu
list and Security rows where it sits beside the shields; the composer's
permission chip shows it at full size.
- **Size:** the icons are about 15% larger: 17px in the chat permission
menu (exempted from the menu-wide `--ui-icon-size` rule by a
`permission-mode-icon` class) and 22px in the Security rows.
- **Alignment:** each icon's top now sits on its title's cap line,
within a third of a pixel in both places.

`shield-check`, `shield-alert`, `tick-02`, `sparkle` and `hand` come
from `@hugeicons/core-free-icons` 4.3.5 (MIT), newer than the 4.1 Studio
pins, so they are vendored as path data like the other newer Hugeicons
in `lib/hugeicons-derived.ts`.

## Verification
- `npm run typecheck`, `npm test` (14379 pass), `npm run build`.
- Local Studio, Playwright: the three shields measure the same (12.9 x
14.4 px in the menu, 16.5 x 18.3 px in Settings); icon tops sit within
0.67 px of the title's ink top in the menu and 0.33 px in Settings.

## Not testable here
No Desktop build was run.
danielhanchen added a commit that referenced this pull request Oct 29, 2026
…15946)

## Summary

`Repo tests (CPU, studio)` is red on main since #15919, and on every PR
based after it (seen on staging for #15928, #15931 and #15934). Three
tests in `tests/studio/test_desktop_reliability_frontend_contract.py`
fail:

- `test_audio_page_matches_the_image_rail_header_and_action_footer`
- `test_images_header_tracks_preview_and_preserves_titlebar_controls`
- `test_media_page_headers_out_stack_the_mac_drag_region`

#15919 rebuilt the Images, Video and Audio headers on purpose: Create /
Train is centred in a `minmax(0,1fr)_auto_minmax(max-content,1fr)` row,
and the API / Library / sibling links moved into the new
`MediaHeaderActions` component, which steps down (pill off centre,
compact, then hidden) as space runs short. The product is right and the
tests pinned the old class strings, so the tests are what changes here.

## What changed

- A shared `_assert_media_header_row` check for the Images and Audio
headers: the new row columns, the pill centred in column 2
(`data-media-header-centre ... col-start-2 justify-self-center`), and
the links rendered inside `<MediaHeaderActions>` (the Library and
sibling links are now asserted to sit inside it, not just somewhere in
the header).
- `MediaHeaderActions` itself is pinned to what the old inline markup
guaranteed: its slot stays `pointer-events-none col-start-3 row-start-1`
(so gaps in the band still drag the macOS window) and only the links'
group is `pointer-events-auto`.
- The macOS drag-region test counts the clickable group drawn by
`MediaHeaderActions` when a page renders it, since that group no longer
appears in the page source.

## Verification

- Base (main at `862098ed4a`): 3 failed, 41 passed. Bisected to #15919:
its parent passes all 44.
- Head: 44 passed.
- Each guard still fails when the property it protects breaks (source
edited, test run, reverted):
  - slot made `pointer-events-auto`: Images and Audio header tests fail
  - links group no longer `pointer-events-auto`: all three fail
- Images sibling link moved out of `MediaHeaderActions`: Images header
test fails
  - Audio pill set to `justify-self-end`: Audio header test fails

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 30, 2026
…othai#15798)

The sibling Video/Images shortcuts added in unslothai#15520 could be cut off when
the window narrowed. Since then, unslothai#15919 added `MediaHeaderActions`,
which hides the API, Library and sibling links when they cannot fit
beside Create / Train. One defect remained on main: the header column's
minimum is a fixed `13rem`, which ignores the UI scale and the native
window-control inset, so at a raised UI scale the Create / Train pill
itself is clipped at the window edge (Train cut off at 1100px / 140%,
1280px / 160% and 1600px / 200%, on both Images and Video).

This PR keeps main's link step-down and fixes the boundary it sits on:

- `--media-header-min-width` (`14rem * --ui-space-scale` plus the header
right inset, falling back to the window-control inset) replaces the
fixed `13rem` minimum for the Images and Video header column and the
settings rail cap, so the pill always has room for its scaled size.
- Below the 50rem split (rail stacked over the preview) that minimum is
capped at half the header row, so the model selector keeps its room at
high UI scale on a narrow page.
- The rail resize handle computes the same cap in px, so drags and arrow
keys start from the width that is actually shown. A present `0px` header
inset wins over the window-control fallback, matching the CSS `var()`.
- The Images / Video Train rail follows the same boundary, so it stays
under the header divider in Train mode.
- The Video rail fallback width is 408px, matching `useMediaRailWidth`.

Audio keeps its existing `13rem` minimum.

Validation:
- A Studio built from main and one built from this branch, measured over
Images and Video, Create and Train, at 16 width / UI-scale combinations
(480px to 1600px, 100% to 200%), in Chromium, WebKit and Firefox
(identical counts in all three): header controls clipped by an overflow
ancestor or the viewport went from 42 of 64 cells to 12, and every
remaining cell shows at least as much of the control as main (all are
stacked layouts at or below 640px with 150% to 200% scale); no
overlapping controls on either side, including the model selector at
500px / 200%; links hidden by `MediaHeaderActions` unchanged (same cells
as main).
- Without the Train rail change, Train mode left the rail up to 224px
off the header divider at high UI scale; with it, 0px in all 16 Train
cells.
- `npm run typecheck` passes; targeted header, rail-cap and UI-spacing
tests pass (38/38); the frontend contract tests in
`tests/studio/test_desktop_reliability_frontend_contract.py` now pin the
scaled minimum for Images and Video (45/45).

Before (main) and after, 1280px wide at 160% UI scale:

![Images header at 1280px and 160% UI scale: Train tab clipped on main,
fully visible
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/15798/pr15798_pair_00_q-ec2ff6064508.png)

![Video header at 1280px and 160% UI scale: Train tab clipped on main,
fully visible
after](https://raw.githubusercontent.com/danielhanchen/unsloth-staging-2/pr-media/pr/15798/pr15798_pair_01_q-124239603b05.png)

---------

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