Jon/use new runs urls (#3930)

This commit is contained in:
Jonathan Dobson
2025-11-06 14:28:26 -05:00
committed by GitHub
parent 28f7dcc1a7
commit 20b2c23de9
11 changed files with 98 additions and 63 deletions

View File

@@ -1,9 +1,9 @@
import { useParams } from "react-router-dom";
import { useTaskQuery } from "../../detail/hooks/useTaskQuery";
import { CreateNewTaskForm } from "../CreateNewTaskForm";
import { useFirstParam } from "@/hooks/useFirstParam";
function RetryTask() {
const { taskId } = useParams();
const taskId = useFirstParam("taskId", "runId");
const { data: task, isLoading } = useTaskQuery({ id: taskId });
if (isLoading) {

View File

@@ -40,6 +40,7 @@ import { statusIsFinalized } from "../types";
import { MAX_STEPS_DEFAULT } from "../constants";
import { useTaskQuery } from "./hooks/useTaskQuery";
import { useFirstParam } from "@/hooks/useFirstParam";
import * as env from "@/util/env";
function createTaskRequestObject(values: TaskApiResponse) {
return {
@@ -303,7 +304,11 @@ function TaskDetails() {
workflow &&
workflowRun && (
<Link
to={`/workflows/${workflow.workflow_permanent_id}/${workflowRun.workflow_run_id}/overview`}
to={
env.useNewRunsUrl
? `/runs/${workflowRun.workflow_run_id}`
: `/workflows/${workflow.workflow_permanent_id}/${workflowRun.workflow_run_id}/overview`
}
>
{workflow.title}
</Link>