Skip to content

fix: only undo the latest deletion with Ctrl+Z - #3949

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/undo-last-deletion-only
Oct 21, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/undo-last-deletion-only

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Description

  • One binding: only the latest deletion binds Ctrl+Z. A new deletion removes the Ctrl+Z bindings of earlier ones, so one Ctrl+Z no longer restores every deletion whose toast is still open.
  • Order-safe: the latest deletion is the latest one started, not the one that finished last. An earlier deletion that finishes later doesn't take Ctrl+Z over.
  • Toasts unchanged: every deletion keeps its toast with the Undo button, so all of them can still be restored one by one.

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest), browser tests (Playwright) against a local OpenCloud
  • test case 1: unit: one Ctrl+Z after two/three deletions restores only the latest; earlier deletions finishing later or across several spaces; deletions without undo; Ctrl+Z after the toast timeout
  • test case 2: browser: reproduced on main (one Ctrl+Z restored both files), fixed on this branch in the personal space and a project space; server state and trash checked via WebDAV
  • test case 3: browser: after two quick deletions both Undo buttons restore their files, in both orders; a batch deletion is restored with one Ctrl+Z; folders; three deletions; Ctrl+Z in the search field does nothing; no console errors

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 merged commit 9f11e21 into main Oct 21, 2026
28 checks passed
@AlexAndBear
AlexAndBear deleted the fix/undo-last-deletion-only branch October 21, 2026 09:00
@openclouders openclouders mentioned this pull request Oct 21, 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.

One Ctrl+Z after two quick deletions restores both

2 participants