feat(FR-2846): move deployment delete into a more menu next to edit#7313
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
There was a problem hiding this comment.
Pull request overview
Moves the “Delete deployment” action out of the main action row and into a compact “More” (kebab) dropdown next to the Edit button in the deployment configuration header, while wiring up a Relay mutation + confirmation modal to perform the deletion and redirect afterward.
Changes:
- Add a new
button.Morei18n label for the icon-only “More” button. - Introduce a “More” dropdown menu that contains the Delete action and opens a confirmation modal requiring typed confirmation.
- Add a Relay
deleteModelDeploymentmutation flow with toast feedback and post-delete navigation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| resources/i18n/en.json | Adds the button.More translation key used for the dropdown button’s aria-label. |
| react/src/components/DeploymentConfigurationSection.tsx | Adds the kebab dropdown + delete confirmation modal and hooks up a Relay delete mutation with success/error handling and navigation. |
024fcd9 to
488cf4b
Compare
0b90d41 to
c9f5136
Compare
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
c9f5136 to
f66edd3
Compare
Merge activity
|
f66edd3 to
bcf58d0
Compare
488cf4b to
802c916
Compare
…7313) Resolves #7309(FR-2846) Stacked on #7312 (FR-2847): the `/admin-deployments/:deploymentId` route this PR's post-delete navigation depends on is added there. Merge bottom-up. ## Summary On the Deployment detail page, replaces the implicit Delete entry-point with an explicit `...` More dropdown next to the Edit button. Delete is moved into that menu and confirmed via `BAIConfirmModalWithInput` (typed-confirmation), navigating back to the appropriate list (`/admin-deployments` for admin context, `/deployments` otherwise) on success. ## Changes - `react/src/components/DeploymentConfigurationSection.tsx` - Add `Dropdown` (More menu) next to Edit in the Basic Information `BAICard` `extra` slot. - Add `DeploymentConfigurationSectionDeleteMutation` (uniquely named to avoid clashing with `DeploymentList.tsx`'s mutation, which is owned by FR-2848). - Use `BAIConfirmModalWithInput` with `confirmText = deploymentName` per `.claude/rules/destructive-confirmation.md`. - Disable Delete while deployment is in destroying states or while the mutation is in flight. - Navigate via `useWebUINavigate` + `useLocation` pathname check (works once stacked on FR-2847). - `resources/i18n/*.json` (21 files): add `button.More` translation key in every supported locale. ## Test Plan - [x] More button (`...`) renders to the right of Edit on the Basic Information card. - [x] Clicking Delete in the More menu opens `BAIConfirmModalWithInput`; OK is disabled until the user types the deployment name. - [x] On confirm, the mutation runs, success toast shows, and the user is navigated back to the list. - [x] When opened from `/admin-deployments/:id` (after FR-2847 merges), navigation lands on `/admin-deployments`. - [x] Failed mutation shows error toast. - [x] All 21 locales include `button.More`. - [x] `bash scripts/verify.sh`: Relay PASS, Lint PASS, Format PASS. TypeScript fails only on pre-existing errors in `packages/backend.ai-client/src/client.ts` and `react/src/components/DeleteForeverVFolderModalV2.tsx` — both reproduce on a clean `main` checkout and are unrelated to this PR.
bcf58d0 to
f817651
Compare

Resolves #7309(FR-2846)
Stacked on #7312 (FR-2847): the
/admin-deployments/:deploymentIdroute this PR's post-delete navigation depends on is added there. Merge bottom-up.Summary
On the Deployment detail page, replaces the implicit Delete entry-point with an explicit
...More dropdown next to the Edit button. Delete is moved into that menu and confirmed viaBAIConfirmModalWithInput(typed-confirmation), navigating back to the appropriate list (/admin-deploymentsfor admin context,/deploymentsotherwise) on success.Changes
react/src/components/DeploymentConfigurationSection.tsxDropdown(More menu) next to Edit in the Basic InformationBAICardextraslot.DeploymentConfigurationSectionDeleteMutation(uniquely named to avoid clashing withDeploymentList.tsx's mutation, which is owned by FR-2848).BAIConfirmModalWithInputwithconfirmText = deploymentNameper.claude/rules/destructive-confirmation.md.useWebUINavigate+useLocationpathname check (works once stacked on FR-2847).resources/i18n/*.json(21 files): addbutton.Moretranslation key in every supported locale.Test Plan
...) renders to the right of Edit on the Basic Information card.BAIConfirmModalWithInput; OK is disabled until the user types the deployment name./admin-deployments/:id(after FR-2847 merges), navigation lands on/admin-deployments.button.More.bash scripts/verify.sh: Relay PASS, Lint PASS, Format PASS. TypeScript fails only on pre-existing errors inpackages/backend.ai-client/src/client.tsandreact/src/components/DeleteForeverVFolderModalV2.tsx— both reproduce on a cleanmaincheckout and are unrelated to this PR.