From 559b7624d0e0944118f0f010c074c1f9aae713f3 Mon Sep 17 00:00:00 2001 From: xvilo Date: Mon, 7 Sep 2026 12:40:03 +0900 Subject: [PATCH] fix(client): show pending state on Immich picker Add button Clicking Add gave no feedback while the async onAdd call was in flight, and nothing stopped a second click from firing a duplicate submit. Adds a local pending flag that disables the button and swaps its label for a spinner until the call resolves. --- .../JourneyDetailPageProviderPicker.tsx | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/client/src/components/Journey/JourneyDetailPageProviderPicker.tsx b/client/src/components/Journey/JourneyDetailPageProviderPicker.tsx index 69201fd56..c194db067 100644 --- a/client/src/components/Journey/JourneyDetailPageProviderPicker.tsx +++ b/client/src/components/Journey/JourneyDetailPageProviderPicker.tsx @@ -59,6 +59,7 @@ export function ProviderPicker({ const [customTo, setCustomTo] = useState(''); const [targetEntryId, setTargetEntryId] = useState(initialEntryId ?? null); const [addToOpen, setAddToOpen] = useState(false); + const [adding, setAdding] = useState(false); const abortRef = useRef(null); const gridRef = useRef(null); @@ -558,25 +559,37 @@ export function ProviderPicker({