feat: add trash UI for cloud view (consume /files/trash endpoints)#238
Merged
DenizAltunkapan merged 2 commits intoJun 15, 2026
Merged
Conversation
Adds a recycle-bin view listing trashed files (name, original location, deleted date, size) with restore and permanent-delete (confirm dialog) actions, plus a Trash entry point in the cloud toolbar. Consumes the GET/POST/DELETE /files/trash endpoints from cloud-page#79. Restore conflicts (a file already exists at the original path) are surfaced gracefully.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a Trash feature to the Cloud UI, including API methods and a standalone Trash page for listing, restoring, and permanently deleting items.
Changes:
- Added
TrashEntryDtoand newCloudServiceendpoints for trash list/restore/purge. - Introduced a standalone
TrashComponent(TS/HTML/SCSS) to display and manage trash entries. - Added navigation from Cloud page to Trash and registered a new
/cloud/trashroute.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/app/services/cloud.service.ts | Adds HTTP methods to list/restore/purge trash entries. |
| frontend/src/app/pages/cloud/trash/trash.component.ts | New Trash page logic (loading, restore/purge actions, error handling). |
| frontend/src/app/pages/cloud/trash/trash.component.html | New Trash page template with table + actions. |
| frontend/src/app/pages/cloud/trash/trash.component.scss | New styles for Trash page layout/states. |
| frontend/src/app/pages/cloud/cloud.component.ts | Adds navigation method to open Trash. |
| frontend/src/app/pages/cloud/cloud.component.html | Adds “Trash” button in Cloud header actions. |
| frontend/src/app/models/dtos/TrashEntryDto.ts | New DTO for trash entries. |
| frontend/src/app/app.routes.ts | Registers /cloud/trash route (guarded). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…style Review follow-up: formatFileSize now clamps the unit index (and adds TB/PB) so sizes >= 1 TB render correctly; the icon-only permanent-delete button gets an aria-label; the cloud header actions move their inline flex styles into the stylesheet.
Contributor
Author
|
Addressed the Copilot comments in
Left two as-is, for consistency with the existing code:
Separately, restore conflicts now get a clean |
DenizAltunkapan
approved these changes
Jun 15, 2026
DenizAltunkapan
left a comment
Member
There was a problem hiding this comment.
@GabrielBBaldez Thank you very much 😄
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.
Closes #237.
Adds the cloud-page trash view that consumes the per-user trash endpoints from Vault-Web/cloud-page#79.
What's included
CloudServicemethods for the three endpoints (GET /files/trash,POST /files/trash/{id}/restore,DELETE /files/trash/{id}) plus aTrashEntryDtomodel (id,name,originalPath,deletedAt,size).TrashComponent(route/cloud/trash, behindauthGuard): a table of trashed entries (name, original location, deleted date, size) with Restore and permanent-delete actions; permanent delete asks for confirmation. Loading / error / empty states included.Notes
FileAlreadyExistsExceptionisn't mapped to 409); the UI handles both that and a future 409, so it degrades gracefully either way. Happy to send a one-line follow-up on cloud-page#79 mapping it to 409 for a cleaner contract.ng build(AOT + strict templates) and Prettier.