From 2dc3a2ae24ec610120dc131b59bb15451b12f8bb Mon Sep 17 00:00:00 2001 From: Oskar Date: Wed, 3 Dec 2025 19:11:36 +0100 Subject: [PATCH] feat(webapp): link to task-specific test page from filtered runs table When viewing runs filtered to a single task, the "Create a test run" and "Run a test" buttons now navigate directly to the task-specific test page instead of the generic test page. This improves UX by pre-populating the test form with the filtered task, saving users from having to manually select it again. --- apps/webapp/app/components/runs/v3/TaskRunsTable.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx index 8abca02eef..60017c69fb 100644 --- a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx +++ b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx @@ -31,7 +31,7 @@ import { type NextRunListItem, } from "~/presenters/v3/NextRunListPresenter.server"; import { formatCurrencyAccurate } from "~/utils/numberFormatter"; -import { docsPath, v3RunSpanPath, v3TestPath } from "~/utils/pathBuilder"; +import { docsPath, v3RunSpanPath, v3TestPath,v3TestTaskPath } from "~/utils/pathBuilder"; import { DateTime } from "../../primitives/DateTime"; import { Paragraph } from "../../primitives/Paragraph"; import { Spinner } from "../../primitives/Spinner"; @@ -565,6 +565,8 @@ function BlankState({ isLoading, filters }: Pick; const { tasks, from, to, ...otherFilters } = filters; + const singleTaskFromFilters = filters.tasks.length === 1 ? filters.tasks[0] : null; + const testPath = singleTaskFromFilters ? v3TestTaskPath(organization, project, environment, {taskIdentifier: singleTaskFromFilters}) : v3TestPath(organization, project, environment); if ( filters.tasks.length === 1 && @@ -579,7 +581,7 @@ function BlankState({ isLoading, filters }: Pick
Run a test