chore(studio): reorder deployment tab options (ASTD-578) - #1880
Conversation
Puts the common sources first in the create-deployment side panel. The segmented control's items are reordered to HuggingFace, Workspace, NGC NIM Container. Every consumer branches on the source value rather than its index, so the reorder is inert on its own. What it forces is a decision about the default: `defaultWizardValues()` hardcoded `source: SOURCE_NGC`, which only looked right because NGC happened to be leftmost. Left alone, the panel would open with the third segment selected. The default moves to HuggingFace, which also settles an existing inconsistency. `defaultWizardValues()` sets `engine: Engine.vllm`, but the NGC source ignores the engine entirely and overrides it to `nim` when building its request. Defaulting to NGC therefore shipped two defaults that described different deployments; HuggingFace is one of the two sources that actually reads the engine picker. Tests that were pinning the old default: - schema.test.ts asserted SOURCE_NGC. It now asserts SOURCE_HF, plus a new case that the default source is one `sourceSupportsEngineChoice()` accepts, so the default engine can't drift out of reach again. - The e2e deployment flow filled the NGC form without ever clicking a segment, silently depending on the preselection. It now selects NGC explicitly, so it covers the NGC path rather than whatever is default. Deep links are unaffected: `?model=` and `?fileset=` force the Workspace source by value. Signed-off-by: Alex Ray <alray@nvidia.com>
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe deployment wizard now defaults to Hugging Face and orders it first. Schema tests verify engine compatibility. The E2E test explicitly selects NGC when testing NGC deployment creation. ChangesDeployment source selection
Suggested reviewers: Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Create Deployment now opens with Hugging Face selected and lists sources as HuggingFace, Workspace, then NGC NIM Container. NGC creation remains explicitly selected where needed, with no current merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
Puts the common sources first in the create-deployment side panel: the segmented control now reads HuggingFace | Workspace | NGC NIM Container, and the wizard opens on HuggingFace instead of NGC.
The reorder itself is inert — every consumer branches on the source value, never its index. What it forces is a decision about the default, which this PR settles deliberately.
Changes
SegmentedControlitems inCreateDeploymentSidePanel/index.tsx.defaultWizardValues()fromSOURCE_NGCtoSOURCE_HF, and reorder the zod enum to match.schema.test.tsto assert the new default, plus a new case pinning that the default source is onesourceSupportsEngineChoice()accepts.Why the default had to move
defaultWizardValues()hardcodedsource: SOURCE_NGC, which only looked right because NGC happened to be leftmost. Left alone, the panel would have opened with the third segment selected.Moving it to HuggingFace also settles an existing inconsistency:
defaultWizardValues()setsengine: Engine.vllm, but the NGC source ignores the engine entirely and overrides it tonimwhen building its request. Defaulting to NGC therefore shipped two defaults that described different deployments. HuggingFace is one of the two sources that actually reads the engine picker.Deep links
Unaffected.
?model=and?fileset=force the Workspace source by value, so reordering cannot break them.Base
Targets
maindirectly and depends on nothing else. It was previously the bottom of a stacked series; verified independent by cherry-picking it onto the base alone (applies with no conflict, typecheck clean). Nothing in the related deployment PRs referencesCreateDeploymentSidePanel,SOURCE_HF,defaultWizardValues, orsourceSupportsEngineChoice— the stacking was an artifact of authoring order, not a code dependency.Type of Change
Quality Gates
Two tests were silently pinning the old default and are updated rather than deleted:
schema.test.ts:66assertedSOURCE_NGC.e2e-tests/deployments.test.tsfilled the NGC form without ever clicking a segment, so it depended on the preselection. It now selects NGC explicitly, meaning it covers the NGC path rather than whatever happens to be default.Verification
Signed-off-by:traileruv run pre-commit run -apasses, or any blocked checks are identified belowTargeted validation:
pnpm --filter nemo-studio-ui test src/routes/DeploymentsListRoute— 4 files, 40 tests passedpnpm --filter nemo-studio-ui typecheck— cleanpnpm --filter nemo-studio-ui lint:fix— cleanpnpm --filter nemo-studio-ui test— 338 files, 3320 tests passed (run on the tip of this stack)uv run pre-commit run -anot run in full; the commit-scoped pre-commit hooks ran and passed on commit.The e2e test is not executed here — E2E is currently disabled per
AGENTS.md. The change to it is mechanical (an added explicit segment click).