Skip to content

[27/33] The trash, seen: a screen for it, and the settings that govern it - #416

Merged
vikramsoni2 merged 1 commit into
nxzai:mainfrom
cerede2000:upstream-27-trash-screen
Sep 26, 2026
Merged

vikramsoni2 merged 1 commit into
nxzai:mainfrom
cerede2000:upstream-27-trash-screen

Conversation

@cerede2000

Copy link
Copy Markdown

Batch 27 of the plan in #373: the trash, seen. Branched from main and 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

  • A screen that lists what you deleted, newest first, with where it came from, who deleted it, when, when it will be removed for good, and what it costs. A deleted folder opens, so one file can be taken back out of it without restoring the whole thing.
  • Restore, delete for good, empty. Emptying asks first. Restoring puts an item back where it came from, taking the next free name rather than replacing whatever has taken its own since ([18/33] Never let a file operation replace or merge into what holds a name #404).
  • An unreachable item is shown as unreachable, with the reason, rather than hidden: a volume that is not mounted any more should not make a trash look empty.
  • Share links follow. Links suspended with the item are restored or dropped, which the dialog asks about when there are any.
  • Settings for an administrator, at Settings → Trash and versions: whether deleting goes to the trash, the retention, the share of the volume it may take and a size cap — and the same for the versions kept in the same space. The server has answered both sections since they landed; the settings store now carries them.

Notes for review

  • Two things are deliberately left to 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, batch 26), and restoring into a chosen folder rather than where the item came from (it wants the destination dialog, which comes with the file operations). Neither is referenced anywhere in this batch.
  • features now 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.
  • One helper was added to utils (formatLocalDateTime), used by both screens.
  • The fifteen catalogues carry the strings; nothing here is untranslated.

How it was checked

On main at 7b07337, Node 24 as the CI and the image use:

  • the frontend bundles and every backend module loads;
  • the backend suite is unchanged — the same two failures main gives on its own in a full run, nothing new;
  • the image was built and driven in a browser: a file deleted through the API appears in the trash with its original location and its removal date, the sidebar offers the way in, restoring from the screen puts the file back in its folder and says so, and Settings → Trash and versions renders both sections with the values in force. Screenshots in the pull request thread.

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.
@vikramsoni2
vikramsoni2 merged commit 7ed4ccc into nxzai:main Sep 26, 2026
1 check passed
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.

2 participants