diff --git a/client/src/components/Workflow/Run/WorkflowRun.vue b/client/src/components/Workflow/Run/WorkflowRun.vue index 8f7ab6741dd..10ebdc8c8b8 100644 --- a/client/src/components/Workflow/Run/WorkflowRun.vue +++ b/client/src/components/Workflow/Run/WorkflowRun.vue @@ -83,11 +83,15 @@ if (props.instance) { } function handleInvocations(incomingInvocations: any) { - invocations.value = incomingInvocations; - // make sure any new histories are added to historyStore - invocations.value.forEach((invocation: any) => { - historyStore.getHistoryById(invocation.history_id); - }); + if (incomingInvocations.length === 1) { + router.push(`/workflows/invocations/${incomingInvocations[0].id}?success=true`); + } else { + invocations.value = incomingInvocations; + // make sure any new histories are added to historyStore + invocations.value.forEach((invocation: any) => { + historyStore.getHistoryById(invocation.history_id); + }); + } } function handleSubmissionError(error: string) { diff --git a/client/src/components/Workflow/Run/WorkflowRunSuccess.vue b/client/src/components/Workflow/Run/WorkflowRunSuccess.vue index eff42661c25..d00754e1d2e 100644 --- a/client/src/components/Workflow/Run/WorkflowRunSuccess.vue +++ b/client/src/components/Workflow/Run/WorkflowRunSuccess.vue @@ -2,7 +2,6 @@ import { onMounted } from "vue"; import type { WorkflowInvocation } from "@/api/invocations"; -import { useHistoryStore } from "@/stores/historyStore"; import Webhooks from "@/utils/webhooks"; import { startWatchingHistory } from "@/watch/watchHistoryProvided"; @@ -23,18 +22,12 @@ onMounted(() => { startWatchingHistory(); }); -const historyStore = useHistoryStore(); - const targetHistories = props.invocations.reduce((histories, invocation) => { if (invocation.history_id && !histories.includes(invocation.history_id)) { histories.push(invocation.history_id); } return histories; }, [] as string[]); -const wasNewHistoryTarget = - props.invocations.length > 0 && - !!props.invocations[0]?.history_id && - historyStore.currentHistoryId !== props.invocations[0].history_id;