Skip to content

fix(desktop): match Studio's example to the served model and hide stale keys - #1463

Merged
jonathan308 merged 3 commits into
codex/desktop-mac-preview-20261012from
fix/desktop-studio-endpoint-model
Oct 15, 2026
Merged

jonathan308 merged 3 commits into
codex/desktop-mac-preview-20261012from
fix/desktop-studio-endpoint-model

Conversation

@jonathan308

@jonathan308 jonathan308 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Three Studio (local API) defects in features/Studio.tsx:

  1. The example request named an unserved model. The model select defaulted to the first downloaded, eligible model and ignored endpoint.models. If the endpoint served gemma-4-26b while gpt-oss-20b was listed first, Copy example produced "model":"gpt-oss-20b", a request the running endpoint can't serve. Apply serving mode would also restart onto GPT-OSS unless the user noticed and changed the select.

  2. The revealed key outlived the endpoint. After Reveal, if the endpoint stopped, the key stayed on screen and Hide was disabled (disabled={!endpoint}).

  3. Unhandled failures. api.copy and the endpoint-key read weren't caught. A failure became an unhandled promise rejection, and Copied could show although nothing was copied.

  4. Copy feedback on the wrong button (follow-up commit, found in the second audit pass). The base-URL and example copy buttons shared one copied flag. Copying the base URL gave no feedback on its own button and turned Copy example into Copied.

Reproductions (jsdom, mocked native API):

  • Endpoint serves Gemma. Before: select = GPT-OSS, example uses gpt-oss-20b. After: select and example are gemma-4-26b.
  • Reveal, then the endpoint stops. Before: sk-local-test stays visible. After: removed.
  • Clipboard rejects. Before: unhandled rejection. After: Couldn't copy to the clipboard. and no Copied.
  • Copy the base URL. Before: Copy example shows Copied. After: the base-URL button shows a check, labeled Base URL copied, and Copy example is unchanged.

Found during a desktop UI audit. Base: codex/desktop-mac-preview-20261012 (unmerged desktop stack: #1354 plus the signed preview packaging commits). The diff contains only this fix. The Desktop / frontend check on this base also needs #1455.

Before / After

flowchart LR
  subgraph Before["Before"]
    direction TB
    B1(["Endpoint serves Gemma"]):::user --> B2["model = models[0] (GPT-OSS)"]:::bad
    B2 --> B3(["Example: model gpt-oss-20b ✗<br/>Apply switches to GPT-OSS"]):::bad
    B4(["Reveal key, endpoint stops"]):::user --> B5(["Key still shown · Hide disabled"]):::bad
  end
  subgraph After["After"]
    direction TB
    A1(["Endpoint serves Gemma"]):::user --> A2["model = served[0] · example ∈ served"]:::fix
    A2 --> A3(["Example: model gemma-4-26b ✓<br/>Apply keeps Gemma"]):::good
    A4(["Reveal key, endpoint stops"]):::user --> A5["key shown only while endpoint runs"]:::fix
    A5 --> A6(["Key removed"]):::good
  end
  classDef user fill:#1f2937,stroke:#93c5fd,color:#f9fafb
  classDef bad fill:#7f1d1d,stroke:#fca5a5,color:#fef2f2
  classDef fix fill:#065f46,stroke:#6ee7b7,color:#ecfdf5
  classDef good fill:#14532d,stroke:#86efac,color:#f0fdf4
Loading

Legend: blue = state/user action, red = defect, green = changed code / fixed outcome. Copy and key-read failures now show a notice.

Changes

  • features/Studio.tsx: the default model prefers endpoint.models (limited to downloaded, eligible models), and the example falls back to a served model. The key is derived from the endpoint being present. Copy and key reads are caught and show a Notice.
  • tests/studio.test.tsx (new): the four reproductions above, each failing without its fix.
  • CHANGELOG.md: Unreleased entry.

Validation

cd desktop-app
npx vitest run tests/studio.test.tsx   # fail on base (with an unhandled rejection); 4 pass here
npx vitest run tests/studio.test.tsx tests/app.test.tsx tests/machines.test.tsx
npx tsc --noEmit
npx prettier --check src tests
make docs-impact-check BASE=origin/codex/desktop-mac-preview-20261012

Limitations

  • The serving mode still defaults to Alongside the network, because the snapshot doesn't report whether the endpoint is local-only. Not changed here.
  • Fixture-only: no local endpoint was started and no inference was run.

🤖 Generated with Claude Code

…le keys

Studio defaulted its model to the first downloaded eligible model and
ignored endpoint.models. When the endpoint served another model, the
copied curl example named a model the endpoint does not serve, and
Apply serving mode would restart onto that model. Default to the served
model and keep the example on a served model.

A revealed key stayed on screen after the endpoint stopped, with Hide
disabled. Treat the key as part of the running endpoint and keep Hide
available. Copy and key reads had no error handling, so a failure was
an unhandled rejection and "Copied" could appear; report them instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Oct 14, 2026 8:00pm UTC
d-inference-console-ui-dev Ready Ready Preview Oct 14, 2026 8:00pm UTC
d-inference-landing Ready Ready Preview Oct 14, 2026 8:00pm UTC
darkbloom-status Ready Ready Preview Oct 14, 2026 8:00pm UTC
eigen-homepages-darkbloom Ready Ready Preview Oct 14, 2026 8:00pm UTC

Request Review

@blacksmith-sh

blacksmith-sh Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Found 5 test failures on Blacksmith runners:

Failures

Test View Logs
TestIntegration_ConcurrentRequests View Logs
TestIntegration_InsufficientBalance View Logs
TestIntegration_InvalidModel View Logs
TestIntegration_ProviderPayoutSplit View Logs
TestIntegration_StreamingContentValidation View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Studio's base-URL and example copy buttons shared one `copied` flag, so
copying the base URL gave no feedback on its own button and switched
"Copy example" to "Copied". Track which value was copied and confirm it
on that button only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Address the reviewed edge cases and add focused regression coverage.

Independent behavior-preserving review completed; focused tests and formatting/type checks passed. No production, provider, or account operations performed.

This branch was successfully deployed

5 active deployments
Preview – d-inference — a64b32fd Deployed Oct 14, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — a64b32fd Deployed Oct 14, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — a64b32fd Deployed Oct 14, 2026 by vercel[bot]
Preview – d-inference-landing — a64b32fd Deployed Oct 14, 2026 by vercel[bot]
Preview – darkbloom-status — a64b32fd Deployed Oct 14, 2026 by vercel[bot]
benchmarks — a64b32fd Deployed Oct 14, 2026 by jonathan308 via E2E Benchmarks #2645
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