From 950604e0c75d8b99bc49c3c5de7ff8c306b4c75e Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Sat, 18 Apr 2026 23:03:13 +0800 Subject: [PATCH] Fix running progress label: avoid stale node name between iterations Made-with: Cursor --- src/App.tsx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 60fa864..06d264a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1219,19 +1219,28 @@ export default function App() { Pending ) : (() => { const lastResult = testCase.results[testCase.results.length - 1]; - const runningStep = testCase.status === 'running' && lastResult?.trace?.find(s => s.status === 'running'); - const lastFinished = testCase.status === 'running' && lastResult?.trace?.slice().reverse().find(s => s.status !== 'running'); - const currentNodeLabel = runningStep?.title || lastFinished?.title; + // Only surface the node label while a step is actively running, + // so it clears between iterations instead of showing a stale one. + const runningStep = + testCase.status === 'running' + ? lastResult?.trace?.find(s => s.status === 'running') + : undefined; + const done = testCase.results.length; + const total = testCase.times; return (
- + {testCase.status === 'running' - ? (currentNodeLabel - ? `Node ยท ${currentNodeLabel}` - : `In Progress (${testCase.results.length}/${testCase.times})`) - : `Complete (${testCase.times}/${testCase.times})`} + ? `In Progress (${done}/${total})` + : `Complete (${total}/${total})`} + {runningStep?.title && ( + + + {runningStep.title} + + )}
); })()}