Skip to content

Commit 1902adc

Browse files
committed
fix(FR-2825): standardize activate/deactivate confirmations to Popconfirm (#7371)
Resolves #7371 (FR-2825) ## Summary Standardize **reversible** activate/deactivate (soft-delete/restore) confirmations to use `Popconfirm` across the app, per `.claude/rules/destructive-confirmation.md`. `BAIConfirmModalWithInput` is reserved for irreversible hard-delete in FR-2819; this PR is the reversible-action counterpart. ## Popconfirm copy convention applied here - **Title** clearly states the action: e.g. `자격증명 비활성화`, `프로젝트 비활성화`, `역할 활성화`, `사용자 비활성화`. - **Body** shows only the target identifier (resource name, email, access key, revision number) — no verbose `"정말로 X를 비활성화 시키겠습니까?"` sentence. ## Changes ### `BAINameActionCell` actions migrated to `popConfirm` - `react/src/components/UserCredentialList.tsx` — keypair Activate / Deactivate (`record.user_id` as body). - `react/src/components/UserManagement.tsx` — user Activate / Deactivate (`record.email` as body). - `react/src/components/ResourceGroupList.tsx` — resource group Activate / Deactivate (`record.name` as body). - `react/src/pages/RBACManagementPage.tsx` — role Activate / Deactivate (`role.name` as body). - `react/src/components/DeploymentRevisionHistoryTab.tsx` — revision Deploy in table row (`#${revisionNumber}` as body). ### `<Popconfirm>` JSX wrappers tightened - `react/src/components/DeploymentRevisionHistoryTab.tsx` (drawer Deploy button) — body simplified to `#${revisionNumber}`. - `packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx` — body simplified from `"정말로 {{projectName}} 프로젝트를 비활성화 시키겠습니까?"` → `value?.name`. ### i18n cleanup - Removed unused `comp:BAIProjectTable.AreYouSureToDeactivateProject` (22 locales). - Removed unused `deployment.DeployConfirm` (22 locales). ## Test plan - [ ] Open **Users** → row action menu → Deactivate / Activate. Popconfirm title shows the action and body shows the email. Confirming flips the status. - [ ] Open **Credentials** (Active/Inactive tabs) → row action menu → Deactivate / Activate. Popconfirm title shows the action and body shows the user_id. - [ ] Open **Resource Groups** → row action menu → Deactivate / Activate. Popconfirm title shows the action and body shows the resource group name. - [ ] Open **Projects** (BAIProjectTable consumers, e.g. admin Project page) → row Deactivate button. Popconfirm title shows the action and body shows just the project name. - [ ] Open **RBAC** (`/rbac`) → role row action menu → Deactivate / Activate. Popconfirm title shows the action and body shows the role name. - [ ] Open a **Deployment** detail → Revisions tab → row action menu → Deploy. Popconfirm shows `#<revisionNumber>` as body. Same flow via the drawer Deploy button. - [ ] `bash scripts/verify.sh` — Relay / Lint / Format / TypeScript pass for the modified files. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 0ca1f8b commit 1902adc

27 files changed

Lines changed: 256 additions & 261 deletions

packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,7 @@ const BAIProjectTable = ({
143143
/>
144144
<Popconfirm
145145
title={t('comp:BAIProjectTable.DeactivateProject')}
146-
description={t(
147-
'comp:BAIProjectTable.AreYouSureToDeactivateProject',
148-
{
149-
projectName: value?.name,
150-
},
151-
)}
146+
description={value?.name}
152147
okButtonProps={{
153148
danger: true,
154149
loading: isInFlightCommitDeleteGroup,

packages/backend.ai-ui/src/locale/de.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
"UpdateProject": "Projekt aktualisieren"
215215
},
216216
"comp:BAIProjectTable": {
217-
"AreYouSureToDeactivateProject": "Möchten Sie das Projekt {{projectName}} wirklich deaktivieren?",
218217
"AreYouSureToPurgeProject": "Sind Sie sicher, dass Sie {{projectName}} endgültig löschen möchten? Diese Aktion ist unwiderruflich.",
219218
"ContainerRegistry": "Container-Registry",
220219
"Controls": "Steuerelemente",

packages/backend.ai-ui/src/locale/el.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
"UpdateProject": "Ενημέρωση έργου"
215215
},
216216
"comp:BAIProjectTable": {
217-
"AreYouSureToDeactivateProject": "Είστε βέβαιοι ότι θέλετε να απενεργοποιήσετε το έργο {{projectName}};",
218217
"AreYouSureToPurgeProject": "Είστε βέβαιοι ότι θέλετε να διαγράψετε οριστικά το {{projectName}}? Αυτή η ενέργεια είναι μη αναστρέψιμη.",
219218
"ContainerRegistry": "Αποθετήριο κοντέινερ",
220219
"Controls": "Έλεγχοι",

packages/backend.ai-ui/src/locale/en.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@
217217
"UpdateProject": "Update Project"
218218
},
219219
"comp:BAIProjectTable": {
220-
"AreYouSureToDeactivateProject": "Are you sure to deactivate project {{projectName}}?",
221220
"AreYouSureToPurgeProject": "Are you sure to purge {{projectName}}? This action is irreversible.",
222221
"ContainerRegistry": "Container Registry",
223222
"Controls": "Controls",

packages/backend.ai-ui/src/locale/es.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
"UpdateProject": "Actualizar proyecto"
215215
},
216216
"comp:BAIProjectTable": {
217-
"AreYouSureToDeactivateProject": "¿Está seguro de que desea desactivar el proyecto {{projectName}}?",
218217
"AreYouSureToPurgeProject": "¿Está seguro de que desea purgar {{projectName}}? Esta acción es irreversible.",
219218
"ContainerRegistry": "Registro de contenedores",
220219
"Controls": "Controles",

packages/backend.ai-ui/src/locale/fi.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
"UpdateProject": "Päivitä projekti"
215215
},
216216
"comp:BAIProjectTable": {
217-
"AreYouSureToDeactivateProject": "Haluatko varmasti poistaa projektin {{projectName}} käytöstä?",
218217
"AreYouSureToPurgeProject": "Haluatko varmasti poistaa {{projectName}}? Tämä toimenpide on peruuttamaton.",
219218
"ContainerRegistry": "Säiliörekisteri",
220219
"Controls": "Ohjaimet",

packages/backend.ai-ui/src/locale/fr.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
"UpdateProject": "Mettre à jour le projet"
215215
},
216216
"comp:BAIProjectTable": {
217-
"AreYouSureToDeactivateProject": "Voulez-vous vraiment désactiver le projet {{projectName}} ?",
218217
"AreYouSureToPurgeProject": "Voulez-vous vraiment purger {{projectName}}? Cette action est irréversible.",
219218
"ContainerRegistry": "Registre de conteneurs",
220219
"Controls": "Contrôles",

packages/backend.ai-ui/src/locale/id.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
"UpdateProject": "Perbarui Proyek"
215215
},
216216
"comp:BAIProjectTable": {
217-
"AreYouSureToDeactivateProject": "Anda yakin ingin menonaktifkan proyek {{projectName}}?",
218217
"AreYouSureToPurgeProject": "Apakah Anda yakin ingin menghapus {{projectName}}? Tindakan ini tidak dapat dibatalkan.",
219218
"ContainerRegistry": "Registri Kontainer",
220219
"Controls": "Kontrol",

packages/backend.ai-ui/src/locale/it.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
"UpdateProject": "Aggiorna progetto"
215215
},
216216
"comp:BAIProjectTable": {
217-
"AreYouSureToDeactivateProject": "Sei sicuro di voler disattivare il progetto {{projectName}}?",
218217
"AreYouSureToPurgeProject": "Sei sicuro di voler eliminare {{projectName}}? Questa azione è irreversibile.",
219218
"ContainerRegistry": "Registro dei container",
220219
"Controls": "Controlli",

packages/backend.ai-ui/src/locale/ja.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
"UpdateProject": "プロジェクトの更新"
215215
},
216216
"comp:BAIProjectTable": {
217-
"AreYouSureToDeactivateProject": "プロジェクト「{{projectName}}」を無効化してもよろしいですか?",
218217
"AreYouSureToPurgeProject": "本当に{{projectName}}を完全に削除しますか?この操作は取り消せません。",
219218
"ContainerRegistry": "コンテナレジストリ",
220219
"Controls": "操作",

0 commit comments

Comments
 (0)