Skip to content

feat(FR-2622): add bulk vfolder trash support on model card bulk deletion#7135

Merged
graphite-app[bot] merged 1 commit into
mainfrom
04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion
May 7, 2026
Merged

feat(FR-2622): add bulk vfolder trash support on model card bulk deletion#7135
graphite-app[bot] merged 1 commit into
mainfrom
04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 28, 2026

Resolves #6841 (FR-2622)

Summary

Extends the FR-2622 single-card delete-with-folder UX to the bulk-delete flow on the Admin Model Card list page.

  • Add an opt-in "Also delete the associated model folders" checkbox to the bulk delete confirmation modal (matches the single-card modal copy/tooltip)
  • Wire a new Relay mutation bulkDeleteVfoldersV2 and call it after adminDeleteModelCardsV2 succeeds — passing the vfolderIds of the selected cards (skips cards with no vfolder)
  • After folders are moved to trash, replace the plain success message with a BAINotification whose action link navigates to Data > Trash (/admin-data?statusCategory=deleted). No name/id filter is applied in the bulk case — the trash tab is shown unfiltered, per design discussion
  • If the checkbox is left unchecked the existing BulkDeleteCompleted toast is preserved (no behavior change)
  • Add i18n keys to all 21 locales:
    • adminModelCard.AlsoDeleteModelFolders
    • adminModelCard.BulkDeleteModelCardsAndFoldersCompleted

Test plan

  • Bulk-delete N model cards without checkbox → toast {{count}} model card(s) have been deleted.
  • Bulk-delete N model cards with checkbox → notification with Go to Data > Trash link, navigates to /admin-data?statusCategory=deleted
  • Mix of cards with and without vfolders → only the cards that have vfolders are sent to bulkDeleteVfoldersV2
  • bash scripts/verify.sh — Relay / Lint / Format / TS all green

Checklist:

  • Documentation
  • Minimum required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Copy link
Copy Markdown
Contributor Author

agatha197 commented Apr 28, 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 Apr 28, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.09% (-0.01% 🔻)
1858/22962
🔴 Branches
7.34% (-0.01% 🔻)
1187/16182
🔴 Functions
4.8% (-0% 🔻)
296/6169
🔴 Lines
7.86% (-0.01% 🔻)
1749/22247

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from e32933e

@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from e643ef8 to cadbaf4 Compare April 28, 2026 10:45
@agatha197 agatha197 force-pushed the 04-22-test_fr-2652_add_e2e_tests_for_admin_model_card_deletion_with_folder_option branch from 5fa0945 to a6ec9e4 Compare April 28, 2026 10:45
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from cadbaf4 to ae5238f Compare April 30, 2026 04:34
@agatha197 agatha197 force-pushed the 04-22-test_fr-2652_add_e2e_tests_for_admin_model_card_deletion_with_folder_option branch from a6ec9e4 to 9b7b330 Compare April 30, 2026 04:34
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from ae5238f to e32933e Compare April 30, 2026 08:44
@agatha197 agatha197 force-pushed the 04-22-test_fr-2652_add_e2e_tests_for_admin_model_card_deletion_with_folder_option branch from 9b7b330 to 0fb1169 Compare April 30, 2026 08:44
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from e32933e to 4da91ad Compare May 4, 2026 23:57
Copilot AI review requested due to automatic review settings May 4, 2026 23:57
@agatha197 agatha197 force-pushed the 04-22-test_fr-2652_add_e2e_tests_for_admin_model_card_deletion_with_folder_option branch from 0fb1169 to f3f75f2 Compare May 4, 2026 23:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.51% 1783 / 27366
🔵 Statements 5.38% 1978 / 36712
🔵 Functions 5.19% 296 / 5695
🔵 Branches 3.78% 1293 / 34174
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/pages/AdminModelCardListPage.tsx 0% 0% 0% 0% 59-612
Generated in workflow #423 for commit 85ac648 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

Extends the admin Model Card management flow so bulk deletion can optionally move associated model folders to trash and surface a trash-navigation notification. In the WebUI, this mainly touches the admin list page flow, GraphQL schema shape, and localized copy for the new bulk-delete option/message.

Changes:

  • Adds a bulk-delete checkbox for also trashing associated model folders and switches the success UX to a trash-link notification when enabled.
  • Extends the model-card delete GraphQL API shape with delete options for single and bulk operations.
  • Adds the new bulk-delete checkbox/message translations across all shipped locales.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
resources/i18n/zh-TW.json Adds Traditional Chinese strings for the bulk folder-delete option and completion message.
resources/i18n/zh-CN.json Adds Simplified Chinese strings for the new bulk delete flow.
resources/i18n/vi.json Adds Vietnamese strings for bulk card+folder deletion.
resources/i18n/tr.json Adds Turkish strings for the new checkbox and notification.
resources/i18n/th.json Adds Thai strings for the bulk folder-delete UX.
resources/i18n/ru.json Adds Russian strings for the new bulk delete behavior.
resources/i18n/pt.json Adds Portuguese strings for the bulk folder-delete flow.
resources/i18n/pt-BR.json Adds Brazilian Portuguese strings for bulk card+folder deletion.
resources/i18n/pl.json Adds Polish strings for the new bulk delete option/message.
resources/i18n/ms.json Adds Malay strings for the bulk folder-delete UX.
resources/i18n/mn.json Adds Mongolian strings for the new bulk delete flow.
resources/i18n/ko.json Adds Korean strings for the bulk folder-delete option and completion notification.
resources/i18n/ja.json Adds Japanese strings for the new bulk delete behavior.
resources/i18n/it.json Adds Italian strings for the bulk folder-delete flow.
resources/i18n/id.json Adds Indonesian strings for the new checkbox and completion message.
resources/i18n/fr.json Adds French strings for bulk card+folder deletion.
resources/i18n/fi.json Adds Finnish strings for the new bulk delete UX.
resources/i18n/es.json Adds Spanish strings for the bulk folder-delete flow.
resources/i18n/en.json Adds English source strings for the new bulk delete option and success notification.
resources/i18n/el.json Adds Greek strings for the bulk card+folder deletion flow.
resources/i18n/de.json Adds German strings for the new bulk delete behavior.
react/src/pages/AdminModelCardListPage.tsx Wires single/bulk delete options into the admin model-card page and updates success notifications.
data/schema.graphql Extends the delete mutations/input types with model-folder deletion options.

Comment thread react/src/pages/AdminModelCardListPage.tsx
Comment thread react/src/pages/AdminModelCardListPage.tsx
Comment thread react/src/pages/AdminModelCardListPage.tsx
Comment thread react/src/pages/AdminModelCardListPage.tsx Outdated
Comment thread react/src/pages/AdminModelCardListPage.tsx
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from 4da91ad to 85dc355 Compare May 5, 2026 00:21
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from f0581a3 to 8894927 Compare May 6, 2026 10:03
@agatha197 agatha197 force-pushed the 04-22-fix_fr-2651_list_all_model-store_folders_when_creating_a_model_card branch from 626b227 to 02162cd Compare May 6, 2026 10:03
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch 2 times, most recently from e207206 to 11b42d3 Compare May 6, 2026 13:41
@agatha197 agatha197 marked this pull request as ready for review May 6, 2026 13:45
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch 2 times, most recently from 0b157d0 to db4b128 Compare May 7, 2026 04:59
@agatha197 agatha197 force-pushed the 04-22-fix_fr-2651_list_all_model-store_folders_when_creating_a_model_card branch from 02162cd to 322164b Compare May 7, 2026 04:59
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch 3 times, most recently from 83f7633 to f498d07 Compare May 7, 2026 05:13
@agatha197 agatha197 force-pushed the 04-22-fix_fr-2651_list_all_model-store_folders_when_creating_a_model_card branch from 322164b to e51f387 Compare May 7, 2026 05:13
Comment thread react/src/pages/AdminModelCardListPage.tsx
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from f498d07 to b21692f Compare May 7, 2026 05:57
@agatha197 agatha197 force-pushed the 04-22-fix_fr-2651_list_all_model-store_folders_when_creating_a_model_card branch from e51f387 to 6d3024a Compare May 7, 2026 05:57
@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from b21692f to 5523115 Compare May 7, 2026 06:00
@agatha197 agatha197 requested a review from nowgnuesLee May 7, 2026 06:00
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

image.png

The click area of the checkbox extends beyond the text, so it seems likely that people might click it by mistake.

@agatha197 agatha197 force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from 5523115 to ced2837 Compare May 7, 2026 07:07
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 7, 2026

Merge activity

…tion (#7135)

Resolves #6841 ([FR-2622](https://lablup.atlassian.net/browse/FR-2622))

## Summary

Extends the FR-2622 single-card delete-with-folder UX to the bulk-delete flow on the Admin Model Card list page.

- Add an opt-in **"Also delete the associated model folders"** checkbox to the bulk delete confirmation modal (matches the single-card modal copy/tooltip)
- Wire a new Relay mutation `bulkDeleteVfoldersV2` and call it after `adminDeleteModelCardsV2` succeeds — passing the `vfolderId`s of the selected cards (skips cards with no vfolder)
- After folders are moved to trash, replace the plain success message with a `BAINotification` whose action link navigates to **Data > Trash** (`/admin-data?statusCategory=deleted`). No name/id filter is applied in the bulk case — the trash tab is shown unfiltered, per design discussion
- If the checkbox is left unchecked the existing `BulkDeleteCompleted` toast is preserved (no behavior change)
- Add i18n keys to all 21 locales:
    - `adminModelCard.AlsoDeleteModelFolders`
    - `adminModelCard.BulkDeleteModelCardsAndFoldersCompleted`

## Test plan

- [ ] Bulk-delete N model cards without checkbox → toast `{{count}} model card(s) have been deleted.`
- [ ] Bulk-delete N model cards **with** checkbox → notification with **Go to Data > Trash** link, navigates to `/admin-data?statusCategory=deleted`
- [ ] Mix of cards with and without vfolders → only the cards that have vfolders are sent to `bulkDeleteVfoldersV2`
- [ ] `bash scripts/verify.sh` — Relay / Lint / Format / TS all green

**Checklist:**

- [ ] Documentation
- [ ] Minimum required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

[FR-2622]: https://lablup.atlassian.net/browse/FR-2622?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the 04-22-fix_fr-2651_list_all_model-store_folders_when_creating_a_model_card branch from 6d3024a to a3aede7 Compare May 7, 2026 07:21
@graphite-app graphite-app Bot force-pushed the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch from ced2837 to 85ac648 Compare May 7, 2026 07:22
Base automatically changed from 04-22-fix_fr-2651_list_all_model-store_folders_when_creating_a_model_card to main May 7, 2026 07:25
@graphite-app graphite-app Bot merged commit 85ac648 into main May 7, 2026
7 checks passed
@graphite-app graphite-app Bot deleted the 04-28-feat_fr-2622_add_bulk_vfolder_trash_support_on_model_card_bulk_deletion branch May 7, 2026 07:26
@github-pages github-pages Bot temporarily deployed to github-pages May 7, 2026 07:26 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to delete model folder alongside model card deletion, with post-deletion notification linking to trash tab

4 participants