From 9217bf40c184ccf7f7cfc5247c5844d47a65ba09 Mon Sep 17 00:00:00 2001 From: ashrafchowdury Date: Wed, 9 Oct 2024 20:19:16 +0600 Subject: [PATCH 1/6] fix(frontend): testset scoping issue --- agenta-web/src/components/Sidebar/config.tsx | 23 ++++++++++--------- .../components/TestSetTable/TestsetTable.tsx | 12 +++++++++- .../testset/modals/CreateTestsetFromApi.tsx | 5 ++-- .../modals/CreateTestsetFromScratch.tsx | 5 ++-- .../pages/testset/modals/UploadTestset.tsx | 4 ++-- .../components/pages/testset/modals/index.tsx | 9 ++++++-- agenta-web/src/lib/helpers/evaluate.ts | 8 ++++++- .../testsets/[testset_id]/index.tsx | 0 .../apps/{[app_id] => }/testsets/index.tsx | 19 +++++++++++---- agenta-web/src/services/testsets/api/index.ts | 2 +- 10 files changed, 60 insertions(+), 27 deletions(-) rename agenta-web/src/pages/apps/{[app_id] => }/testsets/[testset_id]/index.tsx (100%) rename agenta-web/src/pages/apps/{[app_id] => }/testsets/index.tsx (93%) diff --git a/agenta-web/src/components/Sidebar/config.tsx b/agenta-web/src/components/Sidebar/config.tsx index bdf9a25a6e..c94452765d 100644 --- a/agenta-web/src/components/Sidebar/config.tsx +++ b/agenta-web/src/components/Sidebar/config.tsx @@ -40,7 +40,7 @@ export type SidebarConfig = { export const useSidebarConfig = () => { const appId = useAppId() const {doesSessionExist} = useSession() - const {currentApp, recentlyVisitedAppId} = useAppsData() + const {currentApp, recentlyVisitedAppId, apps} = useAppsData() const capitalizedAppName = renameVariablesCapitalizeAll(currentApp?.app_name || "") const isOss = !isDemo() const [useOrgData, setUseOrgData] = useState(() => () => "") @@ -55,12 +55,21 @@ export const useSidebarConfig = () => { const sidebarConfig: SidebarConfig[] = [ { - key: "app-management-link", - title: "App Management", + key: "application-link", + title: "Applications", tooltip: "Create new applications or switch between your existing projects.", link: "/apps", icon: , + divider: apps.length === 0 ? true : false, + }, + { + key: "app-testsets-link", + title: "Test Sets", + tooltip: "Create and manage testsets for evaluation purposes.", + link: `/apps/testsets`, + icon: , divider: true, + isHidden: apps.length === 0, }, { key: `${currentApp?.app_name || ""}_key`, @@ -84,14 +93,6 @@ export const useSidebarConfig = () => { icon: , isHidden: !appId && !recentlyVisitedAppId, }, - { - key: "app-testsets-link", - title: "Test Sets", - tooltip: "Create and manage testsets for evaluation purposes.", - link: `/apps/${appId || recentlyVisitedAppId}/testsets`, - icon: , - isHidden: !appId && !recentlyVisitedAppId, - }, { key: "app-evaluations-link", title: "Evaluations", diff --git a/agenta-web/src/components/TestSetTable/TestsetTable.tsx b/agenta-web/src/components/TestSetTable/TestsetTable.tsx index 2e833be067..10c4a515df 100644 --- a/agenta-web/src/components/TestSetTable/TestsetTable.tsx +++ b/agenta-web/src/components/TestSetTable/TestsetTable.tsx @@ -17,6 +17,7 @@ import {NoticeType} from "antd/es/message/interface" import {GenericObject, KeyValuePair} from "@/lib/Types" import TableCellsRenderer from "./TableCellsRenderer" import TableHeaderComponent from "./TableHeaderComponent" +import {useAppsData} from "@/contexts/app.context" type TestsetTableProps = { mode: "edit" @@ -91,7 +92,9 @@ const TestsetTable: React.FC = ({mode}) => { const router = useRouter() const {appTheme} = useAppTheme() - const appId = router.query.app_id as string + const {apps, isLoading: isAppsLoading} = useAppsData() + + const appId = apps[0]?.app_id const {testset_id} = router.query useBlockNavigation(unSavedChanges, { @@ -112,6 +115,13 @@ const TestsetTable: React.FC = ({mode}) => { } }, [rowData, testsetName, columnDefs, inputValues]) + useUpdateEffect(() => { + if ((apps.length === 0 || !apps) && !isAppsLoading) { + message.warning("To view the test set, you first need to create an app.") + router.push("/apps") + } + }, [isAppsLoading]) + useEffect(() => { async function applyColData(colData: {field: string}[] = []) { const newColDefs = createNewColDefs(colData) diff --git a/agenta-web/src/components/pages/testset/modals/CreateTestsetFromApi.tsx b/agenta-web/src/components/pages/testset/modals/CreateTestsetFromApi.tsx index 89f77e4bb7..cbdb670424 100644 --- a/agenta-web/src/components/pages/testset/modals/CreateTestsetFromApi.tsx +++ b/agenta-web/src/components/pages/testset/modals/CreateTestsetFromApi.tsx @@ -43,6 +43,7 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ type Props = { setCurrent: React.Dispatch> onCancel: () => void + appId: string } type LanguageCodeBlockProps = { selectedLang: string @@ -67,14 +68,12 @@ const LanguageCodeBlock = ({selectedLang, codeSnippets}: LanguageCodeBlockProps) ) } -const CreateTestsetFromApi: React.FC = ({setCurrent, onCancel}) => { +const CreateTestsetFromApi: React.FC = ({setCurrent, onCancel, appId}) => { const classes = useStyles() const router = useRouter() const [uploadType, setUploadType] = useState<"csv" | "json">("csv") const [selectedLang, setSelectedLang] = useState("python") - const appId = router.query.app_id as string - const uploadURI = `${getAgentaApiUrl()}/api/testsets/upload` const jsonURI = `${getAgentaApiUrl()}/api/testsets/${appId}` diff --git a/agenta-web/src/components/pages/testset/modals/CreateTestsetFromScratch.tsx b/agenta-web/src/components/pages/testset/modals/CreateTestsetFromScratch.tsx index 7a3a7ddf72..7fefb9e377 100644 --- a/agenta-web/src/components/pages/testset/modals/CreateTestsetFromScratch.tsx +++ b/agenta-web/src/components/pages/testset/modals/CreateTestsetFromScratch.tsx @@ -33,6 +33,7 @@ type Props = { setEditTestsetValues: React.Dispatch> setCurrent: React.Dispatch> onCancel: () => void + appId: string } const CreateTestsetFromScratch: React.FC = ({ @@ -42,10 +43,10 @@ const CreateTestsetFromScratch: React.FC = ({ setEditTestsetValues, setCurrent, onCancel, + appId, }) => { const classes = useStyles() const router = useRouter() - const appId = router.query.app_id as string const [testsetName, setTestsetName] = useState( mode === "rename" ? (editTestsetValues?.name as string) : "", ) @@ -68,7 +69,7 @@ const CreateTestsetFromScratch: React.FC = ({ const rowData = data || (await generateInitialRowData()) const response = await createNewTestset(appId, testsetName, rowData) message.success("Test set created successfully") - router.push(`/apps/${appId}/testsets/${response.data.id}`) + router.push(`/apps/testsets/${response.data.id}`) } catch (error) { console.error("Error saving test set:", error) message.error("Failed to create Test set. Please try again!") diff --git a/agenta-web/src/components/pages/testset/modals/UploadTestset.tsx b/agenta-web/src/components/pages/testset/modals/UploadTestset.tsx index 950bd9ecd3..da1dc8c834 100644 --- a/agenta-web/src/components/pages/testset/modals/UploadTestset.tsx +++ b/agenta-web/src/components/pages/testset/modals/UploadTestset.tsx @@ -49,14 +49,14 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ type Props = { setCurrent: React.Dispatch> onCancel: () => void + appId: string } -const UploadTestset: React.FC = ({setCurrent, onCancel}) => { +const UploadTestset: React.FC = ({setCurrent, onCancel, appId}) => { const classes = useStyles() const router = useRouter() const [form] = Form.useForm() const testsetFile = Form.useWatch("file", form) - const appId = router.query.app_id as string const [uploadType, setUploadType] = useState<"JSON" | "CSV" | undefined>("CSV") const [testsetName, setTestsetName] = useState("") const [uploadLoading, setUploadLoading] = useState(false) diff --git a/agenta-web/src/components/pages/testset/modals/index.tsx b/agenta-web/src/components/pages/testset/modals/index.tsx index 8ea035eafc..a59d5b554a 100644 --- a/agenta-web/src/components/pages/testset/modals/index.tsx +++ b/agenta-web/src/components/pages/testset/modals/index.tsx @@ -27,6 +27,7 @@ type Props = { setEditTestsetValues: React.Dispatch> current: number setCurrent: React.Dispatch> + appId: string } & React.ComponentProps const TestsetModal: React.FC = ({ @@ -36,6 +37,7 @@ const TestsetModal: React.FC = ({ setEditTestsetValues, current, setCurrent, + appId, ...props }) => { const classes = useStyles() @@ -61,14 +63,17 @@ const TestsetModal: React.FC = ({ onCancel={onCancel} editTestsetValues={editTestsetValues} setEditTestsetValues={setEditTestsetValues} + appId={appId} /> ), }, { - content: , + content: , }, { - content: , + content: ( + + ), }, ] diff --git a/agenta-web/src/lib/helpers/evaluate.ts b/agenta-web/src/lib/helpers/evaluate.ts index 9fd97f3cf6..b166f173c9 100644 --- a/agenta-web/src/lib/helpers/evaluate.ts +++ b/agenta-web/src/lib/helpers/evaluate.ts @@ -239,7 +239,13 @@ export const getVotesPercentage = (record: HumanEvaluationListTableDataType, ind export const checkIfResourceValidForDeletion = async ( data: Omit[0], "appId">, ) => { - const appId = getAppValues().currentApp?.app_id + let appId + + if (data.resourceType === "testset") { + appId = getAppValues().apps[0]?.app_id + } else { + appId = getAppValues().currentApp?.app_id + } if (!appId) return false const response = await fetchEvaluatonIdsByResource({...data, appId}) diff --git a/agenta-web/src/pages/apps/[app_id]/testsets/[testset_id]/index.tsx b/agenta-web/src/pages/apps/testsets/[testset_id]/index.tsx similarity index 100% rename from agenta-web/src/pages/apps/[app_id]/testsets/[testset_id]/index.tsx rename to agenta-web/src/pages/apps/testsets/[testset_id]/index.tsx diff --git a/agenta-web/src/pages/apps/[app_id]/testsets/index.tsx b/agenta-web/src/pages/apps/testsets/index.tsx similarity index 93% rename from agenta-web/src/pages/apps/[app_id]/testsets/index.tsx rename to agenta-web/src/pages/apps/testsets/index.tsx index 3dcc4eeee5..92098e9f15 100644 --- a/agenta-web/src/pages/apps/[app_id]/testsets/index.tsx +++ b/agenta-web/src/pages/apps/testsets/index.tsx @@ -7,11 +7,13 @@ import {JSSTheme, TestSet, testset, TestsetCreationMode} from "@/lib/Types" import {deleteTestsets, useLoadTestsetsList} from "@/services/testsets/api" import {MoreOutlined, PlusOutlined} from "@ant-design/icons" import {Copy, GearSix, Note, PencilSimple, Trash} from "@phosphor-icons/react" -import {Button, Dropdown, Input, Spin, Table, Typography} from "antd" +import {Button, Dropdown, Input, message, Spin, Table, Typography} from "antd" import {ColumnsType} from "antd/es/table/interface" import {useRouter} from "next/router" import {createUseStyles} from "react-jss" import dayjs from "dayjs" +import {useUpdateEffect} from "usehooks-ts" +import {useAppsData} from "@/contexts/app.context" const useStyles = createUseStyles((theme: JSSTheme) => ({ modal: { @@ -53,7 +55,8 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ const Testset = () => { const classes = useStyles() const router = useRouter() - const appId = router.query.app_id as string + const {apps, isLoading: isAppsLoading} = useAppsData() + const appId = apps[0]?.app_id const [selectedRowKeys, setSelectedRowKeys] = useState([]) const {testsets, isTestsetsLoading, mutate} = useLoadTestsetsList(appId) const [isCreateTestsetModalOpen, setIsCreateTestsetModalOpen] = useState(false) @@ -62,6 +65,13 @@ const Testset = () => { const [editTestsetValues, setEditTestsetValues] = useState(null) const [current, setCurrent] = useState(0) + useUpdateEffect(() => { + if ((apps.length === 0 || !apps) && !isAppsLoading) { + message.warning("To view the test set, you first need to create an app.") + router.push("/apps") + } + }, [isAppsLoading]) + const rowSelection = { onChange: (selectedRowKeys: React.Key[]) => { setSelectedRowKeys(selectedRowKeys) @@ -247,12 +257,12 @@ const Testset = () => { columns={columns} dataSource={filteredTestset} rowKey="_id" - loading={isTestsetsLoading} + loading={isTestsetsLoading || isAppsLoading} scroll={{x: true}} pagination={false} onRow={(record) => { return { - onClick: () => router.push(`/apps/${appId}/testsets/${record._id}`), + onClick: () => router.push(`/apps/testsets/${record._id}`), } }} locale={{emptyText: }} @@ -267,6 +277,7 @@ const Testset = () => { testsetCreationMode={testsetCreationMode} setTestsetCreationMode={setTestsetCreationMode} open={isCreateTestsetModalOpen} + appId={appId} onCancel={() => { setIsCreateTestsetModalOpen(false) }} diff --git a/agenta-web/src/services/testsets/api/index.ts b/agenta-web/src/services/testsets/api/index.ts index 3e9a085719..e634588e2a 100644 --- a/agenta-web/src/services/testsets/api/index.ts +++ b/agenta-web/src/services/testsets/api/index.ts @@ -12,7 +12,7 @@ import {axiosFetcher} from "@/services/api" export const useLoadTestsetsList = (appId: string) => { const {data, error, mutate, isLoading} = useSWR( - `${getAgentaApiUrl()}/api/testsets/?app_id=${appId}`, + () => (appId ? `${getAgentaApiUrl()}/api/testsets/?app_id=${appId}` : null), axiosFetcher, {revalidateOnFocus: false, shouldRetryOnError: false}, ) From a31e71996ef44882969fc3724f0ef8ae262a25c8 Mon Sep 17 00:00:00 2001 From: ashrafchowdury Date: Wed, 9 Oct 2024 21:12:25 +0600 Subject: [PATCH 2/6] test(frontend): fixed failed cypress test --- agenta-web/cypress/support/commands/evaluations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agenta-web/cypress/support/commands/evaluations.ts b/agenta-web/cypress/support/commands/evaluations.ts index 298e0a3c95..7f833e174f 100644 --- a/agenta-web/cypress/support/commands/evaluations.ts +++ b/agenta-web/cypress/support/commands/evaluations.ts @@ -57,7 +57,8 @@ Cypress.Commands.add("createVariant", () => { Cypress.Commands.add("createVariantsAndTestsets", () => { cy.createVariant() - cy.clickLinkAndWait('[data-cy="app-testsets-link"]') + cy.visit(`/apps/testsets`) + cy.location("pathname").should("include", "/testsets") cy.get('[data-cy="create-testset-modal-button"]').click() cy.get(".ant-modal-content").should("exist") cy.get('[data-cy="create-testset-from-scratch"]').click() From 292b0dd767a5327ffbce859e13d463f4f827136b Mon Sep 17 00:00:00 2001 From: ashrafchowdury Date: Thu, 10 Oct 2024 11:49:38 +0600 Subject: [PATCH 3/6] fix(frontend) cypress test --- agenta-web/cypress/e2e/eval.evaluations.cy.ts | 2 +- agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts | 2 +- agenta-web/cypress/e2e/testset.cy.ts | 8 ++------ agenta-web/cypress/support/commands/evaluations.ts | 3 +-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/agenta-web/cypress/e2e/eval.evaluations.cy.ts b/agenta-web/cypress/e2e/eval.evaluations.cy.ts index 3265b716cd..c04a67bb92 100644 --- a/agenta-web/cypress/e2e/eval.evaluations.cy.ts +++ b/agenta-web/cypress/e2e/eval.evaluations.cy.ts @@ -45,7 +45,7 @@ describe("Evaluations CRUD Operations Test", function () { context("Executing Evaluation with different answer column", () => { it("Should successfully rename the testset columns", () => { - cy.visit(`/apps/${app_id}/testsets`) + cy.visit(`/apps/testsets`) cy.location("pathname").should("include", "/testsets") cy.get(".ant-table-row").eq(0).click() cy.wait(1000) diff --git a/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts b/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts index 68b3d048bd..9414bb71d6 100644 --- a/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts +++ b/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts @@ -64,7 +64,7 @@ describe("Single Model Test workflow", () => { }) it("Should check the evaluation testset is successfully saved", () => { - cy.visit(`/apps/${app_id}/testsets`) + cy.visit(`/apps/testsets`) cy.url().should("include", "/testsets") cy.get('[data-cy="app-testset-list"]').as("table") cy.get("@table").contains(saved_testset_name).as("tempTestSet").should("be.visible") diff --git a/agenta-web/cypress/e2e/testset.cy.ts b/agenta-web/cypress/e2e/testset.cy.ts index 2c725482ff..9085e12089 100644 --- a/agenta-web/cypress/e2e/testset.cy.ts +++ b/agenta-web/cypress/e2e/testset.cy.ts @@ -7,18 +7,14 @@ const countries = [ ] describe("Testsets crud and UI functionality", () => { - let app_id before(() => { cy.createVariant() - cy.get("@app_id").then((appId) => { - app_id = appId - }) }) context("Testing creation process of testset", () => { beforeEach(() => { // navigate to the new testset page - cy.visit(`/apps/${app_id}/testsets`) + cy.visit(`/apps/testsets`) }) it("Should successfully creates the testset and navigates to the list", () => { @@ -56,7 +52,7 @@ describe("Testsets crud and UI functionality", () => { context("When uploading testset", () => { const testset_name = randString(8) beforeEach(() => { - cy.visit(`/apps/${app_id}/testsets`) + cy.visit(`/apps/testsets`) }) it("Should successfully upload a testset", () => { diff --git a/agenta-web/cypress/support/commands/evaluations.ts b/agenta-web/cypress/support/commands/evaluations.ts index 7f833e174f..298e0a3c95 100644 --- a/agenta-web/cypress/support/commands/evaluations.ts +++ b/agenta-web/cypress/support/commands/evaluations.ts @@ -57,8 +57,7 @@ Cypress.Commands.add("createVariant", () => { Cypress.Commands.add("createVariantsAndTestsets", () => { cy.createVariant() - cy.visit(`/apps/testsets`) - cy.location("pathname").should("include", "/testsets") + cy.clickLinkAndWait('[data-cy="app-testsets-link"]') cy.get('[data-cy="create-testset-modal-button"]').click() cy.get(".ant-modal-content").should("exist") cy.get('[data-cy="create-testset-from-scratch"]').click() From 3b76df9918d7defa43e8f60352a40251a51ba33f Mon Sep 17 00:00:00 2001 From: ashrafchowdury Date: Thu, 10 Oct 2024 12:26:43 +0600 Subject: [PATCH 4/6] test(frontend): fix testset link not found issue --- agenta-web/cypress/support/commands/evaluations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agenta-web/cypress/support/commands/evaluations.ts b/agenta-web/cypress/support/commands/evaluations.ts index 298e0a3c95..9fd645d451 100644 --- a/agenta-web/cypress/support/commands/evaluations.ts +++ b/agenta-web/cypress/support/commands/evaluations.ts @@ -57,7 +57,8 @@ Cypress.Commands.add("createVariant", () => { Cypress.Commands.add("createVariantsAndTestsets", () => { cy.createVariant() - cy.clickLinkAndWait('[data-cy="app-testsets-link"]') + cy.visit("/apps/testsets") + cy.url().should("include", "/testsets") cy.get('[data-cy="create-testset-modal-button"]').click() cy.get(".ant-modal-content").should("exist") cy.get('[data-cy="create-testset-from-scratch"]').click() From 01ba8fbd9ef399f1c5849801ed4c3939950c28d4 Mon Sep 17 00:00:00 2001 From: Kaosiso Ezealigo Date: Thu, 10 Oct 2024 13:52:17 +0200 Subject: [PATCH 5/6] style(frontend): changed row hover cursor to pointer --- agenta-web/src/components/Sidebar/config.tsx | 1 - agenta-web/src/pages/apps/testsets/index.tsx | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/agenta-web/src/components/Sidebar/config.tsx b/agenta-web/src/components/Sidebar/config.tsx index c94452765d..27f65f063a 100644 --- a/agenta-web/src/components/Sidebar/config.tsx +++ b/agenta-web/src/components/Sidebar/config.tsx @@ -10,7 +10,6 @@ import { Desktop, GithubLogo, PaperPlane, - PersonSimpleRun, Phone, Question, Scroll, diff --git a/agenta-web/src/pages/apps/testsets/index.tsx b/agenta-web/src/pages/apps/testsets/index.tsx index 92098e9f15..84b0b7efea 100644 --- a/agenta-web/src/pages/apps/testsets/index.tsx +++ b/agenta-web/src/pages/apps/testsets/index.tsx @@ -263,6 +263,7 @@ const Testset = () => { onRow={(record) => { return { onClick: () => router.push(`/apps/testsets/${record._id}`), + style: {cursor: "pointer"}, } }} locale={{emptyText: }} From f5ac8b59f66353c8eda2a0dc8fd1959faab93217 Mon Sep 17 00:00:00 2001 From: ashrafchowdury Date: Thu, 10 Oct 2024 19:04:24 +0600 Subject: [PATCH 6/6] fix(frontend): wrong page redirection issue --- .../src/components/HumanEvaluations/AbTestingEvaluation.tsx | 4 +--- .../src/components/HumanEvaluations/SingleModelEvaluation.tsx | 2 +- .../pages/evaluations/autoEvaluation/AutoEvaluation.tsx | 2 +- .../pages/evaluations/evaluationCompare/EvaluationCompare.tsx | 2 +- .../evaluations/evaluationScenarios/EvaluationScenarios.tsx | 2 +- .../overview/automaticEvaluation/AutomaticEvalOverview.tsx | 2 +- agenta-web/src/pages/apps/testsets/index.tsx | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/agenta-web/src/components/HumanEvaluations/AbTestingEvaluation.tsx b/agenta-web/src/components/HumanEvaluations/AbTestingEvaluation.tsx index bae2f29c86..e298e0c536 100644 --- a/agenta-web/src/components/HumanEvaluations/AbTestingEvaluation.tsx +++ b/agenta-web/src/components/HumanEvaluations/AbTestingEvaluation.tsx @@ -351,9 +351,7 @@ const AbTestingEvaluation = ({viewType}: {viewType: "evaluation" | "overview"}) icon: , onClick: (e) => { e.domEvent.stopPropagation() - router.push( - `/apps/${appId}/testsets/${record.testset._id}`, - ) + router.push(`/apps/testsets/${record.testset._id}`) }, }, {type: "divider"}, diff --git a/agenta-web/src/components/HumanEvaluations/SingleModelEvaluation.tsx b/agenta-web/src/components/HumanEvaluations/SingleModelEvaluation.tsx index 763c4241b8..3d91174621 100644 --- a/agenta-web/src/components/HumanEvaluations/SingleModelEvaluation.tsx +++ b/agenta-web/src/components/HumanEvaluations/SingleModelEvaluation.tsx @@ -275,7 +275,7 @@ const SingleModelEvaluation = ({viewType}: {viewType: "evaluation" | "overview"} icon: , onClick: (e) => { e.domEvent.stopPropagation() - router.push(`/apps/${appId}/testsets/${record.testset._id}`) + router.push(`/apps/testsets/${record.testset._id}`) }, }, {type: "divider"}, diff --git a/agenta-web/src/components/pages/evaluations/autoEvaluation/AutoEvaluation.tsx b/agenta-web/src/components/pages/evaluations/autoEvaluation/AutoEvaluation.tsx index 6876403870..075e6a2f99 100644 --- a/agenta-web/src/components/pages/evaluations/autoEvaluation/AutoEvaluation.tsx +++ b/agenta-web/src/components/pages/evaluations/autoEvaluation/AutoEvaluation.tsx @@ -425,7 +425,7 @@ const AutoEvaluation = () => { icon: , onClick: (e) => { e.domEvent.stopPropagation() - router.push(`/apps/${appId}/testsets/${record.testset.id}`) + router.push(`/apps/testsets/${record.testset.id}`) }, }, {type: "divider"}, diff --git a/agenta-web/src/components/pages/evaluations/evaluationCompare/EvaluationCompare.tsx b/agenta-web/src/components/pages/evaluations/evaluationCompare/EvaluationCompare.tsx index 31691806b4..add622b62c 100644 --- a/agenta-web/src/components/pages/evaluations/evaluationCompare/EvaluationCompare.tsx +++ b/agenta-web/src/components/pages/evaluations/evaluationCompare/EvaluationCompare.tsx @@ -458,7 +458,7 @@ const EvaluationCompareMode: React.FC = () => { Testset: - + {testset?.name || ""} diff --git a/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx b/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx index f88eb2a4dd..6b23740923 100644 --- a/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx +++ b/agenta-web/src/components/pages/evaluations/evaluationScenarios/EvaluationScenarios.tsx @@ -349,7 +349,7 @@ const EvaluationScenarios: React.FC = () => { Testset: - + {evalaution?.testset.name || ""} diff --git a/agenta-web/src/components/pages/overview/automaticEvaluation/AutomaticEvalOverview.tsx b/agenta-web/src/components/pages/overview/automaticEvaluation/AutomaticEvalOverview.tsx index 1cd2b82d2b..bd35c7ec96 100644 --- a/agenta-web/src/components/pages/overview/automaticEvaluation/AutomaticEvalOverview.tsx +++ b/agenta-web/src/components/pages/overview/automaticEvaluation/AutomaticEvalOverview.tsx @@ -370,7 +370,7 @@ const AutomaticEvalOverview = () => { icon: , onClick: (e) => { e.domEvent.stopPropagation() - router.push(`/apps/${appId}/testsets/${record.testset.id}`) + router.push(`/apps/testsets/${record.testset.id}`) }, }, {type: "divider"}, diff --git a/agenta-web/src/pages/apps/testsets/index.tsx b/agenta-web/src/pages/apps/testsets/index.tsx index 84b0b7efea..7a6cde0221 100644 --- a/agenta-web/src/pages/apps/testsets/index.tsx +++ b/agenta-web/src/pages/apps/testsets/index.tsx @@ -157,7 +157,7 @@ const Testset = () => { icon: , onClick: (e) => { e.domEvent.stopPropagation() - router.push(`/apps/${appId}/testsets/${record._id}`) + router.push(`/apps/testsets/${record._id}`) }, }, {