fix: keep selection consistent with visible assets

This commit is contained in:
Benjamin Lu
2026-01-24 05:53:45 -08:00
parent 832546a5c4
commit f9583dcf4e
3 changed files with 85 additions and 0 deletions

View File

@@ -310,6 +310,7 @@ const {
hasSelection,
clearSelection,
getSelectedAssets,
reconcileSelection,
getOutputCount,
getTotalOutputCount,
activate: activateSelection,
@@ -406,6 +407,9 @@ const showEmptyState = computed(
)
watch(visibleAssets, (newAssets) => {
// Alternative: keep hidden selections and surface them in UI; for now prune
// so selection stays consistent with what this view can act on.
reconcileSelection(newAssets)
if (currentGalleryAssetId.value && galleryActiveIndex.value !== -1) {
const newIndex = newAssets.findIndex(
(asset) => asset.id === currentGalleryAssetId.value