feat(FR-2613): migrate VFolder trash lifecycle mutations to V2 GraphQL API#6817
Merged
graphite-app[bot] merged 1 commit intomainfrom Apr 30, 2026
Conversation
Contributor
Author
5 tasks
891cd89 to
9cf781b
Compare
fddd97a to
336251a
Compare
Contributor
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.9% (-0.08% 🔻) |
1859/20898 |
| 🔴 | Branches | 8.05% (-0.08% 🔻) |
1187/14740 |
| 🔴 | Functions | 5.24% (-0.04% 🔻) |
297/5671 |
| 🔴 | Lines | 8.63% (-0.08% 🔻) |
1750/20276 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | ... / DeleteForeverVFolderModalV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / DeleteVFolderModalV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / RestoreVFolderModalV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / VFolderNodesV2.tsx |
0% | 0% | 0% | 0% |
Test suite run success
865 tests passing in 40 suites.
Report generated by 🧪jest coverage report action from 7c822bb
9cf781b to
109d1fd
Compare
Contributor
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 81.87% | 429/524 |
| 🟡 | Branches | 70.43% | 362/514 |
| 🟡 | Functions | 76.86% | 93/121 |
| 🟢 | Lines | 83.19% | 391/470 |
Test suite run success
319 tests passing in 13 suites.
Report generated by 🧪jest coverage report action from 7c822bb
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the VFolder trash lifecycle UI from legacy REST mutations to the Strawberry V2 Relay mutations (manager ≥ 26.4.2), while intentionally keeping restore on the legacy REST path due to the missing restoreVfolderV2 mutation.
Changes:
- Switch VFolder list pages to new V2 components/fragments for delete (move-to-trash) and purge (delete forever).
- Add new V2 React components for VFolder nodes table and delete/purge modals using Relay
useMutation. - Extend
BAINameActionCellto support Popconfirm-gated actions and add new i18n strings for “delete forever” flows.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/i18n/en.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/ko.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/ja.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/zh-CN.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/zh-TW.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/de.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/el.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/es.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/fi.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/fr.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/id.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/it.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/mn.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/ms.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/pl.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/pt.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/pt-BR.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/ru.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/th.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/tr.json | Adds new translation keys for delete-forever confirmation + messages. |
| resources/i18n/vi.json | Adds new translation keys for delete-forever confirmation + messages. |
| react/src/pages/VFolderNodeListPage.tsx | Switches to V2 nodes + V2 delete/purge modals; adds bulk “Delete forever” action in trash view. |
| react/src/pages/AdminVFolderNodeListPage.tsx | Same as above for admin view. |
| react/src/components/VFolderNodesV2.tsx | New V2 table component using deleteVfolderV2/purgeVfolderV2 Relay mutations; restore stays on REST. |
| react/src/components/DeleteVFolderModalV2.tsx | New V2 bulk move-to-trash modal using bulkDeleteVfoldersV2. |
| react/src/components/DeleteForeverVFolderModalV2.tsx | New V2 bulk purge modal using bulkPurgeVfoldersV2 with input confirmation. |
| packages/backend.ai-ui/src/components/Table/BAINameActionCell.tsx | Adds popConfirm support for action buttons rendered in the name/action cell. |
109d1fd to
74ea66e
Compare
This was referenced Apr 21, 2026
336251a to
70f6fc0
Compare
74ea66e to
d38e445
Compare
5 tasks
agatha197
reviewed
Apr 22, 2026
agatha197
reviewed
Apr 22, 2026
agatha197
reviewed
Apr 22, 2026
agatha197
reviewed
Apr 22, 2026
agatha197
reviewed
Apr 22, 2026
agatha197
reviewed
Apr 22, 2026
6aa41ef to
89d9c8a
Compare
ccbb51f to
42e2427
Compare
89d9c8a to
795a7f5
Compare
42e2427 to
2ab0d52
Compare
795a7f5 to
e3deb1f
Compare
2ab0d52 to
6f4f7f0
Compare
e3deb1f to
671d373
Compare
6f4f7f0 to
1d95414
Compare
671d373 to
ef6dc35
Compare
ac4de81 to
7db3eb6
Compare
ef6dc35 to
6405784
Compare
6405784 to
ea1af20
Compare
7db3eb6 to
03cf13c
Compare
03cf13c to
99b663c
Compare
ea1af20 to
82e39a0
Compare
Member
Merge activity
|
…L API (#6817) Resolves #6816 (FR-2613) ## Summary Migrates the VFolder trash lifecycle mutations from the legacy REST API to the Strawberry V2 Relay mutations introduced in manager 26.4.2, per the FR-2572 epic guidance. - `vfolder.delete_by_id` → `deleteVfolderV2` (row-level soft-delete / move to trash) - Bulk move-to-trash (selection toolbar) → `bulkDeleteVfoldersV2` - `vfolder.delete_from_trash_bin` → `purgeVfolderV2` (row-level permanent purge) - Bulk purge (new selection toolbar action in trash view) → `bulkPurgeVfoldersV2` - Restore path intentionally **not** migrated: `restoreVfolderV2` is not yet present in the V2 schema — the row-level restore in `VFolderNodesV2` and the legacy `RestoreVFolderModal` keep using `baiClient.vfolder.restore_from_trash_bin`. A backend follow-up will be filed under FR-2572 to add the missing mutation. ## Changes ### New V2 components (created alongside legacy — legacy files untouched) - `react/src/components/VFolderNodesV2.tsx` - New fragment `VFolderNodesV2Fragment` (same shape as legacy) - Relay `useMutation` for `deleteVfolderV2` and `purgeVfolderV2` - Row-level move-to-trash uses `BAINameActionCell.popConfirm` for inline confirmation - Row-level purge uses `BAIConfirmModalWithInput` (type-folder-name-to-confirm) - `react/src/components/DeleteVFolderModalV2.tsx` - New fragment `DeleteVFolderModalV2Fragment` - Uses `bulkDeleteVfoldersV2` single mutation (server-side bulk); UI reports `deletedCount` / `total` and any folders excluded by permission - `react/src/components/DeleteForeverVFolderModalV2.tsx` *(new)* - New fragment `DeleteForeverVFolderModalV2Fragment` - Uses `bulkPurgeVfoldersV2` single mutation; wraps `BAIConfirmModalWithInput` with the localized confirm word (`삭제` / `delete`) ### Shared component update - `packages/backend.ai-ui/src/components/Table/BAINameActionCell.tsx` - Adds `popConfirm?: Omit<PopconfirmProps, 'children'>` to `BAINameActionCellAction` - Visible icon buttons are wrapped with `<Popconfirm>` when `popConfirm` is set - Overflow-menu items fall back to `Modal.confirm` mirroring the popConfirm title / description / okText / button props — confirmation UI is preserved in both visible and overflow states ### Consumer pages switched to V2 - `react/src/pages/VFolderNodeListPage.tsx` - `react/src/pages/AdminVFolderNodeListPage.tsx` - Query `...VFolderNodesFragment` → `...VFolderNodesV2Fragment`, `...DeleteVFolderModalFragment` → `...DeleteVFolderModalV2Fragment`, plus new `...DeleteForeverVFolderModalV2Fragment` - Trash view bulk toolbar: adds "Delete Forever" button (`BAIPurgeIcon`) next to the existing "Restore" button; opens `DeleteForeverVFolderModalV2` - `RestoreVFolderModal` and `...RestoreVFolderModalFragment` remain on legacy ### i18n - New keys under `data.folders.*`: `DeleteForeverConfirmText`, `DeleteForeverDescription`, `DeleteForeverMultipleDescription`, `MultipleFolderDeletedForever`, `TypeToConfirmDeleteForever`, `MoveToTrashRestoreHint` - Propagated to all 21 supported languages ### Intentionally untouched - `VFolderNodes.tsx`, `DeleteVFolderModal.tsx`, `RestoreVFolderModal.tsx` remain as-is for backward compatibility through the 26.4.x window. - `VFolderNodeDescription.tsx` still imports `statusTagColor` from the legacy `VFolderNodes`. ## Follow-up - Track the backend gap: file a request under FR-2572 for a `restoreVfolderV2` mutation. Once landed, create `RestoreVFolderModalV2` and switch the remaining restore paths off the legacy REST client. ## Verification \`bash scripts/verify.sh\` → \`=== ALL PASS ===\` (Relay / Lint / Format / TypeScript) **Checklist:** - [x] Legacy files untouched - [x] V2 components created with new fragment names - [x] Consumers switched to V2 for delete/purge (row-level + bulk) - [x] Restore path preserved on legacy REST (backend gap) - [x] verify.sh passes - [ ] Minimum manager version: 26.4.2 (for V2 mutations)
82e39a0 to
38fa50f
Compare
99b663c to
7c822bb
Compare
Base automatically changed from
04-16-feat_fr-2593_implement_vfolder_creation_modal_using_v2_graphql_mutation
to
main
April 30, 2026 03:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Resolves #6816 (FR-2613)
Summary
Migrates the VFolder trash lifecycle mutations from the legacy REST API to the Strawberry V2 Relay mutations introduced in manager 26.4.2, per the FR-2572 epic guidance.
vfolder.delete_by_id→deleteVfolderV2(row-level soft-delete / move to trash)bulkDeleteVfoldersV2vfolder.delete_from_trash_bin→purgeVfolderV2(row-level permanent purge)bulkPurgeVfoldersV2restoreVfolderV2is not yet present in the V2 schema — the row-level restore inVFolderNodesV2and the legacyRestoreVFolderModalkeep usingbaiClient.vfolder.restore_from_trash_bin. A backend follow-up will be filed under FR-2572 to add the missing mutation.Changes
New V2 components (created alongside legacy — legacy files untouched)
react/src/components/VFolderNodesV2.tsxVFolderNodesV2Fragment(same shape as legacy)useMutationfordeleteVfolderV2andpurgeVfolderV2BAINameActionCell.popConfirmfor inline confirmationBAIConfirmModalWithInput(type-folder-name-to-confirm)react/src/components/DeleteVFolderModalV2.tsxDeleteVFolderModalV2FragmentbulkDeleteVfoldersV2single mutation (server-side bulk); UI reportsdeletedCount/totaland any folders excluded by permissionreact/src/components/DeleteForeverVFolderModalV2.tsx(new)DeleteForeverVFolderModalV2FragmentbulkPurgeVfoldersV2single mutation; wrapsBAIConfirmModalWithInputwith the localized confirm word (삭제/delete)Shared component update
packages/backend.ai-ui/src/components/Table/BAINameActionCell.tsxpopConfirm?: Omit<PopconfirmProps, 'children'>toBAINameActionCellAction<Popconfirm>whenpopConfirmis setModal.confirmmirroring the popConfirm title / description / okText / button props — confirmation UI is preserved in both visible and overflow statesConsumer pages switched to V2
react/src/pages/VFolderNodeListPage.tsxreact/src/pages/AdminVFolderNodeListPage.tsx...VFolderNodesFragment→...VFolderNodesV2Fragment,...DeleteVFolderModalFragment→...DeleteVFolderModalV2Fragment, plus new...DeleteForeverVFolderModalV2FragmentBAIPurgeIcon) next to the existing "Restore" button; opensDeleteForeverVFolderModalV2RestoreVFolderModaland...RestoreVFolderModalFragmentremain on legacyi18n
data.folders.*:DeleteForeverConfirmText,DeleteForeverDescription,DeleteForeverMultipleDescription,MultipleFolderDeletedForever,TypeToConfirmDeleteForever,MoveToTrashRestoreHintIntentionally untouched
VFolderNodes.tsx,DeleteVFolderModal.tsx,RestoreVFolderModal.tsxremain as-is for backward compatibility through the 26.4.x window.VFolderNodeDescription.tsxstill importsstatusTagColorfrom the legacyVFolderNodes.Follow-up
restoreVfolderV2mutation. Once landed, createRestoreVFolderModalV2and switch the remaining restore paths off the legacy REST client.Verification
`bash scripts/verify.sh` → `=== ALL PASS ===` (Relay / Lint / Format / TypeScript)
Checklist: