Repository navigation
Studio: API examples behind one tab row, an access group, API page fixes - #15467
Merged
Merged
Conversation
- Settings > API: one untitled Library-style tab row (Chat, Images / Video, Audio, Decision, Agents) replaces a section per API and the jump links above the token form. Agents opens the Agents settings tab. "Open in API" requests pick their tab; settings search lands on the tab button. - MCP, keyless API access and the API monitor sit under one heading. - The no-model note sits above the Basic / With tools toggle. - Decision API: Docs centred beside the title (beside the description when the title is hidden), rows unboxed, Open Connections works from the API page, and the hosted-model note reads "To use a cloud hosted decision model...". - API page: the model picker sits in the native macOS titlebar row, as Chat's. - Model hub Run: the triangle recentred and the label nudged half a pixel up, measured from the rendered ink.
- Appearance uses Hugeicons BrushCleaningIcon (MIT; in core-free-icons from 4.3.5, vendored as lib/brush-cleaning-icon.ts since this pins 4.1) in the settings nav, the sidebar menu and its customizer. - API page served-model rows: the context, speed, time and request facts hug their content with one 32px gap, their icons are 1em of the value beside them, and total time uses the scheduled-tasks clock (also in the log).
shimmyshimmer
pushed a commit
to shimmyshimmer/unsloth-staging-4
that referenced
this pull request
Oct 27, 2026
Member
Author
|
@codex 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. Hooray! 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". |
…e-model users to multi-model loading Context on the API page's model rows now uses the same sans text-ui-12 as speed, time and requests, sized to its text; the facts sit 40px apart. While Keep multiple models loaded is off and at most one model is loaded, the served-models line links to Settings > Resources > Model memory. The Saved load settings description is shorter.
shimmyshimmer
pushed a commit
to shimmyshimmer/unsloth-staging-4
that referenced
this pull request
Oct 27, 2026
shimmyshimmer
pushed a commit
to shimmyshimmer/unsloth-staging-4
that referenced
this pull request
Oct 27, 2026
shimmyshimmer
pushed a commit
to shimmyshimmer/unsloth-staging-4
that referenced
this pull request
Oct 27, 2026
danielhanchen
added a commit
that referenced
this pull request
Oct 27, 2026
…s group (#15500) ## Problem `Repo tests (CPU, studio)` fails on main since #15467, so every PR based on it inherits two failures (#15482 today): ``` tests/studio/test_settings_compact_overflow_contract.py::test_settings_monitor_link_can_shrink E assert '<SettingsSection title={t("settings.resources.liveMonitor.apiTitle")}>' in '...' tests/studio/test_usage_examples_model_source_contract.py::test_auto_switch_section_sits_below_the_monitor_link E ValueError: substring not found ``` Bisected locally: both pass at 9fb0221~1 and fail from 9fb0221 (#15467) onwards. ## Product or test The tests. #15467 reorganised the API page on purpose: - `MonitorLink` takes `hideHeading`. Its `SettingsSection` keeps the same title, now with a second prop on its own line. - The API tab renders `<MonitorLink hideHeading={true} />` inside a new titled `<SettingsSection title="Access & monitoring">`. - The usage examples now render inside `ApiExamplesPanel`. Both tests matched the old spellings: the one-line `<SettingsSection title={...}>`, the bare `<MonitorLink />` and `<UsageExamples`. The invariants they guard still hold on main: - the monitor never lands as a bare card among other sections - the examples come before the monitor link, which comes before auto-switch ## Fix - `test_settings_monitor_link_can_shrink`: - checks that `MonitorLink` renders its own `SettingsSection` titled `settings.resources.liveMonitor.apiTitle`, whatever other props it takes - new: wherever a settings page renders `<MonitorLink hideHeading ...>`, it must sit inside an open, titled `SettingsSection` - `test_auto_switch_section_sits_below_the_monitor_link`: same order (`UsageExamples` or `ApiExamplesPanel`, then `MonitorLink`, then `ModelAutoSwitchSection`), matched by tag name instead of exact spelling. ## Verification - Both files: 22 passed (2 failed on main). - Sabotage on main's sources, one at a time, each fails: - `<MonitorLink hideHeading={true} />` moved out of its `SettingsSection` - `<ModelAutoSwitchSection />` removed - the monitor section title changed - ruff format and check are clean.
This was referenced Oct 29, 2026
shimmyshimmer
added a commit
that referenced
this pull request
Oct 29, 2026
…amples (#15890) ## What changed After you create an API token on Settings > API, the commands and examples that need it now include it again, so you can copy them straight into a terminal. Reported on r/unsloth: creating a token used to fill it into the commands for connecting clients, but after #15467 the API page's Agents tab only links to Settings > Agents, whose command never carried a token. The Settings > API examples also lost the token as soon as you left that tab. - **Settings > Agents:** the generated command and the subagent setup command get `--api-key <new token>` when Studio is reached on a non-loopback address (LAN, tunnel). Loopback stays keyless, since the CLI mints its own key there. Only a token created in this page session is used: an explicit key is cached by the CLI per server, so a stale one would replace a working saved key. - **Settings > API:** the Chat, Images / Video and Audio examples and the Agent access (MCP) section keep the new token after you switch tabs, close Settings, or press Done on the token card. They used to read it from the API tab's own state, which only one tab at a time keeps mounted. - **API page (monitor):** the "No API traffic yet" examples and the per-model example request dialog use the new token instead of `sk-unsloth-YOUR_KEY`, and the example box is redacted from reload snapshots when it holds a real token. The token lives in a small in-memory store (`fresh-api-key-store.ts`): never persisted, gone on reload, and dropped when that token is revoked (matched on its `key_prefix`). The one-time "Your token" card is unchanged. Settings > Agents right after creating a token, opened on a non-loopback address. The token is masked in the screenshot.  Settings > API after switching to Remote & LAN and back, and the API page's examples.  ## How it was verified - `npm run typecheck`, `npm run build`, `npm test` (14377 pass, 0 fail). New `tests/agents-fresh-api-key.test.ts` covers the command with and without a fresh key, loopback staying keyless, revoke only dropping the matching token, and the Settings > API and API page wiring. Two layout tests that named the old `revealed` variable now name `freshKey`. - Local Studio from this branch, opened through a non-loopback hostname mapped to 127.0.0.1 so the commands take their LAN form: create a token, then Settings > Agents, Settings > API after switching tabs, and the API page. Same steps on the base bundle show no token / the placeholder. ## Not tested here Windows PowerShell commands were not run (same builder path, covered by the existing shell tests). A real LAN or tunnel client was not connected.
shimmyshimmer
added a commit
that referenced
this pull request
Oct 29, 2026
## What changed Settings > API gets a "Quickstart" heading over the Chat / Images / Video / Audio / Decision / Agents tab row, styled like "Access tokens" above it, so the ready-to-run examples read as their own section instead of trailing off the token list. The heading is translated in every locale (`settings.apiKeys.quickstartTitle`). The cards under the tabs stay untitled, as #15467 set up; the test that pinned an untitled block now expects exactly this one heading and still no per-card titles. Settings > API, left is main, right is this branch.  ## How it was verified - `npm run typecheck`, `npm run build`, `npm test` (14371 pass, 0 fail). - Local Studio: Settings > API, compared against the `main` bundle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Studio: API examples behind one tab row, an access group, API page fixes
Settings > API
ApiExampleTabNav).openMediaApi,openAudioApi,openDecisionTry) still select their tab, which mounts the card that takes the request, then scroll it into view. Settings search for the Images / Video, Audio or Decision API lands on the tab button, since each card renders only on its tab.Decision API
setActiveTab, which does nothing with no settings dialog open; it now usesopenDialog("connections").API page
z-40and click-through except the picker, so the empty row still drags the window.Model hub Run
API page model rows
text-ui-12as the other facts (it was mono) and is as wide as its text: a newfitContentprop onContextUsageChipdrops thechwidths, which assume the mono face and left about 22px of slack.Appearance icon
BrushCleaningIconin the settings nav, the sidebar menu and its customizer. It is in@hugeicons/core-free-iconsfrom 4.3.5; this pins 4.1, so the MIT icon is vendored aslib/brush-cleaning-icon.tsrather than bumping the whole icon set.Verification
npm run typecheck,npm test(14086 pass),npm run build.api-settings-tab,decision-api-section,mcp-access-sectionupdated;api-page-titlebar-row.test.tsandapi-rows-and-appearance-icon.test.tsadded.