Feature/soft delete trash - #123
Open
ParnianHajian wants to merge 9 commits into
Open
Conversation
…tend-React into feature/soft-delete-trash
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.
Recycle bin for the file explorer
Soft delete instead of hard delete. Deleting a file now moves it into
trash/at the pod root instead of nuking it; you can restore it back to its exact original location (ACL and all), permanently delete it, or just leave it and it'll get cleaned up automatically after 30 days.What's included
Soft delete moves a file's payload and metadata into
trash/<uuid>/, snapshots its ACL verbatim, writes an Activity-Streams tombstone recording when it was deleted, where it came from, and when it expires, then revokes the original. Restore puts it back at its exact original URI with the ACL restored from that snapshot, and just refuses if something's already occupying that spot rather than clobbering it. Permanent delete works one row at a time or all at once through "Empty recycle bin." Anything past its 30-day retention window gets purged the moment the bin is opened, so there's no server-side scheduler involved.New infrastructure
trashPaths,tombstone,resourceCopy,containerListingaclSnapshot(verbatim ACL capture/restore),wacAllow(permission check)softDeleteFile,restoreTrashedFile,deleteResource(updated),fileFilter(updated)useTrashEntries,useGuardedSoftDeleteTrashView/TrashTable, wired intoNavRail,SelectionActions,FileCardAlso included is a schema.org vocabulary migration (
eeb064e) that replaces the project's old customw3id.org/solid-drive#file-type vocabulary with real schema.org terms. It's unrelated to the trash feature but was already sitting on this branch, so I kept it as its own commit in case you'd rather it land separately.Test plan
npm run test:coveragepassesnpm run test:e2e -- e2e/tests/trash.spec.tspasses (7 scenarios against a real CSS instance):npm run test:e2efull suite pass