Skip to content

fix: remove deleted games from gallery store#3745

Merged
gantoine merged 7 commits into
masterfrom
posthog-code/live-scan-platform-games
Jul 14, 2026
Merged

fix: remove deleted games from gallery store#3745
gantoine merged 7 commits into
masterfrom
posthog-code/live-scan-platform-games

Conversation

@gantoine

Copy link
Copy Markdown
Member

Summary

  • remove deleted games from the v2 gallery store
  • keep legacy and v2 delete dialogs synchronized

Validation

  • npm run typecheck (frontend)

gantoine added 2 commits July 13, 2026 21:46
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Copilot AI review requested due to automatic review settings July 14, 2026 13:36
@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR keeps the v2 gallery store in sync with ROM deletion and scan events. The main changes are:

  • Legacy and v2 delete dialogs now remove deleted ROMs from the v2 gallery store.
  • The scan lifecycle now sends scanned ROMs into the active v2 gallery.
  • The v2 gallery store now updates local totals, indexes, and platform counts for live adds and deletes.

Confidence Score: 4/5

The live scan path can put the active v2 gallery into an incorrect filtered or sorted state.

  • Deleted ROM removal looks consistent with the gallery store state.
  • Live scan insertion bypasses the backend query filters used to define the current gallery.
  • Live scan insertion also bypasses the server ordering used for gallery positions.

frontend/src/v2/composables/useScanLifecycle/index.ts and frontend/src/v2/stores/galleryRoms.ts

Important Files Changed

Filename Overview
frontend/src/components/common/Game/Dialog/DeleteRom.vue Adds v2 gallery-store removal after successful legacy dialog deletion.
frontend/src/v2/components/Dialogs/DeleteRomDialog.vue Adds v2 gallery-store removal after successful v2 dialog deletion.
frontend/src/v2/composables/useScanLifecycle/index.ts Adds live scan updates to the v2 gallery based only on platform id.
frontend/src/v2/stores/galleryRoms.ts Adds live ROM insertion and expands deletion handling for gallery metadata.

Fix All in Claude Code

Reviews (1): Last reviewed commit: "fix: remove deleted games from gallery s..." | Re-trigger Greptile

Comment thread frontend/src/v2/composables/useScanLifecycle/index.ts
Comment thread frontend/src/v2/stores/galleryRoms.ts Outdated
gantoine added 2 commits July 14, 2026 09:39
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f
Generated-By: PostHog Code
Task-Id: b131c873-6e03-47dd-bf51-c99f01ef1f5f

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 broaden remove() 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.

Comment thread frontend/src/v2/stores/galleryRoms.ts Outdated
Comment thread frontend/src/v2/stores/galleryRoms.ts Outdated
gantoine added 3 commits July 14, 2026 09:43
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
@gantoine
gantoine merged commit 76bb948 into master Jul 14, 2026
11 checks passed
@gantoine
gantoine deleted the posthog-code/live-scan-platform-games branch July 14, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants