Skip to content

feat(dashboard): add batch deletion for skills - #9906

Merged
Soulter merged 5 commits into
AstrBotDevs:masterfrom
Ars1027:feat/skills-batch-delete
Sep 1, 2026
Merged

feat(dashboard): add batch deletion for skills#9906
Soulter merged 5 commits into
AstrBotDevs:masterfrom
Ars1027:feat/skills-batch-delete

Conversation

@Ars1027

@Ars1027 Ars1027 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Closes #8857

Problem

The Skills page currently supports deleting only one Skill at a time. Removing many local Skills requires users to repeat the same select, confirm, and delete flow for every item.

Skills provided by plugins or sandbox presets are read-only and must not be exposed to deletion.

Solution

This PR adds an opt-in batch selection mode to the installed Skills list.

It reuses the existing single-Skill deletion API and processes selected Skills sequentially. The list is refreshed once after all deletion attempts finish. This keeps the change frontend-only, avoids introducing a new API, and prevents a burst of concurrent deletion requests.

Failed deletions do not stop the remaining operations. Any retryable failed items remain selected after the batch completes.

Changes

  • Added a selection mode to the installed Skills list.
  • Added select-all, clear-selection, cancel, and delete-selected actions.
  • Restricted selection to deletable local Skills.
  • Excluded plugin-provided and sandbox-preset Skills from batch selection.
  • Added a confirmation dialog showing the exact Skills to be deleted.
  • Added sequential deletion with per-item failure handling.
  • Refreshes the Skills list once after the batch completes.
  • Keeps failed items selected after partial failure.
  • Preserved the existing single-Skill deletion flow.
  • Added English, Simplified Chinese, and Russian UI strings.
  • Added focused tests for batch deletion behavior and backward compatibility.
  • Refined the confirmation list styling and success feedback.

Testing

Automated verification:

cd dashboard
node --test tests/*.test.mjs
corepack pnpm@10.28.2 run typecheck
corepack pnpm@10.28.2 run build
corepack pnpm@10.28.2 exec prettier --check src/components/extension/SkillsSection.vue tests/skillsBatchDelete.test.mjs

Results:

  • 44/44 Node tests passed.
  • Vue TypeScript checking passed.
  • Production Dashboard build passed.
  • Prettier formatting check passed.

Covered scenarios:

  • All selected Skills are deleted successfully.
  • Requests are executed sequentially.
  • A failed deletion does not prevent later deletions.
  • Failed and still-deletable Skills remain selected for retry.
  • Plugin-provided and sandbox-preset Skills cannot enter the deletion set.
  • Empty or stale selections cannot open a destructive confirmation.
  • Existing single-Skill deletion remains compatible.
  • A failed post-delete refresh preserves the load error without misleading success feedback.

Manual verification was also completed against an Ubuntu Docker deployment:

  • Entered and exited selection mode.
  • Selected deletable local Skills.
  • Confirmed the target list before deletion.
  • Deleted selected Skills successfully.
  • Verified read-only Skills were not selectable.
  • Verified the existing single-delete flow still worked.

Screenshots

Batch selection

Batch selection mode

Deletion confirmation

Batch deletion confirmation

Notes for Reviewer

  • Sequential deletion is intentional. It reuses the existing endpoint while avoiding concurrent filesystem mutations and sandbox synchronization calls.
  • The deletion targets are captured as a stable snapshot when the confirmation dialog opens.
  • The existing isReadOnlySourceSkill rule is reused so batch deletion follows the same source restrictions as single deletion.
  • This PR is intentionally limited to the Skills page. Plugin management is unchanged.
  • No backend API, public interface, generated API client, or dependency was added.
  • This is not a breaking change.

Checklist

  • This is NOT a breaking change.
  • The feature was discussed in [Feature]webui Need a multiple choice option #8857 and welcomed by a maintainer.
  • Verification steps and test results are provided above.
  • No new dependencies are introduced.
  • This change does not introduce malicious code.

Summary by Sourcery

Enable safe batch deletion of locally installed Skills from the Dashboard while preserving read-only protections and existing deletion behavior.

New Features:

  • Add opt-in batch selection and deletion for locally deletable installed Skills.
  • Provide select-all, clear, cancel, confirmation, and partial-failure retry interactions for batch deletion.

Enhancements:

  • Keep plugin-provided and sandbox-preset Skills read-only and excluded from batch deletion.
  • Preserve the existing single-Skill deletion flow while refreshing the list after batch operations.

Tests:

  • Add focused coverage for sequential batch deletion, failure handling, selection restrictions, refresh behavior, and single-deletion compatibility.

Chores:

  • Add localized batch-deletion interface strings and supporting selection icon styling.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. A confirmed batch operation calls the delete API for every selected skill, so a selection or implementation error can permanently remove multiple stored skills. Reverting the change stops future batch deletions but cannot restore skills already deleted; the impact is bounded to the selected records.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a38a2665e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dashboard/src/i18n/locales/ru-RU/features/extension.json Outdated
Comment thread dashboard/src/components/extension/SkillsSection.vue Outdated
@Ars1027

Ars1027 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 7e8288e1e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Soulter
Soulter merged commit 26e215b into AstrBotDevs:master Sep 1, 2026
21 checks passed
@Ars1027
Ars1027 deleted the feat/skills-batch-delete branch September 1, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]webui Need a multiple choice option

2 participants