From fbdd43d9d9633ef0d5a810c01fe3c6e5a77a9d59 Mon Sep 17 00:00:00 2001 From: LyAhn Date: Tue, 9 Jun 2026 00:22:30 +0100 Subject: [PATCH] fix(settings): correct invoke payload keys and error handler routing - folder_ids: use snake_case in both set_tagging_queue_folder_ids invoke calls (toggleTaggingQueueFolder and setTaggingQueueFolderIds) to match the Rust SetTaggingQueueFolderIdsParams serde field name - threshold save error: route setTaggerThreshold() catch to setTaggerThresholdError instead of setTaggerQueueStatus so the error surfaces next to the threshold input, not the queue targets card --- src/components/SettingsModal.tsx | 2 +- src/store.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx index 2ee06f6..783a9d4 100644 --- a/src/components/SettingsModal.tsx +++ b/src/components/SettingsModal.tsx @@ -394,7 +394,7 @@ export function SettingsModal() { setTaggerThresholdError(null); setTaggerThresholdSaving(true); void setTaggerThreshold(value) - .catch((error: unknown) => setTaggerQueueStatus(String(error))) + .catch((error: unknown) => setTaggerThresholdError(String(error))) .finally(() => { setTaggerThresholdDraft(null); setTaggerThresholdSaving(false); diff --git a/src/store.ts b/src/store.ts index 85cf5dd..8c4b8a1 100644 --- a/src/store.ts +++ b/src/store.ts @@ -1336,14 +1336,14 @@ export const useGalleryStore = create((set, get) => ({ const next = state.taggingQueueFolderIds.includes(folderId) ? state.taggingQueueFolderIds.filter((id) => id !== folderId) : [...state.taggingQueueFolderIds, folderId].sort((a, b) => a - b); - void invoke("set_tagging_queue_folder_ids", { folderIds: next }).catch(() => {}); + void invoke("set_tagging_queue_folder_ids", { folder_ids: next }).catch(() => {}); return { taggingQueueFolderIds: next }; }); }, setTaggingQueueFolderIds: (taggingQueueFolderIds) => { set({ taggingQueueFolderIds }); - void invoke("set_tagging_queue_folder_ids", { folderIds: taggingQueueFolderIds }).catch(() => {}); + void invoke("set_tagging_queue_folder_ids", { folder_ids: taggingQueueFolderIds }).catch(() => {}); }, openAppDataFolder: async () => {