fix: remove deleted games from gallery store#3745
Conversation
Generated-By: PostHog Code Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Generated-By: PostHog Code Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Greptile SummaryThis PR keeps the v2 gallery store in sync with ROM deletion and scan events. The main changes are:
Confidence Score: 4/5The live scan path can put the active v2 gallery into an incorrect filtered or sorted state.
frontend/src/v2/composables/useScanLifecycle/index.ts and frontend/src/v2/stores/galleryRoms.ts Important Files Changed
Reviews (1): Last reviewed commit: "fix: remove deleted games from gallery s..." | Re-trigger Greptile |
Generated-By: PostHog Code Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Generated-By: PostHog Code Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
There was a problem hiding this comment.
Pull request overview
This PR updates the v2 gallery ROM store so it stays in sync with scan and delete flows, ensuring the gallery list reflects newly scanned ROMs and removed/deleted ROMs consistently across legacy (v1) and v2 dialogs.
Changes:
- Add live-scan integration to update the active v2 gallery list when a ROM is scanned for the currently viewed platform.
- Wire both the v2 and legacy delete dialogs to also remove deleted ROMs from the v2 gallery store.
- Extend the v2 gallery store with
addLiveRom()and broadenremove()to update store metadata/state on deletion.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/src/v2/stores/galleryRoms.ts | Adds live ROM insertion and expands deletion handling in the v2 gallery store. |
| frontend/src/v2/composables/useScanLifecycle/index.ts | Sends scan socket ROM updates into the v2 gallery store when relevant. |
| frontend/src/v2/components/Dialogs/DeleteRomDialog.vue | Ensures v2 delete dialog also updates the v2 gallery store. |
| frontend/src/components/common/Game/Dialog/DeleteRom.vue | Ensures legacy delete dialog also updates the v2 gallery store. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Generated-By: PostHog Code Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Generated-By: PostHog Code Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Generated-By: PostHog Code Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Summary
Validation