feat(edge-storage): add recursive folder deletion support#3385
Open
marcusgrando wants to merge 4 commits intodevfrom
Open
feat(edge-storage): add recursive folder deletion support#3385marcusgrando wants to merge 4 commits intodevfrom
marcusgrando wants to merge 4 commits intodevfrom
Conversation
Enable users to select and delete folders recursively in the Object Storage file browser. Folders can be deleted via checkbox batch selection or individual row action menu. Key changes: - Add deleteRecursiveBucketFolder service method (list-all-then-delete) - Update deleteMultipleFiles composable for mixed file+folder selection - Enable folder checkbox selection in folder-list table - Hide Download/Move bulk actions when folders are selected - Add folder Delete row action with adaptive confirmation dialogs - Show two-phase progress: indeterminate listing, then percentage delete
…tants - Extract EDGE_STORAGE_DELETE_STEP constants for 'listing'/'deleting' steps - Replace stringly-typed step comparisons across service, composable, and component - Consolidate duplicated state cleanup into finally block in deleteMultipleFiles - Remove redundant totalDeleteItems assignment from onFileProgress callback - Extract buildObjectKey helper to eliminate folderPath prefix duplication
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
Previously, users had to navigate into each folder and manually delete files page by page. There was no way to select or delete a folder and its contents in one operation. This change removes that friction.
How it works
Service layer (
edge-storage-service.js)New
deleteRecursiveBucketFolder(bucketName, prefix, onProgress)method that:all_levels=true, paginating through all pages first (collecting keys into an array)This two-phase approach (list-all-then-delete) avoids skipping objects that would happen if we interleaved listing and deleting on a mutating collection.
Composable layer (
useEdgeStorage.js)deleteMultipleFilesnow acceptsArray<{ name, isFolder }>instead ofstring[]:deleteMultipleEdgeStorageBucketFilesdeleteRecursiveBucketFolderNew refs (
currentProcessStep,discoveredItemsCount,totalDeleteItems) support the two-phase progress UI.UI changes
showActionsallows the action menu on folders,DownloadandMovebulk buttons are hidden when any folder is in the selectionvisibleActionto show onlyDeletefor folders (no Download/Rename/Move). NewhandleDeleteFolderfor single-folder deletion.handleDeleteSelectedItemsbuilds adaptive dialog messages based on selection compositionTest plan