[27/33] The trash, seen: a screen for it, and the settings that govern it - #416
Merged
Merged
Conversation
The trash has been here since its engine landed: deleting moves an item into the volume's reserved space, it is restorable, it is swept on a schedule, and an administrator can configure a retention. None of it was visible. There was no way to see what had been deleted, no way to put something back, and the settings could be written only through the API — so the feature existed and nobody could use it. The screen lists what the signed-in person deleted, newest first, with where it came from, when it went and what it costs; a deleted folder opens, so a single file can be taken back out of it without restoring the whole thing. Selecting restores, or deletes for good, and emptying asks first. An item whose volume is not mounted any more is shown as unreachable rather than hidden, with the reason, because a trash that quietly drops things is worse than one that says it cannot reach them. Share links that were suspended with the item are restored or dropped, which the dialog asks about when there are any. Settings, for an administrator: whether deleting goes to the trash at all, how long it keeps things, what share of the volume it may take, and the same for the versions kept beside it — the server has been answering both sections since they landed, and the settings store now carries them. Left out on purpose, with the batches that bring what they need: reading the text of a file while it is still in the trash (it wants the text service), and restoring into a chosen folder rather than where the item came from (it wants the destination dialog). Restoring puts an item back where it was deleted from, without replacing anything that has taken its name since.
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.
Batch 27 of the plan in #373: the trash, seen. Branched from
mainand touching none of the files #410–#415 touch, so it can be merged in any order with them.The trash arrived with its engine in #405: deleting moves an item into the volume's reserved space, it is restorable, it is swept on a schedule, and an administrator can set a retention. None of that is visible. There is no way to see what was deleted, no way to put it back, and the settings can only be written through the API — the feature exists and nobody can use it.
What it does
Notes for review
featuresnow answers whether the trash is on to the client as well — the server already said so, nothing read it, so the way in could not be shown or hidden.utils(formatLocalDateTime), used by both screens.How it was checked
On
mainat 7b07337, Node 24 as the CI and the image use:maingives on its own in a full run, nothing new;