Skip to content

fix: keep deleted files up to date and don't restore items restored elsewhere - #4283

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/trash-sse-and-stale-restore
Nov 9, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/trash-sse-and-stale-restore

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

  • Live updates: an open Deleted files view now picks up items that get deleted or restored elsewhere (another tab or client), and the trash overview marks a space once something is deleted in it.
  • Items restored elsewhere: restoring an item that was already restored elsewhere no longer asks about a name conflict and then reports a success that didn't happen. It shows an error and drops the item from the list instead. This needs no extra request, the restored file keeps its id, so the existing conflict check recognizes it.

Permanently deleting a trash item sends no event, so another open tab doesn't drop it live. Restoring it there shows the usual restore error, like before.

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest), browser tests (Playwright) against a local OpenCloud
  • test case 1: unit: trash and restore events update the trash view of the event's space only, incl. selection and loading the single new item through the request queue
  • test case 2: unit: restoring an item that was already restored shows an error and skips the conflict dialog, a different file with the same name still shows it
  • test case 3: browser: two tabs on the trash (personal and project space): restores and deletes in one show up in the other within about 250 ms, also for 10 deletes at once (desktop and Pixel 7)
  • test case 4: browser: restoring a stale item (live updates blocked) shows the error instead of the conflict dialog and false success, mixed selections restore the rest
  • test case 5: browser: real conflicts with Keep both, purged items, the trash overview marker, normal restore and undo after delete

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear force-pushed the fix/trash-sse-and-stale-restore branch from 4d6ce93 to 9ccc18d Compare November 9, 2026 11:32
@AlexAndBear
AlexAndBear merged commit 681e564 into main Nov 9, 2026
28 checks passed
@AlexAndBear
AlexAndBear deleted the fix/trash-sse-and-stale-restore branch November 9, 2026 12:28
@openclouders openclouders mentioned this pull request Nov 9, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants