Skip to content

feat(delete): batch deletion with phase-aware progress - #9

Open
wansanai wants to merge 2 commits into
devlive-community:devfrom
wansanai:codex/batch-delete-progress
Open

wansanai wants to merge 2 commits into
devlive-community:devfrom
wansanai:codex/batch-delete-progress

Conversation

@wansanai

@wansanai wansanai commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add provider-level batch deletion (delete_objects) for S3-compatible storage, Aliyun OSS, Huawei OBS, and Tencent COS, so selected objects are deleted in provider-sized batches instead of one request per key.
  • Add batch deletion for explicitly selected paths, plus a 20,000-object fail-closed guard for recursive folder deletion; users must explicitly opt in to streaming unbounded deletion.
  • Report phase-aware progress (preparing → deleting_files → cleaning_directories) through coalesced delete-progress events (100 ms), with per-phase counts, batch-boundary cancellation, and a failure dialog that samples up to five errors.

Verification

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-features
  • cd app && pnpm build

Replace serial per-object deletion with provider delete_batch/max_delete_batch: S3-compatible vendors use DeleteObjects, Aliyun/Huawei/Tencent use their native multi-delete APIs, and B2/UPYUN fall back to bounded concurrency.

Recursive deletion now fails closed at 20k objects by default, supports an explicit streaming override, preserves directory markers when any file fails, reports partial-failure summaries, and is cancellable from the transfer panel.
Replace the flat done/total delete event with a tagged stream: preparing reports scanned entries, deleting_files carries file-phase counts plus discovered/failed, and cleaning_directories covers directory markers and the root marker.

Recursive deletion now shows preparation progress before any object is removed, keeps the transfer row in a waiting state at the 20k guard, and reuses that row for the explicit streaming pass. Cancellation reports 'cancelling' until the backend reaches a batch boundary. The transfer panel renders indeterminate preparation, phase-local counts, live failures, and the final deleted/failed summary, with a failure-detail dialog for the recorded samples.

Throttle events to 100ms in the Tauri adapter while always delivering phase transitions and the final frame. Stale delete transfer records are dropped on restore because their persisted shape lacks failure counts and would overstate successful deletions.
@wansanai wansanai changed the title Codex/batch delete progress feat(delete): batch deletion with phase-aware progress Nov 13, 2026

This branch has not been deployed

No deployments
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.

1 participant