Skip to content

refactor(FR-2848): use DeleteFilled for permanent delete, DeleteOutlined for trash#7314

Merged
graphite-app[bot] merged 1 commit into
mainfrom
11-08-refactor_fr-2848_use_deletefilled_for_permanent_delete
May 8, 2026
Merged

refactor(FR-2848): use DeleteFilled for permanent delete, DeleteOutlined for trash#7314
graphite-app[bot] merged 1 commit into
mainfrom
11-08-refactor_fr-2848_use_deletefilled_for_permanent_delete

Conversation

@yomybaby
Copy link
Copy Markdown
Member

@yomybaby yomybaby commented May 8, 2026

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 DeleteOutlinedDeleteFilled (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 BAITrashBinIconDeleteFilled (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 BAITrashBinIconDeleteOutlined (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

  • 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.

Copilot AI review requested due to automatic review settings May 8, 2026 06:35
Copy link
Copy Markdown
Member Author

yomybaby commented May 8, 2026


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 May 8, 2026

Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)

Status Category Percentage Covered / Total
🔵 Lines 8.58% 361 / 4203
🔵 Statements 7.72% 410 / 5305
🔵 Functions 9.19% 94 / 1022
🔵 Branches 6.94% 362 / 5215
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/backend.ai-ui/src/components/baiClient/FileExplorer/ExplorerActionControls.tsx 0% 0% 0% 0% 29-276
packages/backend.ai-ui/src/components/baiClient/FileExplorer/FileItemControls.tsx 0% 0% 0% 0% 14-173
packages/backend.ai-ui/src/components/fragments/BAIArtifactRevisionDeleteButton.tsx 0% 0% 0% 0% 16-52
packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx 0% 0% 0% 0% 24-398
packages/backend.ai-ui/src/components/fragments/BAIVFolderDeleteButton.tsx 0% 0% 0% 0% 12-46
packages/backend.ai-ui/src/components/fragments/BAIVFolderDeleteButtonV2.tsx 0% 0% 0% 0% 12-47
Generated in workflow #472 for commit 305eab2 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.5% 1783 / 27402
🔵 Statements 5.37% 1978 / 36784
🔵 Functions 5.19% 296 / 5699
🔵 Branches 3.77% 1293 / 34255
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/components/AdminDeploymentPresetNodes.tsx 0% 0% 0% 0% 30-218
react/src/components/AutoScalingRuleList.tsx 0% 0% 0% 0% 58-390
react/src/components/AutoScalingRuleListLegacy.tsx 0% 0% 0% 0% 41-316
react/src/components/ContainerRegistryList.tsx 0% 0% 0% 0% 67-646
react/src/components/CustomizedImageList.tsx 0% 0% 0% 0% 49-519
react/src/components/DeploymentAccessTokensTab.tsx 0% 0% 0% 0% 58-361
react/src/components/DeploymentList.tsx 0% 0% 0% 0% 50-387
react/src/components/EndpointList.tsx 0% 0% 0% 0% 53-308
react/src/components/ErrorLogList.tsx 0% 0% 0% 0% 46-344
react/src/components/KeypairResourcePolicyList.tsx 0% 0% 0% 0% 53-459
react/src/components/ProjectResourcePolicyList.tsx 0% 0% 0% 0% 56-360
react/src/components/PrometheusQueryPresetNodes.tsx 0% 0% 0% 0% 32-289
react/src/components/ResourceGroupList.tsx 0% 0% 0% 0% 57-393
react/src/components/ResourcePresetList.tsx 0% 0% 0% 0% 51-266
react/src/components/RoleAssignmentTab.tsx 0% 0% 0% 0% 45-452
react/src/components/RolePermissionTab.tsx 0% 0% 0% 0% 44-169
react/src/components/ShellScriptEditModal.tsx 0% 0% 0% 0% 45-356
react/src/components/UserCredentialList.tsx 0% 0% 0% 0% 53-608
react/src/components/UserManagement.tsx 0% 0% 0% 0% 58-579
react/src/components/UserResourcePolicyList.tsx 0% 0% 0% 0% 53-364
react/src/components/VFolderNodes.tsx 0% 0% 0% 0% 48-679
react/src/components/VFolderNodesV2.tsx 0% 0% 0% 0% 58-358
react/src/pages/AIAgentPage.tsx 0% 0% 0% 0% 37-201
react/src/pages/AdminModelCardListPage.tsx 0% 0% 0% 0% 58-611
react/src/pages/EndpointDetailPage.tsx 0% 0% 0% 0% 128-1602
react/src/pages/ProjectAdminDeploymentsPage.tsx 0% 0% 0% 0% 37-162
react/src/pages/RBACManagementPage.tsx 0% 0% 0% 0% 50-214
Generated in workflow #472 for commit 305eab2 by the Vitest Coverage Report Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes destructive “permanent delete” affordances by switching UI delete icons from DeleteOutlined to DeleteFilled across multiple WebUI pages/components and the shared backend.ai-ui library stories/fragments.

Changes:

  • Replaced DeleteOutlined with DeleteFilled for delete actions in WebUI tables, lists, and action menus.
  • Updated delete icons in shared UI fragment(s) and Storybook stories to match the new convention.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
react/src/pages/ProjectAdminDeploymentsPage.tsx Uses DeleteFilled for deployment delete action icon.
react/src/pages/EndpointDetailPage.tsx Uses DeleteFilled for autoscaling rule delete icon in endpoint detail controls.
react/src/pages/AIAgentPage.tsx Uses DeleteFilled for AI agent delete menu item icon.
react/src/components/UserResourcePolicyList.tsx Uses DeleteFilled for user resource policy delete action icon.
react/src/components/UserCredentialList.tsx Uses DeleteFilled for credential delete action icon.
react/src/components/ShellScriptEditModal.tsx Uses DeleteFilled for script delete button icon.
react/src/components/ResourcePresetList.tsx Uses DeleteFilled for resource preset delete action icon.
react/src/components/ResourceGroupList.tsx Uses DeleteFilled for resource group delete action icon.
react/src/components/PrometheusQueryPresetNodes.tsx Uses DeleteFilled for Prometheus preset delete action icon.
react/src/components/ProjectResourcePolicyList.tsx Uses DeleteFilled for project resource policy delete action icon.
react/src/components/KeypairResourcePolicyList.tsx Uses DeleteFilled for keypair resource policy delete action icon.
react/src/components/ErrorLogList.tsx Uses DeleteFilled for “clear logs” action icon.
react/src/components/EndpointList.tsx Uses DeleteFilled for endpoint delete action icon.
react/src/components/DeploymentList.tsx Uses DeleteFilled for deployment delete action icon.
react/src/components/DeploymentAccessTokensTab.tsx Uses DeleteFilled for access token delete action icon.
react/src/components/CustomizedImageList.tsx Uses DeleteFilled for customized image delete control icon.
react/src/components/ContainerRegistryList.tsx Uses DeleteFilled for container registry delete action icon.
react/src/components/AutoScalingRuleListLegacy.tsx Uses DeleteFilled for legacy autoscaling rule delete button icon.
react/src/components/AutoScalingRuleList.tsx Uses DeleteFilled for autoscaling rule delete action icon.
packages/backend.ai-ui/src/components/fragments/BAIProjectTable.tsx Uses DeleteFilled for project purge icon in project table controls.
packages/backend.ai-ui/src/components/BAIDeleteConfirmModal.stories.tsx Updates Storybook examples to use DeleteFilled for delete buttons.
packages/backend.ai-ui/src/components/BAIConfirmModalWithInput.stories.tsx Updates Storybook custom icon example to DeleteFilled.

Comment thread react/src/pages/ProjectAdminDeploymentsPage.tsx
@yomybaby yomybaby force-pushed the 11-08-refactor_fr-2848_use_deletefilled_for_permanent_delete branch from bc81571 to a29d5b1 Compare May 8, 2026 08:23
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 8, 2026

Merge activity

…ned for trash (#7314)

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.
@graphite-app graphite-app Bot force-pushed the 11-08-refactor_fr-2848_use_deletefilled_for_permanent_delete branch from a29d5b1 to 305eab2 Compare May 8, 2026 08:28
@graphite-app graphite-app Bot merged commit 305eab2 into main May 8, 2026
12 checks passed
@graphite-app graphite-app Bot deleted the 11-08-refactor_fr-2848_use_deletefilled_for_permanent_delete branch May 8, 2026 08:29
@github-pages github-pages Bot temporarily deployed to github-pages May 8, 2026 08:30 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify trash icon semantics: filled = permanent delete, outlined = move to trash

2 participants