fix: OutputPicker shows stale result after 'Test up to here' (#8390)
OutputPickerInner.updateLastJob() unconditionally returned testJob (from individual step tests) even when flowStateStore had newer results from a flow test. Now testJob only takes priority when a step test is actively running/streaming; otherwise flowStateStore is the source of truth. Also reset stepHistoryLoader initial flags when a flow test completes so the "Run loaded from history" indicator doesn't persist. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -652,6 +652,13 @@
|
||||
onDone={async ({ job: completedJob }) => {
|
||||
isRunning = false
|
||||
$executionCount = $executionCount + 1
|
||||
// Reset 'initial' flags for modules that were part of this flow test,
|
||||
// so OutputPicker no longer shows "Run loaded from history"
|
||||
for (const mod of completedJob.flow_status?.modules ?? []) {
|
||||
if (mod.id) {
|
||||
stepHistoryLoader?.resetInitial(mod.id)
|
||||
}
|
||||
}
|
||||
if (flowRecording.active) {
|
||||
lastRecording = flowRecording.stop()
|
||||
setActiveRecording(undefined)
|
||||
|
||||
@@ -204,7 +204,8 @@
|
||||
}
|
||||
|
||||
function updateLastJob() {
|
||||
if (testJob) {
|
||||
// Prefer testJob only when actively running/streaming (individual step test in progress)
|
||||
if (testJob && (testJob.result_stream || testJob.type === 'QueuedJob')) {
|
||||
return testJob
|
||||
}
|
||||
if (
|
||||
@@ -214,6 +215,8 @@
|
||||
) {
|
||||
return
|
||||
}
|
||||
// Use flowStateStore as source of truth — it's updated by both individual step tests
|
||||
// (ModuleTest.jobDone) and flow tests (FlowStatusViewerInner.onJobsLoadedInner)
|
||||
return {
|
||||
id: flowStateStore.val[moduleId]?.previewJobId ?? '',
|
||||
result: flowStateStore.val[moduleId]?.previewResult,
|
||||
|
||||
Reference in New Issue
Block a user