UI + UX Error Prevention And Recovery established

Restore from trash

Provide a durable deleted-items surface that lists recoverable objects with context, supports targeted restore to an original or chosen location, separates permanent deletion, and reports restored, expired, purged, conflict, and permission states.

Decision first

Choose this pattern when the problem matches

Use when

  • Deleted objects remain recoverable after the user leaves the original workflow.
  • Users need to search, filter, inspect, and restore deleted files, records, folders, pages, projects, or messages.
  • The product can preserve enough metadata to restore the object safely or explain why restore is blocked.
  • Recovery may happen hours or days after deletion, beyond a transient undo window.

Avoid when

  • The action is immediately reversible through a short undo window and no durable recovery surface exists.
  • The object cannot be restored accurately because required metadata, permissions, or dependencies are gone.
  • Deletion is permanent, regulated, externally effective, or security-sensitive and should be prevented before commit.
  • The object is an unpublished draft, autosaved form, or edit-history operation rather than a deleted object.

Problem it prevents

Users need to recover deleted objects after the immediate undo window has passed, but restoration becomes risky when the product hides original location, retention, ownership, permissions, or permanent-deletion status.

Pattern anatomy

What a strong implementation has to make clear

User need

Objects are removed from primary views but intentionally retained for a recovery period.

Pattern promise

Provide a durable deleted-items surface that lists recoverable objects with context, supports targeted restore to an original or chosen location, separates permanent deletion, and reports restored, expired, purged, conflict, and permission states.

Required state

Normal active-object state before deletion.

Recovery path

Trash shows deleted names without path, date, owner, or type, leading users to restore the wrong item.

Access contract

Expose deleted item name, type, original location, retention deadline, and restore availability as text in each row.

Quality bar

The difference between expert and weak execution

Strong implementation

Specific, visible, recoverable

  • A Deleted files table lists Quarterly budget.xlsx with original folder Finance/Q2, deleted yesterday by Maya, 29 days left, and a Restore to Finance/Q2 action.
  • A restore panel warns that the original folder was deleted and offers Choose new location before restoring.
  • A user opens Trash, filters to spreadsheets deleted this week, previews the original folder, restores one file, and gets a link to the restored location.
  • A user selects several deleted records, sees that two can restore to their original location and one needs a new parent, then completes only the safe restores.
Weak implementation

Vague, hidden, hard to recover from

  • A trash page lists File 1, File 2, and File 3 with no path, deletion time, owner, or recovery deadline.
  • Restore and Delete forever appear as identical adjacent buttons with no final-loss review.
  • A user restores a shared folder but cannot find it because permissions or parent location changed silently.
  • A user expects a file to remain recoverable, but the product hid the retention deadline and the file was purged.
UI guidance
  • Show deleted objects in a dedicated trash, recycle bin, deleted-files, or recoverable-items surface with object name, type, original location, deletion date, deleted-by actor, and remaining recovery window.
  • Place Restore as the primary recovery action and keep permanent delete, empty trash, and purge controls visually separated with stronger review.
UX guidance
  • Use restore from trash when users may discover a mistaken deletion after leaving the original workflow and need a durable way to recover the object.
  • Make restoration trustworthy by explaining where the object will return, what dependencies or permissions will be restored, and what happens when the original location is gone.
Implementation contract

What the implementation must handle

States

  • Normal active-object state before deletion.
  • Deleted-but-recoverable state in Trash or Recycle Bin.
  • Trash list state with object metadata and restore actions.
  • Restore preview state showing original location and affected permissions or dependencies.

Interaction

  • Deleting an object removes it from normal views and records enough metadata for later recovery.
  • Trash exposes recoverable deleted objects with identity, location, deletion, actor, and retention context.
  • Restore returns the object to the original location when valid, or asks the user to choose a location when the original target is unavailable.
  • The interface reports restored, skipped, conflicted, expired, purged, and permission-denied outcomes separately.

Accessibility

  • Expose deleted item name, type, original location, retention deadline, and restore availability as text in each row.
  • Do not communicate recoverable, expiring, purged, or admin-only states only through color or iconography.
  • Make Restore, Choose location, Delete forever, and Empty trash controls keyboard reachable with distinct accessible names.
  • Announce restore results, conflicts, skipped items, and permanent-deletion warnings in status or dialog content.

Review

  • Can users tell which deleted object is which before restoring?
  • Where exactly will this object return, and can the user access that location?
  • What happens if the parent folder, workspace, owner, or permission scope changed?
  • How long is the object recoverable, and how is that deadline shown?
Interactive lab

Inspect the states before you copy the pattern

Recover a deleted object

Restore a deleted file to its original location, handle missing parents and retention expiry, review bulk restore, and compare permanent-delete misuse.

Restore from trash
Interactive demo is ready

Launch the live UI/UX lab when you want to inspect states, keyboard behavior, and common failure modes.

State To Inspect

Normal active-object state before deletion.

Keyboard / Access

Tab reaches filters, deleted-item rows, selection checkboxes, Restore actions, permanent-delete actions, and pagination in a predictable order.

Avoid Generating

Showing deleted objects without enough metadata to identify the right item.

Evidence trail

Source-backed claims behind this guidance

Full agent/debug reference

Problem Context

  • Objects are removed from primary views but intentionally retained for a recovery period.
  • Users may realize the deletion was wrong after navigating away, changing devices, or returning days later.
  • Deleted objects may have parent folders, collaborators, permissions, versions, dependencies, or references that affect restore.
  • Retention periods, admin purges, legal holds, storage quotas, or plan limits determine whether recovery is still possible.

Selection Rules

  • Choose restore from trash when the product supports soft deletion and a recoverable deleted-items location.
  • Use undo when recovery must happen immediately after a recent low-risk action and no durable deleted-items surface is needed.
  • Use destructive action confirmation before permanent delete, empty trash, purge, or any deletion that bypasses recovery.
  • Use draft state when users are recovering unpublished changes rather than deleted objects.
  • Show original location, deletion time, deleted-by actor, object type, owner, and retention status before restore.
  • Offer restore to original location only when that location still exists and the user has permission to restore there.
  • Offer choose-location recovery when the parent object is gone, access changed, or a name conflict exists.
  • For bulk restore, summarize item count, unavailable locations, conflicts, permission changes, and skipped items before applying the action.
  • Avoid using trash as the only safety mechanism for high-risk permanent loss; users still need prevention, warnings, or confirmation when deletion has severe consequences.
  • Make expired, purged, admin-only, and legal-hold states explicit instead of showing missing or disabled rows without explanation.

Required States

  • Normal active-object state before deletion.
  • Deleted-but-recoverable state in Trash or Recycle Bin.
  • Trash list state with object metadata and restore actions.
  • Restore preview state showing original location and affected permissions or dependencies.
  • Restored state with a link to the restored object or location.
  • Original-location unavailable state requiring a new destination or administrator help.
  • Name conflict state when the original location already contains a replacement object.
  • Retention-expiring state with a visible recovery deadline.
  • Expired or purged state where recovery is no longer possible.
  • Permanent delete or empty-trash confirmation state.

Interaction Contract

  • Deleting an object removes it from normal views and records enough metadata for later recovery.
  • Trash exposes recoverable deleted objects with identity, location, deletion, actor, and retention context.
  • Restore returns the object to the original location when valid, or asks the user to choose a location when the original target is unavailable.
  • The interface reports restored, skipped, conflicted, expired, purged, and permission-denied outcomes separately.
  • Permanent delete and empty-trash actions require deliberate review and cannot be confused with Restore.
  • Bulk selection preserves per-item status so users know which deleted objects can be restored safely.
  • Restored objects become discoverable through a stable link, parent location, search result, or recent activity state.

Implementation Checklist

  • Store deleted object ID, display name, object type, original parent, deleted-at timestamp, deleted-by actor, owner, permissions, version metadata, retention deadline, and purge status.
  • Create a deleted-items view with filtering by type, owner, folder, deletion date, and restore availability.
  • Validate the original location, permissions, name conflicts, quotas, locks, legal holds, and dependency references before restore.
  • Provide restore-to-original and choose-new-location flows when the original parent cannot accept the object.
  • Separate Restore, Delete forever, Empty trash, and Admin restore with distinct labels, placement, and confirmation requirements.
  • Announce restore outcomes and failed-item details in a status region and preserve selection state for unresolved items.
  • Test single restore, bulk restore, expired retention, parent deletion, name conflict, shared permissions, admin-only recovery, mobile access, keyboard access, and screen reader output.

Common Generated-UI Mistakes

  • Showing deleted objects without enough metadata to identify the right item.
  • Restoring to a hidden or invalid location without telling the user.
  • Placing permanent delete beside Restore without visual separation or final-loss confirmation.
  • Treating trash as a substitute for confirmation when deletion is severe or externally visible.
  • Hiding retention deadlines, plan limits, or administrator-only recovery boundaries.
  • Making bulk restore all-or-nothing when some items have conflicts or missing parents.

Critique Questions

  • Can users tell which deleted object is which before restoring?
  • Where exactly will this object return, and can the user access that location?
  • What happens if the parent folder, workspace, owner, or permission scope changed?
  • How long is the object recoverable, and how is that deadline shown?
  • Which actions permanently remove recovery, and are they separated from Restore?
  • Does bulk restore report partial success, skipped items, conflicts, and next steps?
Accessibility
  • Expose deleted item name, type, original location, retention deadline, and restore availability as text in each row.
  • Do not communicate recoverable, expiring, purged, or admin-only states only through color or iconography.
  • Make Restore, Choose location, Delete forever, and Empty trash controls keyboard reachable with distinct accessible names.
  • Announce restore results, conflicts, skipped items, and permanent-deletion warnings in status or dialog content.
  • For tables or lists, preserve row focus after restore, removal, filtering, and partial bulk outcomes.
Keyboard Behavior
  • Tab reaches filters, deleted-item rows, selection checkboxes, Restore actions, permanent-delete actions, and pagination in a predictable order.
  • Enter or Space activates Restore only after the focused row or selected set is clear.
  • Escape closes restore previews and destructive confirmations while returning focus to the triggering row.
  • Bulk selection supports keyboard selection, review, restore, and conflict resolution without requiring pointer-only drag or context menus.
  • After successful restore, focus moves to a status message or stable link to the restored object.
Variants
  • Trash folder
  • Recycle bin
  • Deleted files page
  • Recoverable items list
  • Admin recycle bin
  • Second-stage recycle bin
  • Restore to original location
  • Restore to new location
  • Bulk restore
  • Retention-expiring recovery
  • Permanent delete from trash

Verification

Last verified: