Repository navigation
improve(ui): unify first-run model setup onto the Models page - #207591
Conversation
- First run lands on /settings/model-providers?firstRun=1: the Models page (Connect a provider catalog, Find local models, installed agents) for the agent the app uses. - First run adds only detected ready-to-use models and activation recovery above the catalog; local, sign-in and manual setup live in the Find local models dialog owned by the same first-run owner. - /settings/model-setup is redirect-only; deleted the full-page setup view, the installed-agent dropdown, loading skeletons and the setup page's own Models login. Co-authored-by: obviyus <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
- Do not hold the Models catalog behind first-run discovery; detected models appear above it when found. - Disable catalog sign-in while a first-run activation is unresolved, as the old setup login did. - Drop the now-unused Models connect action and port the gateway setup test to the first-run dialog. Co-authored-by: obviyus <[email protected]>
- First-run Models shows the configured model with Check model, then Continue setup once it answers. Co-authored-by: obviyus <[email protected]>
- A catalog sign-in on first-run Models now shows Check model and Continue setup without a reload. Co-authored-by: obviyus <[email protected]>
- A newer detection replaces a scan that began before Models configured a model. Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
Co-authored-by: obviyus <[email protected]>
- Detected models render above the catalog when discovery finishes first, and after it otherwise. Co-authored-by: obviyus <[email protected]>
|
Final-head screenshots (head bdb7fe2, fresh isolated Gateway): first-run Models desktop and mobile, detected model rendered below the catalog after late discovery, and the Find local models dialog. |
|
Maintainer override: ci-triage output (head bdb7fe2; main run 46159819558): The |
|
Codex review: passed. What this changesThis PR moves first-run model setup onto Models while retaining the existing activation and recovery owner. Example: Open a fresh Gateway with no configured model.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored consolidation removes a redundant setup surface, and inspection found no definite introduced defect. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI combines Gateway model discovery, agent-scoped credentials, and setup wizard results into model choices, activation feedback, and continuation actions. flowchart TD
A[First-run entry or saved link] --> B[Models route]
B --> C[Provider catalog]
B --> D[Existing setup owner]
C --> E[Provider login owner]
D --> F[Gateway discovery and activation]
E --> F
F --> G[Model readiness and continuation]
Technical reviewBest possible solution: Retain this consolidation through the existing Models and setup owners, with required CI resolved before landing. Do we have a high-confidence way to reproduce the issue? Current-main routing and the inspected before screenshots establish the separate first-run page; no target code or tests were executed during this read-only review. Is this the best way to solve the issue? Reusing Models while retaining FirstRunSetup is a coherent cutover that removes duplicate rendering without introducing another activation owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b64fd500ba52. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -634, Tests -1035, Docs +2, Other -1. Total -1668 across 57 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 28, 2026, 12:14 PM ET / 17:14 UTC. |
…aw#207591) First-run model setup now uses the Models page (`/settings/model-providers?firstRun=1`) for the agent the app uses. First run adds only activation recovery, detected ready-to-use models and the Find local models dialog of the existing first-run owner. `/settings/model-setup` is redirect-only; the legacy full-page setup view, installed-agent dropdown, loading skeletons and the setup page's private Models login are removed. Co-authored-by: Ayaan Zaidi <[email protected]>




Problem
A fresh Gateway with no model sent people to
/settings/model-setup?firstRun=1, a separate legacy page: "Set up a model", a red Add account button, Check again, a full-width "Use an installed agent" dropdown, "Available models", a six-row "Run a model locally" wall, a raw "Set up and verify a model" sign-in list and a raw manual provider/key form. Settings → Models already had a clean new-user view (Connect a provider catalog, Find local models, Installed agents). Two surfaces did the same job.Solution
First run now uses the Models page itself.
model-setup?firstRun=1|explicitlinks open/settings/model-providers?firstRun=<value>. Othermodel-setuplinks still go tomodel-providers?connect=1.model-setupis a redirect-only route.createModelSetup/FirstRunSetupowner:custodian?onboarding=1through Continue setup.context.agentSelection(the agent the app uses), as the old page did. The route loader picks that selection; the page gives its controller a context whose settings selection is the app selection, so credentials, installed agents and model activation all target the same agent.order), so nothing visible moves.login-controller.tsis unchanged in this respect.Deleted: the full-page branches of
model-setup/view.tsx,native-model-setup.tsx(replaced by Installed agents),loading-view.tsx, theConfiguredModelverify panel, the full-page heading/intro, unused copy and CSS.UX decisions (recorded per standing orders):
Impact
Evidence
Before (merge base
b90cda2, fresh isolated Gateway, scratch HOME, no keys):After (head, fresh isolated Gateway):
Real-Gateway head E2E (fresh isolated Gateway, no model, Chromium + WebKit):
/settings/model-providers?firstRun=1with Connect a provider, the detected Apple Foundation Models row above it, and Installed agents.layout-shiftPerformanceObserver at 400 / 820 / 1280 px (headbdb7fe24, fresh Gateway, Chromium): 0 / 0.0006 / 0.002 (settings-group/sidebar on first paint, not the catalog); discovery finished after the catalog painted, so the Apple Foundation Models row rendered below Installed agents/defaults and nothing moved. 0 console errors, 0 page errors.Checks:
pnpm tsgo:ui,pnpm lint:ui:styles,pnpm ui:i18n:baseline(no baseline change),pnpm ui:i18n:verify,pnpm check:control-ui-controllers --prune, oxfmt/oxlint on changed files.ocx testunit: model-setup, model-providers, bootstrap, app shell, custodian and route importers: 65 files, 725 tests passed.ocx testUI E2E (mocked Gateway): 27 first-run, Models, login, discovery, chat and layout files: 164 passed, 1 failed. The failure,initial-connect-splash"keeps finalized recording pixels intact while capturing an element on a tall page", fails identically on the merge base (headless recording,firstScene=-1); not ours.Tests retired with this change:
model-setup-headings(deleted page layout),model-setup-codex-sign-in(covered bymodel-provider-login.e2e"shows a provider's accounts and every connection method before browser sign-in" andmodel-setup.e2edevice-code completion), the first-run API-key hand-off test inmodel-provider-login.e2e(that hand-off is removed; manual API keys are covered in the discovery dialog), native installed-agent "Use" tests,ConfiguredModeltests and the setup page's own account-connection tests.Review round 1 (local ClawSweeper)
model-setup-recovery.e2e(uncertain → disabled, rejected → enabled).Review round 2 (local ClawSweeper)
FirstRunSetup.verify), then Continue setup once it answers. Covered byview.test.ts"lets first run verify an already configured model before continuing".Review round 3 report (final head)
model-setup-recovery.e2e"offers the first-run handoff after a model is configured elsewhere on Models".Final-head review findings
FirstRunSetup.continueSetup()then opens chat, exactly as the deletedConfiguredModeldid on the base. Changing that completion contract is new behavior outside this cut. Docs now describe it precisely.initial-connect-splash.e2easserts the catalog keeps its position and the late row renders below it.Final local review
Head
bdb7fe24: ClawSweeper local review "patch is correct", zero findings.