BUG: Image viewer can delete a different photo from the one selected
Maintainers usually reply within 3 days
Assessment
This issue has not been assessed yet.
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
Description
The image viewer can delete a different photo from the one selected. The delete dialog does not remember which photo it was opened for, so it deletes whichever photo is current when you confirm.
Steps to reproduce
- Add a folder with at least 3 photos.
- Open the first photo and click Slideshow.
- Click Delete.
- Wait until the photo behind the dialog changes.
- Click Delete in the dialog.
Second trigger: open the delete dialog without the slideshow, press the → arrow key, then confirm.
Expected behavior
The photo shown when Delete was clicked is removed.
Actual behavior
The photo the viewer has since moved to is removed. In my test the dialog was opened on photo A and photo B was deleted.
If "Delete from Computer" is checked, the same photo ID is sent for deletion from disk, so the wrong file would be permanently deleted. I tested with it unchecked.
Cause
In frontend/src/components/Media/MediaView.tsx, handleConfirmDelete reads currentImage at confirm time. The slideshow and keyboard navigation stay active while the dialog is open.
Suggested fix
- Store the image ID when the dialog opens and delete that ID.
- Pause the slideshow and ignore viewer shortcuts while the dialog is open.
- Add tests for both triggers.
Environment
macOS, dev branch at 751ff6ca. Reproduced in Chrome against the local backend (with a stand-in for the Tauri layer), and in a Jest test.
I would like to work on this if approved.
Screenshots
1. Delete dialog opened on photo A
2. Slideshow moves to photo B while the dialog is open
3. After confirming, photo B is deleted instead of A
Record
- I agree to follow this project's Code of Conduct
- Dominant language
- Python
- Stars
- 322
- Forks
- 793
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/PictoPy
-
bug enhancement
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AOSSIE-Org/PictoPy#1802 · 2 comments ·
Maintainers usually reply within 3 days
-
BUG: XMP metadata export permanently overwrites file modification timestamp (mtime), destroying photo datesPossibly taken @swastiksharma45 claimed this 2 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AOSSIE-Org/PictoPy#1788 · 6 comments ·
Maintainers usually reply within 3 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
AOSSIE-Org/PictoPy#1786 · 1 comment ·
Maintainers usually reply within 3 days
-
BUG: Semantic search sees portrait phone photos sideways (SigLIP ignores EXIF orientation)Possibly taken @omkar-suryavanshi claimed this 3 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AOSSIE-Org/PictoPy#1780 · 5 comments ·
Maintainers usually reply within 3 days
-
BUG: Share password loses leading/trailing spaces so the password you set doesn't workPossibly taken @ManyaJain111 claimed this 2 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
AOSSIE-Org/PictoPy#1779 · 2 comments · 1 assignee ·
Maintainers usually reply within 3 days
All issues in AOSSIE-Org/PictoPy
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
hermes hooks doctor smoke test never checks the hook exit code — a crashing hook (exit=1) renders ✓ "ran clean" and "All shell hooks look healthy"Possibly taken @cestercian claimed this today. Opencomp/cli P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#162259 · 1 comment ·
Maintainers usually reply within 1 day
-
upstream update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
conan-io/conan-center-index#31597 ·
Maintainers usually reply within 1 day
-
community-request
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA-NeMo/Run#727 ·
Maintainers usually reply within 1 day
-
bot-triaged module: higher order operators module: pickle module: pt2-dispatcher oncall: pt2 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
pytorch/pytorch#207247 · 1 comment ·
Maintainers usually reply within 1 day