From e945f3d43952bfe1cf3cccac06fb22edfa26e104 Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 27 Jan 2026 21:20:47 +0800 Subject: [PATCH] feat(log): add paused status count to log rendering and simplify status rendering logic --- web/app/components/app/log/list.tsx | 16 ++++++++-------- .../answer/human-input-content/unsubmitted.tsx | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/app/components/app/log/list.tsx b/web/app/components/app/log/list.tsx index 4fbc2f11d7..84a7d1ba41 100644 --- a/web/app/components/app/log/list.tsx +++ b/web/app/components/app/log/list.tsx @@ -68,6 +68,7 @@ type IDrawerContext = { } type StatusCount = { + paused: number success: number failed: number partial_success: number @@ -89,8 +90,11 @@ const HandThumbIconWithCount: FC<{ count: number, iconType: 'up' | 'down' }> = ( ) } -const statusTdRender = (status: 'normal' | 'finished' | 'paused', statusCount: StatusCount) => { - if (status === 'paused') { +const statusTdRender = (statusCount: StatusCount) => { + if (!statusCount) + return null + + if (statusCount.paused > 0) { return (
@@ -98,11 +102,7 @@ const statusTdRender = (status: 'normal' | 'finished' | 'paused', statusCount: S
) } - - if (!statusCount) - return null - - if (statusCount.partial_success + statusCount.failed === 0) { + else if (statusCount.partial_success + statusCount.failed === 0) { return (
@@ -1039,7 +1039,7 @@ const ConversationList: FC = ({ logs, appDetail, onRefresh }) {renderTdValue(endUser || defaultValue, !endUser)} {isChatflow && ( - {statusTdRender(log.status, log.status_count)} + {statusTdRender(log.status_count)} )} diff --git a/web/app/components/base/chat/chat/answer/human-input-content/unsubmitted.tsx b/web/app/components/base/chat/chat/answer/human-input-content/unsubmitted.tsx index e6d05d62c6..b8b2145923 100644 --- a/web/app/components/base/chat/chat/answer/human-input-content/unsubmitted.tsx +++ b/web/app/components/base/chat/chat/answer/human-input-content/unsubmitted.tsx @@ -29,7 +29,7 @@ export const UnsubmittedHumanInputContent = ({ )} {/* Expiration Time */} {typeof expiration_time === 'number' && ( - + )} )