From 316c42ad398e51180369f00432fe0ffdbe9f52a2 Mon Sep 17 00:00:00 2001 From: agatha197 <28584164+agatha197@users.noreply.github.com> Date: Fri, 8 May 2026 09:32:20 +0000 Subject: [PATCH] feat(FR-2835): add auto-activate option to Add Revision modal (#7289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves #7288 ([FR-2835](https://lablup.atlassian.net/browse/FR-2835)) ## Summary - Add `Auto-activate after adding` checkbox to the `Add Revision` modal so users can opt out of immediate activation when adding a new revision. - Default value is `true`, preserving existing behavior. - Wire the form value through to the `addModelRevision` mutation's `options.autoActivate` (previously hard-coded to `true`). - Add `deployment.AutoActivate` i18n key and translate it across all 21 supported locales. -  ## Test plan - [ ] Open the deployment page and click `Add Revision`. - [ ] Verify the new `Auto-activate after adding` checkbox is visible right under the revision name and is checked by default. - [ ] Submit with the box checked → newly added revision becomes the active revision (existing behavior). - [ ] Submit with the box unchecked → revision is added but does not become active. - [ ] Verify locale switch shows the translated label correctly. [FR-2835]: https://lablup.atlassian.net/browse/FR-2835?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- data/schema.graphql | 6 +++--- react/src/components/DeploymentAddRevisionModal.tsx | 8 +++++++- resources/i18n/de.json | 1 + resources/i18n/el.json | 1 + resources/i18n/en.json | 1 + resources/i18n/es.json | 1 + resources/i18n/fi.json | 1 + resources/i18n/fr.json | 1 + resources/i18n/id.json | 1 + resources/i18n/it.json | 1 + resources/i18n/ja.json | 1 + resources/i18n/ko.json | 1 + resources/i18n/mn.json | 1 + resources/i18n/ms.json | 1 + resources/i18n/pl.json | 1 + resources/i18n/pt-BR.json | 1 + resources/i18n/pt.json | 1 + resources/i18n/ru.json | 1 + resources/i18n/th.json | 1 + resources/i18n/tr.json | 1 + resources/i18n/vi.json | 1 + resources/i18n/zh-CN.json | 1 + resources/i18n/zh-TW.json | 1 + 23 files changed, 31 insertions(+), 4 deletions(-) diff --git a/data/schema.graphql b/data/schema.graphql index e32ea75c3d..775142e09d 100644 --- a/data/schema.graphql +++ b/data/schema.graphql @@ -9571,9 +9571,6 @@ type ModelRevision implements Node id: ID! imageId: ID! - """The name identifier for this revision.""" - name: String! - """Cluster configuration for replica distribution.""" clusterConfig: ClusterConfig! @@ -14470,6 +14467,9 @@ enum RBACElementType DEPLOYMENT_REVISION @join__enumValue(graph: STRAWBERRY) IMAGE_ALIAS @join__enumValue(graph: STRAWBERRY) ROLE_ASSIGNMENT @join__enumValue(graph: STRAWBERRY) + VFOLDER_DATA @join__enumValue(graph: STRAWBERRY) + SESSION_APP_SERVICE @join__enumValue(graph: STRAWBERRY) + USER_EMAIL @join__enumValue(graph: STRAWBERRY) ARTIFACT_REVISION @join__enumValue(graph: STRAWBERRY) } diff --git a/react/src/components/DeploymentAddRevisionModal.tsx b/react/src/components/DeploymentAddRevisionModal.tsx index ede9413eac..0204c69da1 100644 --- a/react/src/components/DeploymentAddRevisionModal.tsx +++ b/react/src/components/DeploymentAddRevisionModal.tsx @@ -39,6 +39,7 @@ import VFolderTableFormItem, { } from './VFolderTableFormItem'; import { App, + Checkbox, Collapse, Divider, Form, @@ -128,6 +129,7 @@ type FormValues = ImageEnvironmentFormInput & commandInitialDelay?: number; commandMaxRetries?: number; environ: EnvVarFormListValue[]; + autoActivate: boolean; }; interface DeploymentAddRevisionModalFormBodyProps { @@ -809,7 +811,7 @@ const DeploymentAddRevisionModalFormBody: React.FC< }, modelDefinition, extraMounts: extraMounts.length > 0 ? extraMounts : null, - options: { autoActivate: true }, + options: { autoActivate: values.autoActivate }, }, }, onCompleted: (_, errors) => { @@ -897,11 +899,15 @@ const DeploymentAddRevisionModalFormBody: React.FC< commandInitialDelay: 60, commandMaxRetries: 10, environ: [], + autoActivate: true, })} >