Skip to content

Studio: put the Context slider on its own row in the Run settings sidebar - #18235

Merged
danielhanchen merged 2 commits into
unslothai:mainfrom
oobabooga:studio-sidebar-context-two-rows
Nov 18, 2026
Merged

danielhanchen merged 2 commits into
unslothai:mainfrom
oobabooga:studio-sidebar-context-two-rows

Conversation

@oobabooga

@oobabooga oobabooga commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Problem

Since #17840, the Context control in the Run settings sidebar is squeezed into one row with its label and value. The sidebar is too narrow for that, so the slider shrinks to its thumb (16 px wide at a 1440 px window). When a number is set, the reset icon and the thumb share the same small gap.

Cause

The model picker's Run settings and the chat sidebar both render GgufContextLengthSetting in model-config-page.tsx. #17840 changed that component to one row: label, slider with fixed ml-12 mr-7 margins, then the value field. The layout was made for the wider model picker, and the component did not know which surface it was in.

Fix

  • GgufContextLengthSetting takes a stacked prop. ModelConfigPage passes stacked={variant === "sidebar"}.
  • When stacked, the label, info icon, reset icon and value stay on one row, and the slider gets its own full-width row below, like Max Seq Length.
  • The model picker keeps the one-row layout from Context control in one row with a reset to Auto, context window wording #17840.
  • The slider's behavior is unchanged: Auto as a full bar, the far right as the real maximum once a number is set, and reset to Auto.
  • context-mode-ux.test.ts is updated for the new structure, with a test that the sidebar uses the stacked layout.

Before and after

At Auto, the sidebar slider goes from 16 px to the full panel width (225 px):

Run settings sidebar at Auto, before and after

With a number set (16,384), the reset icon stays next to the label and the thumb shows where the value sits:

Run settings sidebar with a custom context, before and after

The model picker's Run settings are unchanged (same row and slider position on both sides):

Model picker Run settings, before and after

Verification

  • npm run typecheck and npm run build pass.
  • tests/context-mode-ux.test.ts passes (8/8). The new sidebar test fails against main's source.
  • Live check in a local build with Qwen3-0.6B GGUF loaded, main's frontend against this branch's frontend on the same backend:
    • sidebar slider width 16 px on main, 225 px on this branch, at Auto and at 16,384;
    • model picker Context row and slider boxes identical on both sides (slider 175 px).

Independent before/after check

Two isolated Studio installs (merge base 7c40c0a vs head 4d0a994), Qwen3-0.6B Q4_K_M GGUF loaded on CPU, 1440x900 window. The Context slider measures 16 px wide on the merge base and 225 px on this branch, both at Auto and at a custom value (40,576 tokens).

At Auto:

Run settings sidebar at Auto, before and after

With a custom context set, reset icon beside the label:

Run settings sidebar with a custom context, before and after

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T02:12:48.104886Z 4d0a994 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.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 4d0a994256

ℹ️ 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".

@Lyxot Lyxot self-assigned this Nov 18, 2026
@danielhanchen danielhanchen self-assigned this Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 18, 2026
@danielhanchen
danielhanchen merged commit 8cdf011 into unslothai:main Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants