Skip to content

[Bug] Filtered image history view does not refresh after deletion + optimize delete UX #329

Description

@kurdin

Bug Description

When deleting an image item from the history list while a filter is active, the image remains visible in the UI even though it has been successfully deleted from the database.

Currently, the UI only syncs and removes the image if the user manually deselects and reselects the filter to force a refresh.

Expected Behavior

  • Upon clicking delete and confirming, the image should immediately disappear from the current filtered view/state without requiring a manual refresh.
  • A lightweight notification (Toast) should confirm the deletion.

UX Optimization Request

The current deletion path takes 3 mouse clicks (Click image -> Open menu -> Click delete -> Confirm), which is too cumbersome for daily use.

  • Proposed Solution: Move or add the "Delete" button directly onto the image preview overlay / lightbox interface.
  • Additional Consideration: Support the Delete / Backspace hotkeys when the image preview is active.

Steps to Reproduce

  1. Go to the Clipboard History.
  2. Apply a filter to show images.
  3. Click on an image item, navigate the menu, and click delete.
  4. Confirm the deletion (Notice: The image still sits in the list).
  5. Turn the filter off and on again (Notice: The image is now gone).

Technical Context / Suggested Fix

  • State Management: Ensure that the frontend state array triggers a re-render or correctly filters out the deleted item ID locally upon a successful 200 OK response from the backend API, rather than relying on a full view refresh.
  • Preview Component: Update the preview modal or lightbox layout to include a prominent delete action button.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions