From 53b51a12c9f18c65d803ad0f3b8b2aa8fe0a6c31 Mon Sep 17 00:00:00 2001 From: vio1ator Date: Sun, 11 Jan 2026 23:00:01 +0800 Subject: [PATCH] fix: hide todo list/status when all todos complete, fix notifications (#124) --- packages/ui/src/components/chat/StatusRow.tsx | 10 +++++----- .../sections/openchamber/NotificationSettings.tsx | 1 - packages/ui/src/hooks/useEventStream.ts | 5 ++++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/ui/src/components/chat/StatusRow.tsx b/packages/ui/src/components/chat/StatusRow.tsx index 83a8ae08..8a44123a 100644 --- a/packages/ui/src/components/chat/StatusRow.tsx +++ b/packages/ui/src/components/chat/StatusRow.tsx @@ -121,7 +121,7 @@ export const StatusRow: React.FC = ({ return { completed, total }; }, [todos]); - const hasTodos = visibleTodos.length > 0; + const hasActiveTodos = visibleTodos.some((t) => t.status === "in_progress" || t.status === "pending"); // Original logic from ChatInput const shouldRenderPlaceholder = !showAbortStatus && (wasAborted || !abortActive); @@ -133,8 +133,8 @@ export const StatusRow: React.FC = ({ // - isComplete (showing "Done" result) // - wasAborted (showing "Aborted" result) // - placeholderShowingResult (placeholder still displaying result) - // - hasTodos or showAbortStatus - const hasContent = isWorking || isComplete || wasAborted || placeholderShowingResult || hasTodos || showAbortStatus; + // - hasActiveTodos or showAbortStatus + const hasContent = isWorking || isComplete || wasAborted || placeholderShowingResult || hasActiveTodos || showAbortStatus; // Close popover when clicking outside const popoverRef = React.useRef(null); @@ -171,7 +171,7 @@ export const StatusRow: React.FC = ({ ) : null; // Todo trigger button - const todoTrigger = hasTodos ? ( + const todoTrigger = hasActiveTodos ? (