Skip to content

Deleted files doesn't update in a second tab and restores items that are no longer in the trash bin #4280

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

An open "Deleted files" view doesn't update when items get deleted or restored elsewhere (another tab, another client). Restoring an item that was already restored elsewhere asks about a name conflict and then reports a success that didn't happen. The item-trashed and item-restored SSE handlers in packages/web-runtime/src/container/sse/files.ts only update folder views, never the trash list, and useFileActionsRestore only checks the target folder for name conflicts, not whether the trash item still exists. Permanently deleting a trash item sends no SSE event at all.

Reproduction Steps

  1. Open "Deleted files" of a space in two tabs
  2. In tab A, restore t1.txt and edit it
  3. In tab B, which still lists t1.txt, click Restore and choose Replace
  4. Delete another file in tab A or in another client and look at tab B

Expected Outcome

Tab B drops the restored item and shows newly deleted ones. Restoring an item that's no longer in the trash bin (e.g. purged elsewhere, which sends no event) shows an error.

Actual Outcome

Tab B keeps listing t1.txt and doesn't show the newly deleted file. Restore asks "File with name »t1.txt« already exists", and Replace says "t1.txt was restored successfully" while the file keeps its edited content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions