feat(FR-2886): add BAIAvailablePresetSelect and BAIProjectVfolderSelect, migrate deployment callers#7396
Merged
Conversation
Contributor
Author
Contributor
Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 tasks
a718976 to
2699ead
Compare
9d7841d to
65dd13d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds two new shared, self-contained select components to packages/backend.ai-ui—one for deployment presets and one for project vfolders—then migrates several deployment/deploy-entry modals in /react to use them. It also updates the shared BAISelect wrapper to accommodate Ant Design v6’s role typing and propagates new component-scoped i18n keys across all backend.ai-ui locales.
Changes:
- Added
BAIAvailablePresetSelect(self-paginated preset select with runtime-variant grouping + name/description rendering) and migrated preset dropdown callers to use it. - Added
BAIProjectVfolderSelect(V2projectVfolders(projectId:)+ structuredVFolderFilter) and migrated deployment revision flows off the V1 string-DSL vfolder picker. - Updated
BAISelectto reintroduceroleas an optional prop (with a default) and added component-scoped i18n keys to all backend.ai-ui locales.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| react/src/components/VFolderDeployModal.tsx | Replaces inline preset select/grouping logic with BAIAvailablePresetSelect; trims query fields accordingly. |
| react/src/components/ModelCardDeployModal.tsx | Migrates preset dropdown to BAIAvailablePresetSelect (with TODO about backend filtering scope). |
| react/src/components/DeploymentAddRevisionPresetContent.tsx | Switches vfolder picker from V1 to BAIProjectVfolderSelect; uses MODEL_STORE project scoping. |
| react/src/components/DeploymentAddRevisionModal.tsx | Removes now-unused runtimeVariantsData prop plumbing for preset content. |
| react/src/components/DeploymentAddRevisionCustomContent.tsx | Migrates model-folder selection to BAIProjectVfolderSelect and adjusts UUID formatting assumptions. |
| packages/backend.ai-ui/src/components/fragments/index.ts | Exports new fragment components/types for consumption. |
| packages/backend.ai-ui/src/components/fragments/BAIProjectVfolderSelect.tsx | New V2 project vfolder select with structured filter, pagination, and selected-name resolution. |
| packages/backend.ai-ui/src/components/fragments/BAIAvailablePresetSelect.tsx | New paginated preset select with runtime-variant grouping and rich option rendering. |
| packages/backend.ai-ui/src/components/BAISelect.tsx | Updates BAISelectProps to handle antd v6 role typing and provides a default role. |
| packages/backend.ai-ui/src/locale/en.json | Adds comp:BAIAvailablePresetSelect.SelectPreset + comp:BAIProjectVfolderSelect.SelectFolder. |
| packages/backend.ai-ui/src/locale/ko.json | Adds new component-scoped keys (Korean). |
| packages/backend.ai-ui/src/locale/ja.json | Adds new component-scoped keys (Japanese). |
| packages/backend.ai-ui/src/locale/zh-CN.json | Adds new component-scoped keys (Simplified Chinese). |
| packages/backend.ai-ui/src/locale/zh-TW.json | Adds new component-scoped keys (Traditional Chinese). |
| packages/backend.ai-ui/src/locale/de.json | Adds new component-scoped keys (German). |
| packages/backend.ai-ui/src/locale/es.json | Adds new component-scoped keys (Spanish). |
| packages/backend.ai-ui/src/locale/fr.json | Adds new component-scoped keys (French). |
| packages/backend.ai-ui/src/locale/it.json | Adds new component-scoped keys (Italian). |
| packages/backend.ai-ui/src/locale/pt.json | Adds new component-scoped keys (Portuguese). |
| packages/backend.ai-ui/src/locale/pt-BR.json | Adds new component-scoped keys (Portuguese - Brazil). |
| packages/backend.ai-ui/src/locale/ru.json | Adds new component-scoped keys (Russian). |
| packages/backend.ai-ui/src/locale/pl.json | Adds new component-scoped keys (Polish). |
| packages/backend.ai-ui/src/locale/tr.json | Adds new component-scoped keys (Turkish). |
| packages/backend.ai-ui/src/locale/th.json | Adds new component-scoped keys (Thai). |
| packages/backend.ai-ui/src/locale/vi.json | Adds new component-scoped keys (Vietnamese). |
| packages/backend.ai-ui/src/locale/el.json | Adds new component-scoped keys (Greek). |
| packages/backend.ai-ui/src/locale/id.json | Adds new component-scoped keys (Indonesian). |
| packages/backend.ai-ui/src/locale/ms.json | Adds new component-scoped keys (Malay). |
| packages/backend.ai-ui/src/locale/mn.json | Adds new component-scoped keys (Mongolian). |
| packages/backend.ai-ui/src/locale/fi.json | Adds new component-scoped keys (Finnish). |
65dd13d to
03d8a84
Compare
2699ead to
34457b6
Compare
03d8a84 to
1ecec40
Compare
34457b6 to
29cab01
Compare
1ecec40 to
0884d13
Compare
5 tasks
29cab01 to
7226893
Compare
0884d13 to
c568585
Compare
5 tasks
nowgnuesLee
requested changes
May 14, 2026
7226893 to
8d61ee2
Compare
4d23a05 to
d37b8be
Compare
8d61ee2 to
aa8f7b3
Compare
d37b8be to
a96ed3c
Compare
aa8f7b3 to
25ebd65
Compare
Merged
4 tasks
25ebd65 to
f50c681
Compare
a96ed3c to
8d60089
Compare
Merge activity
|
…ct, migrate deployment callers (#7396) Resolves #7395 ([FR-2886](https://lablup.atlassian.net/browse/FR-2886)) ## Summary - Add `BAIAvailablePresetSelect` to `backend.ai-ui` — self-paginated deployment-preset select with `runtimeVariant` optgroup grouping and a `name + description` `optionRender`. Uses the package-local i18n key `comp:BAIAvailablePresetSelect.SelectPreset` (the previous inline call sites reused the main app's `modelStore.Preset`, which the library namespace doesn't expose and rendered as raw text). - Add `BAIProjectVfolderSelect` to `backend.ai-ui` — replaces the V1 `vfolder_nodes` string-DSL filter with the V2 `projectVfolders(projectId:)` GraphQL query and accepts a structured `VFolderFilter` input. Single-value selected-name resolution uses the `vfolderV2(vfolderId:)` point lookup, gated by `@skip` when nothing is selected. Suppresses the trailing `(id)` suffix on the selected label while the dropdown is open so it doesn't leak alongside the antd search input overlay. - Migrate consumers: - `VFolderDeployModal.tsx` and `ModelCardDeployModal.tsx` — inline preset `BAISelect` → `BAIAvailablePresetSelect`. The model-card-scoped dropdown is temporarily wired to the full project preset list with a `TODO(needs-backend)` marker until a model-card-scoped preset list lands. - `DeploymentAddRevisionPresetContent.tsx` and `DeploymentAddRevisionCustomContent.tsx` — `BAIVFolderSelect` (V1) → `BAIProjectVfolderSelect` (V2). The `projectId` is scoped to the MODEL_STORE project via `useModelStoreProject()`, not the user's currently selected project — model cards live in the domain-wide model store regardless of which project the user is browsing. - `DeploymentAddRevisionModal.tsx` — drop the stale `runtimeVariantsData` prop pass to the Preset child (no longer needed now that `BAIAvailablePresetSelect` paginates its own data). - Fix `BAIVFolderSelect` row_id filter rejection (carried in the parent stack): when `valuePropName="row_id"`, the selected-name resolver was emitting `row_id == "..."` filters which the backend DSL doesn't expose as a filterable column. Always emit `id == "<local-uuid>"` instead; `valuePropName` only affects the value shape, not the filter field name. - i18n: 2 new keys (`comp:BAIAvailablePresetSelect.SelectPreset`, `comp:BAIProjectVfolderSelect.SelectFolder`) added to all 21 BAI UI locales (English + 20 translations). ## Verification `bash scripts/verify.sh` — Relay, Lint, Format **PASS**. TypeScript baseline noise unchanged from prior to this branch (`SessionLauncherPage`, `StatisticsPage`, `StorageHostSettingPage`, `UserCredentialsPage`, `UserSettingsPage`, `VFolderNodeListPage` — all unrelated to these changes). ## Test plan - [ ] Open `DeploymentAddRevisionModal` (Preset mode): preset dropdown populates with optgroups; selecting a preset reflects in the preset detail modal; resource group + model folder selects are usable; deploy proceeds. - [ ] Switch to Custom mode in the same modal: model folder select continues to show the same MODEL_STORE-scoped vfolders; prefill from the previously selected preset still populates as expected. - [ ] Open `VFolderDeployModal` and `ModelCardDeployModal`: preset dropdown loads, scrolls (pagination), searches by name, and clears correctly. - [ ] Open `BAIProjectVfolderSelect` dropdown, type a search query — the trailing `(id)` suffix on the selected label is hidden while typing and reappears once the dropdown closes. - [ ] Confirm 21 locale files render the new placeholders correctly (spot-check at least `ko`, `ja`, `zh-CN`). [FR-2886]: https://lablup.atlassian.net/browse/FR-2886?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
f50c681 to
2e269df
Compare
8d60089 to
f6d3792
Compare
Base automatically changed from
05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2
to
main
May 15, 2026 08:04
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 #7395 (FR-2886)
Summary
BAIAvailablePresetSelecttobackend.ai-ui— self-paginated deployment-preset select withruntimeVariantoptgroup grouping and aname + descriptionoptionRender. Uses the package-local i18n keycomp:BAIAvailablePresetSelect.SelectPreset(the previous inline call sites reused the main app'smodelStore.Preset, which the library namespace doesn't expose and rendered as raw text).BAIProjectVfolderSelecttobackend.ai-ui— replaces the V1vfolder_nodesstring-DSL filter with the V2projectVfolders(projectId:)GraphQL query and accepts a structuredVFolderFilterinput. Single-value selected-name resolution uses thevfolderV2(vfolderId:)point lookup, gated by@skipwhen nothing is selected. Suppresses the trailing(id)suffix on the selected label while the dropdown is open so it doesn't leak alongside the antd search input overlay.VFolderDeployModal.tsxandModelCardDeployModal.tsx— inline presetBAISelect→BAIAvailablePresetSelect. The model-card-scoped dropdown is temporarily wired to the full project preset list with aTODO(needs-backend)marker until a model-card-scoped preset list lands.DeploymentAddRevisionPresetContent.tsxandDeploymentAddRevisionCustomContent.tsx—BAIVFolderSelect(V1) →BAIProjectVfolderSelect(V2). TheprojectIdis scoped to the MODEL_STORE project viauseModelStoreProject(), not the user's currently selected project — model cards live in the domain-wide model store regardless of which project the user is browsing.DeploymentAddRevisionModal.tsx— drop the staleruntimeVariantsDataprop pass to the Preset child (no longer needed now thatBAIAvailablePresetSelectpaginates its own data).BAIVFolderSelectrow_id filter rejection (carried in the parent stack): whenvaluePropName="row_id", the selected-name resolver was emittingrow_id == "..."filters which the backend DSL doesn't expose as a filterable column. Always emitid == "<local-uuid>"instead;valuePropNameonly affects the value shape, not the filter field name.comp:BAIAvailablePresetSelect.SelectPreset,comp:BAIProjectVfolderSelect.SelectFolder) added to all 21 BAI UI locales (English + 20 translations).Verification
bash scripts/verify.sh— Relay, Lint, Format PASS. TypeScript baseline noise unchanged from prior to this branch (SessionLauncherPage,StatisticsPage,StorageHostSettingPage,UserCredentialsPage,UserSettingsPage,VFolderNodeListPage— all unrelated to these changes).Test plan
DeploymentAddRevisionModal(Preset mode): preset dropdown populates with optgroups; selecting a preset reflects in the preset detail modal; resource group + model folder selects are usable; deploy proceeds.VFolderDeployModalandModelCardDeployModal: preset dropdown loads, scrolls (pagination), searches by name, and clears correctly.BAIProjectVfolderSelectdropdown, type a search query — the trailing(id)suffix on the selected label is hidden while typing and reappears once the dropdown closes.ko,ja,zh-CN).