diff --git a/web/src/lib/actions/gridKeyNav.ts b/web/src/lib/actions/gridKeyNav.ts
index 09438c9..c31454b 100644
--- a/web/src/lib/actions/gridKeyNav.ts
+++ b/web/src/lib/actions/gridKeyNav.ts
@@ -34,8 +34,7 @@ import {
removedBulk,
failBulk,
setDetail,
- markRemoved,
- clearRemoved
+ markRemoved
} from '$lib/stores/bulkAction.svelte';
import { openPreview, toggleLeftSidebar, toggleRightSidebar, view } from '$lib/stores/view.svelte';
@@ -207,17 +206,19 @@ export function gridKeyNav(node: HTMLElement, params: GridKeyNavParams = {}) {
if (target) {
// Destructive removal: flash a red cross, then pull the tiles out of
// the grid immediately (markRemoved) rather than waiting on the slow
- // server-reconcile refetch. clearRemoved once the refetch settles so
- // the archived-filtered page replaces the optimistic hide.
+ // server-reconcile refetch. The grid reconciles `removedIds` against
+ // the cache and drops each id once the archived-filtered page has
+ // actually replaced it (see +page.svelte), so we don't clear here —
+ // clearing on this action's own settle raced other in-flight archives
+ // and flashed photos back in.
removedBulk(doneLabel, ids);
focusAfter(ids);
clearSelection();
await delay(500);
markRemoved(ids);
invalidatePhotos(ids);
- const settled = queryClient.invalidateQueries({ queryKey: ['photos'] });
+ void queryClient.invalidateQueries({ queryKey: ['photos'] });
void queryClient.invalidateQueries({ queryKey: ['marks'] });
- void settled.then(() => clearRemoved(ids));
} else {
doneBulk(doneLabel, ids);
focusAfter(ids);
@@ -267,9 +268,10 @@ export function gridKeyNav(node: HTMLElement, params: GridKeyNavParams = {}) {
await delay(500);
markRemoved(ids);
invalidatePhotos(ids);
- const settled = queryClient.invalidateQueries({ queryKey: ['photos'] });
+ // removedIds is reconciled against the cache in +page.svelte; no
+ // settle-driven clear here (see toggleArchive note above).
+ void queryClient.invalidateQueries({ queryKey: ['photos'] });
void queryClient.invalidateQueries({ queryKey: ['marks'] });
- void settled.then(() => clearRemoved(ids));
toast.success(`Deleted ${ids.length}`, { id: tid });
}
diff --git a/web/src/lib/components/layout/FolderTree.svelte b/web/src/lib/components/layout/FolderTree.svelte
index dae9b86..2bd2306 100644
--- a/web/src/lib/components/layout/FolderTree.svelte
+++ b/web/src/lib/components/layout/FolderTree.svelte
@@ -41,7 +41,7 @@
import { filters } from '$lib/stores/filters.svelte';
import { browser } from '$app/environment';
import { untrack } from 'svelte';
- import { FolderInput, FolderPlus, Pencil, Trash2 } from 'lucide-svelte';
+ import { ChevronRight, FolderInput, FolderPlus, Pencil, Trash2 } from 'lucide-svelte';
import Self from './FolderTree.svelte';
import KebabMenu, { Item, Separator } from './KebabMenu.svelte';
@@ -164,19 +164,21 @@
>
{#if hasChildren}
{:else}
-
+
{/if}
-
+
{/if}