Skip to content

fix(FR-2622): add delete-folder option and trash notification on model card deletion#6881

Open
agatha197 wants to merge 1 commit intomainfrom
04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion
Open

fix(FR-2622): add delete-folder option and trash notification on model card deletion#6881
agatha197 wants to merge 1 commit intomainfrom
04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 22, 2026

Resolves #6841 (FR-2622)

Summary

  • Added vfolderId field to AdminModelCardListPageQuery so the model card's associated vfolder ID is available in the deletion flow.
  • Added AdminModelCardListPageDeleteVFolderMutation (deleteVfolderV2) to soft-delete (move to trash) the associated model folder.
  • Added alsoDeleteFolder state (default false) that resets when the deletion dialog closes.
  • Added an opt-in Checkbox (wrapped in Tooltip) to the single-delete BAIDeleteConfirmModal via the extraContent prop, allowing admins to also trash the associated model folder in the same action.
  • Updated the onOk handler: when checked, deleteVfolderV2 is called after card deletion; both paths show a notification.success with a "Go to Data > Trash" action button navigating to /data?statusCategory=deleted (with folder filter when folder is also deleted).
  • Added new i18n keys under adminModelCard in en.json: AlsoDeleteModelFolder, AlsoDeleteModelFolderTooltip, ModelCardAndFolderDeleted, ModelCardDeletedFolderKept, GoToTrash.

Copilot AI review requested due to automatic review settings April 22, 2026 05:42
@github-actions github-actions Bot added area:ux UI / UX issue. area:i18n Localization labels Apr 22, 2026
@github-actions github-actions Bot added the size:L 100~500 LoC label Apr 22, 2026
Copy link
Copy Markdown
Contributor Author

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

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
9.01% (-0.02% 🔻)
1858/20614
🔴 Branches
8.18% (-0.02% 🔻)
1187/14514
🔴 Functions
5.3% (-0.01% 🔻)
296/5585
🔴 Lines
8.75% (-0.02% 🔻)
1750/20000
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴 hooks/index.tsx
51.72% (-3.35% 🔻)
36.59% (-2.89% 🔻)
35% (-3.46% 🔻)
51.41% (-3.07% 🔻)
🔴
... / WebUINavigate.tsx
0%
0% (-100% 🔻)
0% 0%

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from 4fe4032

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

Adds an optional “delete associated model folder” flow when deleting an admin model card, and replaces the plain success toast with a notification that can deep-link users to the Trash view.

Changes:

  • Added new adminModelCard.* i18n strings for the new checkbox/tooltip and deletion result notifications.
  • Updated AdminModelCardListPage delete confirmation modal to include an “also delete folder” checkbox and (optionally) run deleteVfolderV2, followed by a success notification with a “Go to Data > Trash” action.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
resources/i18n/en.json Adds new English strings for delete-folder option and trash navigation notification.
react/src/pages/AdminModelCardListPage.tsx Adds delete-folder checkbox, new vfolder delete mutation, and a post-delete trash notification with navigation.

Comment thread resources/i18n/en.json
Comment thread react/src/pages/AdminModelCardListPage.tsx Outdated
Comment thread react/src/pages/AdminModelCardListPage.tsx
@agatha197 agatha197 force-pushed the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch 6 times, most recently from 5a33b0a to 196618a Compare April 22, 2026 07:21
Comment thread resources/i18n/en.json
Comment thread react/src/pages/AdminModelCardListPage.tsx
@agatha197 agatha197 force-pushed the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch from 196618a to 2763cba Compare April 23, 2026 11:49
@agatha197 agatha197 requested a review from ironAiken2 April 23, 2026 11:49
@agatha197 agatha197 force-pushed the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch 2 times, most recently from 893816e to b61a8af Compare April 24, 2026 07:53
@agatha197 agatha197 requested a review from yomybaby April 24, 2026 08: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.

test을(를) 입력하여 확인하세요. The translated text seems a little awkward. 'Please enter <folder name> to delete.' How does that sound?

@agatha197 agatha197 force-pushed the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch from b61a8af to cbde122 Compare April 28, 2026 06:45
@agatha197 agatha197 requested a review from ironAiken2 April 28, 2026 06:46
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 28, 2026

Coverage report for ./packages/backend.ai-ui

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 4fe4032

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.

test을(를) 입력하여 확인하세요. The translated text seems a little awkward. 'Please enter <folder name> to delete.' How does that sound?

​Please check this comment

@agatha197 agatha197 force-pushed the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch from cbde122 to 4fe4032 Compare April 28, 2026 08:00
@agatha197 agatha197 requested a review from ironAiken2 April 28, 2026 08:02
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

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

3 participants