Skip to content

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

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion
May 7, 2026
Merged

fix(FR-2622): add delete-folder option and trash notification on model card deletion#6881
graphite-app[bot] merged 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
8.11% (-0% 🔻)
1859/22932
🔴 Branches
7.34% (-0.01% 🔻)
1187/16168
🔴 Functions
4.82% (+0.01% 🔼)
297/6161
🔴 Lines
7.88% (-0% 🔻)
1750/22217

Test suite run success

865 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from 19752e5

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 Outdated
@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 19752e5

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

@agatha197 agatha197 force-pushed the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch from 4fe4032 to 6d6f443 Compare April 30, 2026 04:34
@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 19752e5 to 6f30d94 Compare May 4, 2026 23:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 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/BAIDeleteConfirmModal.tsx 0% 0% 0% 0% 9-134
Generated in workflow #421 for commit 6eaccdb by the Vitest Coverage Report Action

@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.52% 1783 / 27337
🔵 Statements 5.39% 1978 / 36668
🔵 Functions 5.2% 296 / 5691
🔵 Branches 3.78% 1293 / 34141
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/components/AdminModelCardSettingModal.tsx 0% 0% 0% 0% 72-210
react/src/components/ModelCardDrawer.tsx 0% 0% 0% 0% 43-348
react/src/pages/AdminModelCardListPage.tsx 0% 0% 0% 0% 59-571
Generated in workflow #421 for commit 6eaccdb by the Vitest Coverage Report Action

@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 aa20978 to 2e8fa5b Compare May 6, 2026 02:28
@agatha197 agatha197 force-pushed the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch 3 times, most recently from 6f6bf8c to 34262a5 Compare May 7, 2026 05:13
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 7, 2026

Merge activity

…l card deletion (#6881)

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`.
@graphite-app graphite-app Bot force-pushed the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch from 34262a5 to 6eaccdb Compare May 7, 2026 07:20
graphite-app Bot pushed a commit that referenced this pull request May 7, 2026
Resolves #6841 (FR-2622)

Stacked on top of #6881.

## Summary

Translates the 5 new `adminModelCard.*` i18n keys introduced in #6881 into all 20 target languages (de, el, es, fi, fr, id, it, ja, ko, mn, ms, pl, pt-BR, pt, ru, th, tr, vi, zh-CN, zh-TW).

Keys translated:
- `AlsoDeleteModelFolder`
- `AlsoDeleteModelFolderTooltip`
- `GoToTrash`
- `ModelCardAndFolderDeleted`
- `ModelCardDeletedFolderKept`

Terminology kept consistent with existing translations (e.g., "trash" → 휴지통 / ゴミ箱 / Papierkorb / Poubelle, "model card" → 모델 카드 / モデルカード). Keys inserted at the alphabetically correct position within `adminModelCard`.
@graphite-app graphite-app Bot merged commit 6eaccdb into main May 7, 2026
12 checks passed
@graphite-app graphite-app Bot deleted the 04-22-fix_fr-2622_add_delete-folder_option_and_trash_notification_on_model_card_deletion branch May 7, 2026 07:23
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