From bb769fcf61afa100fa518c7c5aa991f828ed646e Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Mon, 13 Jul 2026 14:53:16 +0100 Subject: [PATCH] Fix/compact disabled during approval (#10089) Signed-off-by: Theofanis Petkos Signed-off-by: thepetk@gmail.com Co-authored-by: Douwe M Osinga --- ui/desktop/src/components/ChatInput.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/desktop/src/components/ChatInput.tsx b/ui/desktop/src/components/ChatInput.tsx index 73e0881d1..1e4979600 100644 --- a/ui/desktop/src/components/ChatInput.tsx +++ b/ui/desktop/src/components/ChatInput.tsx @@ -655,7 +655,7 @@ export default function ChatInput({ total: tokenLimit, }, showCompactButton: true, - compactButtonDisabled: !totalTokens, + compactButtonDisabled: !totalTokens || isLoading, onCompact: () => { window.dispatchEvent(new CustomEvent(AppEvents.HIDE_ALERT_POPOVER)); handleSubmit({ msg: MANUAL_COMPACT_TRIGGER, images: [] }); @@ -664,9 +664,8 @@ export default function ChatInput({ }); } - // Keep alert recalculation scoped to token state changes. - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [totalTokens, tokenLimit, isTokenLimitLoaded, addAlert, clearAlerts]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [totalTokens, tokenLimit, isTokenLimitLoaded, isLoading, addAlert, clearAlerts]); // Cleanup effect for component unmount - prevent memory leaks useEffect(() => {