Skip to content

feat(FR-2886): add BAIAvailablePresetSelect and BAIProjectVfolderSelect, migrate deployment callers#7396

Merged
graphite-app[bot] merged 1 commit into
mainfrom
05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers
May 15, 2026
Merged

feat(FR-2886): add BAIAvailablePresetSelect and BAIProjectVfolderSelect, migrate deployment callers#7396
graphite-app[bot] merged 1 commit into
mainfrom
05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented May 13, 2026

Resolves #7395 (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 BAISelectBAIAvailablePresetSelect. 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.tsxBAIVFolderSelect (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).

Copy link
Copy Markdown
Contributor Author

agatha197 commented May 13, 2026

@agatha197 agatha197 marked this pull request as ready for review May 13, 2026 02:53
@agatha197 agatha197 requested review from Copilot, ironAiken2, nowgnuesLee and yomybaby and removed request for Copilot May 13, 2026 02:53
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)

Status Category Percentage Covered / Total
🔵 Lines 8.19% 362 / 4416
🔵 Statements 7.34% 411 / 5598
🔵 Functions 8.99% 94 / 1045
🔵 Branches 6.54% 362 / 5529
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/backend.ai-ui/src/components/BAISelect.tsx 0% 0% 0% 0% 17-252
packages/backend.ai-ui/src/components/fragments/BAIAvailablePresetSelect.tsx 0% 0% 0% 0% 45-339
packages/backend.ai-ui/src/components/fragments/BAIProjectVfolderSelect.tsx 0% 0% 0% 0% 50-292
packages/backend.ai-ui/src/components/fragments/index.ts 100% 100% 100% 100%
Generated in workflow #733 for commit a96ed3c by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.49% 1783 / 27439
🔵 Statements 5.33% 1978 / 37072
🔵 Functions 5.25% 296 / 5633
🔵 Branches 3.73% 1293 / 34640
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/components/DeploymentAddRevisionCustomContent.tsx 0% 0% 0% 0% 76-1173
react/src/components/DeploymentAddRevisionModal.tsx 0% 0% 0% 0% 45-375
react/src/components/DeploymentAddRevisionPresetContent.tsx 0% 0% 0% 0% 67-168
react/src/components/ModelCardDeployModal.tsx 0% 0% 0% 0% 60-335
react/src/components/VFolderDeployModal.tsx 0% 0% 0% 0% 61-117
Generated in workflow #765 for commit 8d60089 by the Vitest Coverage Report Action

Copilot AI review requested due to automatic review settings May 13, 2026 03:29
@agatha197 agatha197 force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from a718976 to 2699ead Compare May 13, 2026 03:29
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch from 9d7841d to 65dd13d Compare May 13, 2026 03:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (V2 projectVfolders(projectId:) + structured VFolderFilter) and migrated deployment revision flows off the V1 string-DSL vfolder picker.
  • Updated BAISelect to reintroduce role as 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).

Comment thread packages/backend.ai-ui/src/components/fragments/BAIAvailablePresetSelect.tsx Outdated
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch from 65dd13d to 03d8a84 Compare May 13, 2026 03:42
@agatha197 agatha197 force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from 2699ead to 34457b6 Compare May 13, 2026 03:42
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch from 03d8a84 to 1ecec40 Compare May 13, 2026 03:46
@agatha197 agatha197 force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from 34457b6 to 29cab01 Compare May 13, 2026 03:46
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch from 1ecec40 to 0884d13 Compare May 13, 2026 03:50
@agatha197 agatha197 force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from 29cab01 to 7226893 Compare May 13, 2026 04:53
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch from 0884d13 to c568585 Compare May 13, 2026 04:53
Comment thread packages/backend.ai-ui/src/components/BAISelect.tsx Outdated
Comment thread packages/backend.ai-ui/src/components/fragments/BAIProjectVfolderSelect.tsx Outdated
@agatha197 agatha197 force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from 7226893 to 8d61ee2 Compare May 14, 2026 05:21
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch 3 times, most recently from 4d23a05 to d37b8be Compare May 14, 2026 07:32
@agatha197 agatha197 force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from 8d61ee2 to aa8f7b3 Compare May 14, 2026 07:32
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch from d37b8be to a96ed3c Compare May 14, 2026 10:00
@agatha197 agatha197 force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from aa8f7b3 to 25ebd65 Compare May 14, 2026 10:00
@agatha197 agatha197 force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from 25ebd65 to f50c681 Compare May 15, 2026 07:45
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch from a96ed3c to 8d60089 Compare May 15, 2026 07:45
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 15, 2026

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
@graphite-app graphite-app Bot force-pushed the 05-12-fix_fr-2869_lazy-load_model_card_drawer_details_to_speed_up_modelstorelistpagev2 branch from f50c681 to 2e269df Compare May 15, 2026 07:57
@graphite-app graphite-app Bot force-pushed the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch from 8d60089 to f6d3792 Compare May 15, 2026 07:58
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
@graphite-app graphite-app Bot merged commit f6d3792 into main May 15, 2026
3 of 5 checks passed
@graphite-app graphite-app Bot deleted the 05-13-feat_fr-2886_add_baiavailablepresetselect_and_baiprojectvfolderselect_migrate_deployment_callers branch May 15, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add BAIAvailablePresetSelect and BAIProjectVfolderSelect; migrate deployment callers to V2 vfolder API

3 participants