diff --git a/apps/rowboat/app/projects/[projectId]/playground/chat.tsx b/apps/rowboat/app/projects/[projectId]/playground/chat.tsx index 01c3b5ef..62152ff0 100644 --- a/apps/rowboat/app/projects/[projectId]/playground/chat.tsx +++ b/apps/rowboat/app/projects/[projectId]/playground/chat.tsx @@ -13,7 +13,7 @@ import { Button, Spinner, Tooltip } from "@heroui/react"; import { apiV1 } from "rowboat-shared"; import { CopyAsJsonButton } from "./copy-as-json-button"; import { TestProfile } from "@/app/lib/types/testing_types"; -import { ProfileSelector } from "@/app/lib/components/selectors/profile-selector"; +import { ProfileSelector } from "@/app/projects/[projectId]/test/[[...slug]]/components/selectors/profile-selector"; import { WithStringId } from "@/app/lib/types/types"; import { XCircleIcon, XIcon } from "lucide-react"; diff --git a/apps/rowboat/app/lib/components/selectors/profile-selector.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/profile-selector.tsx similarity index 82% rename from apps/rowboat/app/lib/components/selectors/profile-selector.tsx rename to apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/profile-selector.tsx index e9882132..de8f0dea 100644 --- a/apps/rowboat/app/lib/components/selectors/profile-selector.tsx +++ b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/profile-selector.tsx @@ -4,6 +4,7 @@ import { useCallback, useEffect, useState } from "react"; import { listProfiles } from "@/app/actions/testing_actions"; import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react"; import { z } from "zod"; +import { useRouter } from "next/navigation"; interface ProfileSelectorProps { projectId: string; @@ -19,6 +20,7 @@ export function ProfileSelector({ projectId, isOpen, onOpenChange, onSelect }: P const [profiles, setProfiles] = useState>[]>([]); const [totalPages, setTotalPages] = useState(0); const pageSize = 10; + const router = useRouter(); const fetchProfiles = useCallback(async (page: number) => { setLoading(true); @@ -58,10 +60,10 @@ export function ProfileSelector({ projectId, isOpen, onOpenChange, onSelect }: P {!loading && !error && <> {profiles.length === 0 &&
No profiles found
} {profiles.length > 0 &&
-
-
Name
-
Context
-
Mock Tools
+
+
Name
+
Context
+
Mock Tools
{profiles.map((p) => ( @@ -88,9 +90,18 @@ export function ProfileSelector({ projectId, isOpen, onOpenChange, onSelect }: P } - +
+ + +
)} diff --git a/apps/rowboat/app/lib/components/selectors/scenario-selector.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/scenario-selector.tsx similarity index 83% rename from apps/rowboat/app/lib/components/selectors/scenario-selector.tsx rename to apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/scenario-selector.tsx index 07b7d001..3056f9a4 100644 --- a/apps/rowboat/app/lib/components/selectors/scenario-selector.tsx +++ b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/scenario-selector.tsx @@ -4,6 +4,7 @@ import { useCallback, useEffect, useState } from "react"; import { listScenarios } from "@/app/actions/testing_actions"; import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react"; import { z } from "zod"; +import { useRouter } from "next/navigation"; interface ScenarioSelectorProps { projectId: string; @@ -13,6 +14,7 @@ interface ScenarioSelectorProps { } export function ScenarioSelector({ projectId, isOpen, onOpenChange, onSelect }: ScenarioSelectorProps) { + const router = useRouter(); const [page, setPage] = useState(1); const [loading, setLoading] = useState(false); const [error, setError] = useState(null); @@ -58,9 +60,9 @@ export function ScenarioSelector({ projectId, isOpen, onOpenChange, onSelect }: {!loading && !error && <> {scenarios.length === 0 &&
No scenarios found
} {scenarios.length > 0 &&
-
-
Name
-
Description
+
+
Name
+
Description
{scenarios.map((s) => ( @@ -86,9 +88,18 @@ export function ScenarioSelector({ projectId, isOpen, onOpenChange, onSelect }: } - +
+ + +
)} diff --git a/apps/rowboat/app/lib/components/selectors/simulation-selector.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/simulation-selector.tsx similarity index 100% rename from apps/rowboat/app/lib/components/selectors/simulation-selector.tsx rename to apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/simulation-selector.tsx diff --git a/apps/rowboat/app/lib/components/selectors/workflow-selector.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/workflow-selector.tsx similarity index 98% rename from apps/rowboat/app/lib/components/selectors/workflow-selector.tsx rename to apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/workflow-selector.tsx index b2f81153..2a14252b 100644 --- a/apps/rowboat/app/lib/components/selectors/workflow-selector.tsx +++ b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/selectors/workflow-selector.tsx @@ -5,7 +5,7 @@ import { listWorkflows } from "@/app/actions/workflow_actions"; import { Button, Pagination, Spinner, Modal, ModalContent, ModalHeader, ModalBody, ModalFooter } from "@heroui/react"; import { z } from "zod"; import { RelativeTime } from "@primer/react"; -import { WorkflowIcon } from "../icons"; +import { WorkflowIcon } from "../../../../../../lib/components/icons"; import { PublishedBadge } from "@/app/projects/[projectId]/workflow/published_badge"; interface WorkflowSelectorProps { diff --git a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/simulation-form.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/simulation-form.tsx index 86a05f87..6aef94e1 100644 --- a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/simulation-form.tsx +++ b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/simulation-form.tsx @@ -2,8 +2,8 @@ import { FormStatusButton } from "@/app/lib/components/form-status-button"; import { Button, Input, Textarea } from "@heroui/react"; import { TestProfile, TestScenario } from "@/app/lib/types/testing_types"; import { WithStringId } from "@/app/lib/types/types"; -import { ScenarioSelector } from "@/app/lib/components/selectors/scenario-selector"; -import { ProfileSelector } from "@/app/lib/components/selectors/profile-selector"; +import { ScenarioSelector } from "@/app/projects/[projectId]/test/[[...slug]]/components/selectors/scenario-selector"; +import { ProfileSelector } from "@/app/projects/[projectId]/test/[[...slug]]/components/selectors/profile-selector"; import { z } from "zod"; interface SimulationFormProps { diff --git a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/profiles_app.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/profiles_app.tsx index 34d58b52..25c672db 100644 --- a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/profiles_app.tsx +++ b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/profiles_app.tsx @@ -288,15 +288,7 @@ function ProfileList({
) : profiles.length === 0 ? (
-

No profiles created yet

- +

No profiles created yet

) : ( ) : runs.length === 0 ? (
-

No test runs created yet

- +

No test runs created yet

) : ( ) : scenarios.length === 0 ? (
-

No scenarios created yet

- +

No scenarios created yet

) : ( ) : simulations.length === 0 ? (
-

No simulations created yet

- +

No simulations created yet

) : (