feat(FR-2888): add BAIRuntimeVariantSelect and remove runtimeVariants block from DeploymentAddRevisionModalQuery#7400
Merged
Conversation
Contributor
Author
This was referenced May 13, 2026
Contributor
Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
716147f to
d6d5243
Compare
9d7841d to
65dd13d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new BAIRuntimeVariantSelect component in backend.ai-ui (server-paginated + selected-value point lookup) and migrates the deployment “Add Revision” Custom mode to use it, removing the modal-level preload of the full runtimeVariants list. It also adds the new component-scoped i18n key across UI locales.
Changes:
- Added
BAIRuntimeVariantSelect(paginatedruntimeVariants(...)+runtimeVariant(id:)lookup) and exported it from the fragments barrel. - Migrated
DeploymentAddRevisionCustomContentto useBAIRuntimeVariantSelect, and updated the fragment to readmodelRuntimeConfig.runtimeVariant { name }for “Load current revision” prefill. - Removed the now-unused
runtimeVariants { ... }block fromDeploymentAddRevisionModalQueryand dropped the related prop wiring; added locale keys for the new select placeholder.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| react/src/components/DeploymentAddRevisionModal.tsx | Removes runtimeVariants preload from the modal query and stops passing runtimeVariantsData into Custom content. |
| react/src/components/DeploymentAddRevisionCustomContent.tsx | Replaces inline antd Select with BAIRuntimeVariantSelect, adds runtimeVariant { name } for prefill, and uses an id→name map for branching/submit logic. |
| packages/backend.ai-ui/src/components/fragments/index.ts | Exports the new BAIRuntimeVariantSelect component + types. |
| packages/backend.ai-ui/src/components/fragments/BAIRuntimeVariantSelect.tsx | Adds the new self-paginated runtime variant select with selected-value name resolution and onResolvedNamesChange. |
| packages/backend.ai-ui/src/locale/en.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/ko.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/ja.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/zh-CN.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/zh-TW.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/de.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/fr.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/es.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/it.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/fi.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/el.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/pt.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/pt-BR.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/pl.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/ru.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/tr.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/th.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/vi.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/id.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/ms.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
| packages/backend.ai-ui/src/locale/mn.json | Adds comp:BAIRuntimeVariantSelect.SelectRuntimeVariant. |
Comments suppressed due to low confidence (1)
react/src/components/DeploymentAddRevisionCustomContent.tsx:696
handleFinishderivesvariantNamesolely fromruntimeVariantNameMap. If the map hasn’t been populated yet (e.g., user clicks “Load current revision” then submits before the select’s lookup resolves, or lookup fails),variantNamebecomes empty and the submission logic will branch as non-custom and may serialize runtime params using an invalid/empty variant name. It would be safer to block submission (field error) until the selected variant name is resolved, or provide a synchronous fallback for the currently selected id.
const variantName = runtimeVariantNameMap[values.runtimeVariantId] ?? '';
const isCustom = variantName === 'custom';
const isCommandMode = values.customDefinitionMode === 'command';
// Build environ. The `EnvVarFormList` (`values.environ`) is the
d6d5243 to
a69a531
Compare
03d8a84 to
1ecec40
Compare
a69a531 to
8592026
Compare
1ecec40 to
0884d13
Compare
8592026 to
ab4a457
Compare
5 tasks
ab4a457 to
ee90cf4
Compare
0884d13 to
c568585
Compare
This was referenced May 13, 2026
nowgnuesLee
requested changes
May 14, 2026
ee90cf4 to
b724b5d
Compare
c568585 to
07e0b94
Compare
b724b5d to
a9174f0
Compare
07e0b94 to
4d23a05
Compare
4d23a05 to
d37b8be
Compare
90e3240 to
ed69612
Compare
d37b8be to
a96ed3c
Compare
Merged
4 tasks
a96ed3c to
8d60089
Compare
ed69612 to
bf658de
Compare
Merge activity
|
… block from DeploymentAddRevisionModalQuery (#7400) Resolves #7399 ([FR-2888](https://lablup.atlassian.net/browse/FR-2888)) ## Summary - Add `BAIRuntimeVariantSelect` to `backend.ai-ui` — self-paginated runtime variant select backed by Strawberry V2 `runtimeVariants(...)` + `runtimeVariant(id:)` point lookup, mirroring the `BAIAvailablePresetSelect` / `BAIProjectVfolderSelect` shape from FR-2886. Exposes an `onResolvedNamesChange(map)` callback so parents can maintain a tiny id→name map for branching logic without re-querying. - Migrate `DeploymentAddRevisionCustomContent` to consume `BAIRuntimeVariantSelect` in place of the inline antd `<Select>`. The "Load current revision" prefill reads the name directly from the fragment via a new `runtimeVariant { name }` selection on `modelRuntimeConfig` — no name-map round-trip needed at prefill time. - Drop the `runtimeVariants { edges { node { id name } } }` block from `DeploymentAddRevisionModalQuery` and the corresponding `runtimeVariantsData` prop pass from `DeploymentAddRevisionModal` to the Custom body — no remaining consumer needs the full preload. - Add `comp:BAIRuntimeVariantSelect.SelectRuntimeVariant` to all 21 BAI UI locale files (English + 20 translations). ## Test plan - [ ] Open the Add Revision modal → Custom mode: runtime variant picker paginates and searches server-side; selected value name resolves via the point lookup. - [ ] Click "Load current revision": form prefills with the saved revision's variant; `variantName === 'custom'` branching (command/file segmented, runtime parameter section visibility) behaves identically to pre-migration. - [ ] Switch Preset → Custom: the preset-transfer prefill still applies the variant id and the picker shows the resolved label. - [ ] `bash scripts/verify.sh` — Relay / Lint / Format PASS. TypeScript baseline (SessionLauncherPage / StatisticsPage / StorageHostSettingPage / UserCredentialsPage / UserSettingsPage / VFolderNodeListPage) unchanged. [FR-2888]: https://lablup.atlassian.net/browse/FR-2888?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
8d60089 to
f6d3792
Compare
bf658de to
91322cc
Compare
Base automatically changed from
05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers
to
main
May 15, 2026 08:05
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.

Resolves #7399 (FR-2888)
Summary
BAIRuntimeVariantSelecttobackend.ai-ui— self-paginated runtime variant select backed by Strawberry V2runtimeVariants(...)+runtimeVariant(id:)point lookup, mirroring theBAIAvailablePresetSelect/BAIProjectVfolderSelectshape from FR-2886. Exposes anonResolvedNamesChange(map)callback so parents can maintain a tiny id→name map for branching logic without re-querying.DeploymentAddRevisionCustomContentto consumeBAIRuntimeVariantSelectin place of the inline antd<Select>. The "Load current revision" prefill reads the name directly from the fragment via a newruntimeVariant { name }selection onmodelRuntimeConfig— no name-map round-trip needed at prefill time.runtimeVariants { edges { node { id name } } }block fromDeploymentAddRevisionModalQueryand the correspondingruntimeVariantsDataprop pass fromDeploymentAddRevisionModalto the Custom body — no remaining consumer needs the full preload.comp:BAIRuntimeVariantSelect.SelectRuntimeVariantto all 21 BAI UI locale files (English + 20 translations).Test plan
variantName === 'custom'branching (command/file segmented, runtime parameter section visibility) behaves identically to pre-migration.bash scripts/verify.sh— Relay / Lint / Format PASS. TypeScript baseline (SessionLauncherPage / StatisticsPage / StorageHostSettingPage / UserCredentialsPage / UserSettingsPage / VFolderNodeListPage) unchanged.