Skip to content

feat(FR-2761): add deployment preset create/edit/delete UI#7125

Open
agatha197 wants to merge 5 commits into04-27-feat_fr-2750_add_deployment_revision_preset_management_ui_feature_specfrom
04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal
Open

feat(FR-2761): add deployment preset create/edit/delete UI#7125
agatha197 wants to merge 5 commits into04-27-feat_fr-2750_add_deployment_revision_preset_management_ui_feature_specfrom
04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 28, 2026

Resolves #7121 (FR-2761)

Summary

Add create / edit / delete UI for deployment revision presets on the admin tab.

New files

  • AdminDeploymentPresetSettingPageContent – stepper-based create / edit form covering:
    • Basic: name, description (edit-only), rank, runtimeVariantId
    • Image: imageId (UUID-based image select via new BAIImageSelect)
    • Cluster: clusterMode (single / multi), clusterSize
    • Execution: startupCommand, bootstrapScript
    • Deployment defaults: replicaCount, revisionHistoryLimit, openToPublic
  • AdminDeploymentPresetSettingPage – page wrapper that routes create / edit flows into AdminDeploymentPresetSettingPageContent
  • AdminDeploymentPresetListPage – list page with row actions (edit → setting page, delete → BAIConfirmModalWithInput per destructive-confirmation rule)
  • BAIImageSelect – reusable UUID-based image select component (under components/fragments/)

Notable fixes

  • Validation regression: wrapping RuntimeVariantSelect in <Suspense> caused the inner Form.Item to unmount during loading, un-registering the field and making "runtime is required" stick. Fix: RuntimeVariantSelectField / ImageSelectField wrappers keep <Suspense> inside the field while value / onChange flow through Form.Item uninterrupted.
  • useEffectEvent migration in AdminServingPage tab-fallback effect so the effect re-runs only on genuine reactive deps.
  • antd v6 prop migrations: Divider.orientationMarginstyles.content.margin, Select.filterOptionshowSearch={{ filterOption }}. Spacing literals replaced with theme tokens.
  • runtimeVariantId filter in the list page switched to UUID scalar with fixedOperator: 'equals'; buildFilter hardened to tolerate the legacy { equals: '...' } form in URL state.

i18n

52 new keys added across the deployment-preset surface and translated for all 22 locales.

@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization size:XL 500~ LoC labels Apr 28, 2026
Copy link
Copy Markdown
Contributor Author

agatha197 commented Apr 28, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
7.98% (-0.11% 🔻)
1859/23302
🔴 Branches
7.17% (-0.17% 🔻)
1187/16545
🔴 Functions
4.72% (-0.08% 🔻)
297/6289
🔴 Lines
7.76% (-0.1% 🔻)
1750/22566
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / AdminDeploymentPresetSettingPageContent.tsx
0% 0% 0% 0%
🔴
... / DeploymentPresetDetailContent.tsx
0% 0% 0% 0%
🔴
... / AdminDeploymentPresetSettingPage.tsx
0% 0% 0% 0%
🔴
... / AdminDeploymentPresetListPage.tsx
0% 0% 0% 0%

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from e93e2bf

@agatha197 agatha197 force-pushed the 04-27-feat_fr-2750_add_deployment_revision_preset_management_ui_feature_spec branch from 70f160b to c4093fb Compare April 28, 2026 07:03
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal branch from b2ca96c to b0f5fb7 Compare April 28, 2026 07:03
@github-actions github-actions Bot added the area:lib Library and SDK related issue. label Apr 28, 2026
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal branch from b0f5fb7 to 69c1ee3 Compare April 28, 2026 12:15
@agatha197 agatha197 marked this pull request as draft April 28, 2026 13:06
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal branch from d769590 to adc2b11 Compare April 30, 2026 02:34
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2750_add_deployment_revision_preset_management_ui_feature_spec branch from c4093fb to 563bd00 Compare April 30, 2026 02:34
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal branch from adc2b11 to 2e9864f Compare April 30, 2026 06:48
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2750_add_deployment_revision_preset_management_ui_feature_spec branch from 0234e8f to 065f85b Compare April 30, 2026 06:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

Coverage report for ./packages/backend.ai-ui

St.
Category Percentage Covered / Total
🟢 Statements 81.87% 429/524
🟡 Branches 70.43% 362/514
🟡 Functions 76.86% 93/121
🟢 Lines 83.19% 391/470

Test suite run success

319 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from e93e2bf

@agatha197 agatha197 force-pushed the 04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal branch 5 times, most recently from f2a7345 to 64cf62b Compare April 30, 2026 08:02
Add AdminDeploymentPresetSettingModal with create/edit form, DeploymentPresetDetailContent for delete preview, and wire both into AdminDeploymentPresetListPage. Add i18n translations for all 21 locales.
- AdminDeploymentPresetListPage: runtimeVariantId filter is a raw UUID
  scalar in the schema (not a UUIDFilter object). Switch the filter
  property to type 'uuid' with valueMode 'scalar' and fixedOperator
  'equals', and harden buildFilter to coerce both the scalar string and
  the legacy { equals: '...' } operator form into a plain UUID.
- AdminServingPage: migrate the tab-fallback useEffect to useEffectEvent
  per .claude/rules/use-effect-event.md so the effect only re-runs on
  the genuine reactive deps (tab, isSuperAdmin, isDeploymentPresetSupported)
  rather than re-firing when setQueryParam identity churns.
- AdminDeploymentPresetSettingModal: gate the Description field to edit
  mode only and add a TODO(needs-backend) marker. The current
  CreateDeploymentRevisionPresetInput does not yet accept description,
  so rendering the field on create silently dropped user input.
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal branch from 64cf62b to 4bbc1f8 Compare April 30, 2026 08:07
@agatha197 agatha197 force-pushed the 04-27-feat_fr-2750_add_deployment_revision_preset_management_ui_feature_spec branch from 065f85b to d7cb5fc Compare April 30, 2026 08:07
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal branch 7 times, most recently from c6a2244 to 1146cb6 Compare April 30, 2026 14:24
@agatha197 agatha197 marked this pull request as ready for review April 30, 2026 15:15
@agatha197 agatha197 changed the title feat(FR-2761): add deployment preset create/edit/delete modal feat(FR-2761): add deployment preset create/edit/delete UI Apr 30, 2026
agatha197 added 2 commits May 1, 2026 00:20
- Remove resourceSlots from fragment to fix AllocatedResourceSlotNode.id backend error
  that was causing deploymentRevisionPreset to return null
- Switch fetch policy from network-only to store-and-network to avoid duplicate requests
- Revert node() query workaround (backend doesn't support node for DeploymentRevisionPreset)
- Track review step validation result in separate reviewHasError state so error status
  is correct even when other steps' form fields are unmounted
- Show review step title in red on error instead of x-icon status
- Update button disabled prop to use reviewHasError
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2761_add_deployment_preset_create_edit_delete_modal branch from 1146cb6 to e93e2bf Compare April 30, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:lib Library and SDK related issue. area:ux UI / UX issue. size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant