Commit 305eab2
committed
Resolves #7311(FR-2848)
## Summary
Standardize trash-bin icon semantics across the entire WebUI:
- **`DeleteFilled`** = permanent / irreversible delete
- **`DeleteOutlined`** = move to trash / soft delete / reversible form-row removal
This is an icon-only refactor. No behavior, mutation, confirmation modal, or i18n string is changed.
## Changes
### `BAITrashBinIcon` retirement
The custom `BAITrashBinIcon` (a filled silhouette SVG) was previously used for both reversible "Move to Trash" actions (e.g. `data.folders.MoveToTrash`) and irreversible "Delete forever" actions, which made the two visually indistinguishable. It is now replaced everywhere by the standard antd `DeleteOutlined` / `DeleteFilled` pair so the semantic is unambiguous at a glance.
The `BAITrashBinIcon` component file itself is **kept** in `backend.ai-ui` for potential future use as a "Trash location" indicator (page header, tab label, sidebar destination), but no longer has any active usage.
### Switched `DeleteOutlined` → `DeleteFilled` (permanent delete)
| File | Justification |
|---|---|
| `react/src/components/AutoScalingRuleList.tsx` | `DeleteAutoScalingRuleInput` mutation |
| `react/src/components/AutoScalingRuleListLegacy.tsx` | `delete_endpoint_auto_scaling_rule_node` |
| `react/src/components/ContainerRegistryList.tsx` | `BAIConfirmModalWithInput` typed-confirmation flow |
| `react/src/components/CustomizedImageList.tsx` | `untag_image_from_registry` |
| `react/src/components/DeploymentAccessTokensTab.tsx` | `DeploymentAccessTokensTabDeleteMutation` |
| `react/src/components/DeploymentList.tsx` | `DeleteDeploymentInput` |
| `react/src/components/EndpointList.tsx` | terminate endpoint |
| `react/src/components/ErrorLogList.tsx` | clear all error logs (irrecoverable from UI) |
| `react/src/components/KeypairResourcePolicyList.tsx` | policy delete |
| `react/src/components/ProjectResourcePolicyList.tsx` | policy delete |
| `react/src/components/PrometheusQueryPresetNodes.tsx` | preset delete |
| `react/src/components/ResourceGroupList.tsx` | resource group delete |
| `react/src/components/ResourcePresetList.tsx` | preset delete |
| `react/src/components/ShellScriptEditModal.tsx` | typed-confirmation delete |
| `react/src/components/UserCredentialList.tsx` | credential delete |
| `react/src/components/UserResourcePolicyList.tsx` | policy delete |
| `react/src/pages/AIAgentPage.tsx` | agent delete |
| `react/src/pages/EndpointDetailPage.tsx` | auto-scaling rule delete |
| `react/src/pages/ProjectAdminDeploymentsPage.tsx` | deployment delete |
### Switched `BAITrashBinIcon` → `DeleteFilled` (permanent delete)
| File | Justification |
|---|---|
| `packages/backend.ai-ui/src/components/fragments/BAIArtifactRevisionDeleteButton.tsx` | revision permanent delete (`reservoirPage.RemoveThisVersion`) |
| `packages/backend.ai-ui/src/components/baiClient/FileExplorer/FileItemControls.tsx` | single-file delete in VFolder file explorer (no trash for files) |
| `packages/backend.ai-ui/src/components/baiClient/FileExplorer/ExplorerActionControls.tsx` | bulk file delete in file explorer |
| `react/src/components/UserManagement.tsx` | `credential.PermanentlyDelete` + bulk delete |
| `react/src/components/AdminDeploymentPresetNodes.tsx` | preset delete (`button.Delete`) |
| `react/src/components/RoleAssignmentTab.tsx` | `rbac.RevokeUser` + danger button |
| `react/src/components/RolePermissionTab.tsx` | `rbac.RemovePermission` |
| `react/src/pages/AdminModelCardListPage.tsx` | model card delete + bulk delete |
| `react/src/pages/RBACManagementPage.tsx` | `rbac.PurgeRole` |
| `react/src/components/VFolderNodes.tsx` (line 205) | `data.folders.Delete` (delete-from-trash, permanent) |
| `react/src/components/VFolderNodesV2.tsx` (line 204) | `data.folders.Delete` (delete-from-trash, permanent) |
### Switched `BAITrashBinIcon` → `DeleteOutlined` (move to trash)
| File | Justification |
|---|---|
| `packages/backend.ai-ui/src/components/fragments/BAIVFolderDeleteButton.tsx` | always rendered under `Tooltip title="data.folders.MoveToTrash"` |
| `packages/backend.ai-ui/src/components/fragments/BAIVFolderDeleteButtonV2.tsx` | always rendered under `Tooltip title="data.folders.MoveToTrash"` |
| `react/src/components/VFolderNodes.tsx` (line 169) | `data.folders.MoveToTrash` row action |
| `react/src/components/VFolderNodesV2.tsx` (line 163) | `data.folders.MoveToTrash` row action |
### Files left unchanged (kept `DeleteOutlined`)
| File | Justification |
|---|---|
| `react/src/components/RoleFormModal.tsx` | `Form.List` row removal — reversible while form is unsubmitted |
| `react/src/components/ManageAppsModal.tsx` | `Form.List` row removal — reversible while form is unsubmitted |
| `packages/backend.ai-ui/src/components/Table/BAINameActionCell.stories.tsx` | abstract demo story; intentionally generic |
### Storybook
- `BAIConfirmModalWithInput.stories.tsx` and `BAIDeleteConfirmModal.stories.tsx` updated to use `DeleteFilled` so the trigger reflects the new convention (these modals exclusively front permanent-delete flows).
### Other
- `packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx` already uses `DeleteFilled` for the project Purge action (paired with a `BanIcon` for the reversible Inactivate). No icon change here, included for consistency reference.
## Out-of-scope follow-ups
The following call sites still use `Popconfirm` or `modal.confirm` for permanent deletion instead of `BAIConfirmModalWithInput`. They are flagged here for a follow-up; the icon swap is correct, but the modal type should also migrate per `.claude/rules/destructive-confirmation.md`:
- `AutoScalingRuleListLegacy.tsx` (Popconfirm L183-255)
- `UserCredentialList.tsx` (modal.confirm L413)
- `EndpointDetailPage.tsx` (Popconfirm L1115-1192)
- `AutoScalingRuleList.tsx` (modal.confirm L513)
- `ResourceGroupList.tsx` (modal.confirm L157)
- `BAIProjectTable.tsx` purge (uses `modal.confirm`)
## Test Plan
- [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.
- [ ] Visual spot-check on dev server: filled trash for permanent delete, outlined trash for move-to-trash.
1 parent f817651 commit 305eab2
35 files changed
Lines changed: 86 additions & 124 deletions
File tree
- packages/backend.ai-ui/src/components
- baiClient/FileExplorer
- fragments
- react/src
- components
- pages
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 120 | + | |
123 | 121 | | |
124 | 122 | | |
125 | 123 | | |
| |||
Lines changed: 8 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 54 | + | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
| |||
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 81 | + | |
90 | 82 | | |
91 | 83 | | |
92 | 84 | | |
| |||
121 | 113 | | |
122 | 114 | | |
123 | 115 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 116 | + | |
129 | 117 | | |
130 | 118 | | |
131 | 119 | | |
| |||
156 | 144 | | |
157 | 145 | | |
158 | 146 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 147 | + | |
164 | 148 | | |
165 | 149 | | |
166 | 150 | | |
| |||
219 | 203 | | |
220 | 204 | | |
221 | 205 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 206 | + | |
227 | 207 | | |
228 | 208 | | |
229 | 209 | | |
| |||
254 | 234 | | |
255 | 235 | | |
256 | 236 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
| 237 | + | |
262 | 238 | | |
263 | 239 | | |
264 | 240 | | |
| |||
290 | 266 | | |
291 | 267 | | |
292 | 268 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 269 | + | |
298 | 270 | | |
299 | 271 | | |
300 | 272 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | | - | |
| 112 | + | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
162 | | - | |
| 161 | + | |
163 | 162 | | |
164 | 163 | | |
165 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 15 | + | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
| |||
218 | 214 | | |
219 | 215 | | |
220 | 216 | | |
221 | | - | |
| 217 | + | |
222 | 218 | | |
223 | 219 | | |
224 | 220 | | |
| |||
0 commit comments