Skip to content

Automate browser based workflows with AI

Rename /workflows URLs to /agents (backwards-compatible) [SKY-11668] (#7011)

Celal Zamanoğlu6ebf0c6f24a9
diff --git a/skyvern-frontend/src/components/onboarding/CopilotCTAStep.test.tsx b/skyvern-frontend/src/components/onboarding/CopilotCTAStep.test.tsx
index 1f435d204..c15c066ef 100644
--- a/skyvern-frontend/src/components/onboarding/CopilotCTAStep.test.tsx
+++ b/skyvern-frontend/src/components/onboarding/CopilotCTAStep.test.tsx
@@ -116,7 +116,7 @@ describe("CopilotCTAStep", () => {
fireEvent.click(screen.getByRole("button", { name: "Create with AI" }));
await waitFor(() =>
- expect(mockNavigate).toHaveBeenCalledWith("/workflows/wpid_x/studio", {
+ expect(mockNavigate).toHaveBeenCalledWith("/agents/wpid_x/studio", {
state: { copilotMessage: "fill out my form" },
}),
);
@@ -135,7 +135,7 @@ describe("CopilotCTAStep", () => {
fireEvent.click(screen.getByRole("button", { name: "Create with AI" }));
await waitFor(() =>
- expect(mockNavigate).toHaveBeenCalledWith("/workflows/wpid_x/build", {
+ expect(mockNavigate).toHaveBeenCalledWith("/agents/wpid_x/build", {
state: { copilotMessage: "fill out my form" },
}),
);
diff --git a/skyvern-frontend/src/components/onboarding/CredentialSetupPrompt.test.tsx b/skyvern-frontend/src/components/onboarding/CredentialSetupPrompt.test.tsx
index 13b853b0b..1be1140ad 100644
--- a/skyvern-frontend/src/components/onboarding/CredentialSetupPrompt.test.tsx
+++ b/skyvern-frontend/src/components/onboarding/CredentialSetupPrompt.test.tsx
@@ -50,7 +50,7 @@ describe("CredentialSetupPrompt", () => {
const cta = screen.getByRole("link", {
name: /set up credentials in the editor/i,
});
- expect(cta.getAttribute("href")).toBe("/workflows/wpid_123/studio");
+ expect(cta.getAttribute("href")).toBe("/agents/wpid_123/studio");
});
it("routes the CTA to /build when the studio preview is off", () => {
@@ -60,7 +60,7 @@ describe("CredentialSetupPrompt", () => {
const cta = screen.getByRole("link", {
name: /set up credentials in the editor/i,
});
- expect(cta.getAttribute("href")).toBe("/workflows/wpid_123/build");
+ expect(cta.getAttribute("href")).toBe("/agents/wpid_123/build");
});
it("fires credentialSetupShown once on mount with the block count", () => {
diff --git a/skyvern-frontend/src/components/onboarding/FirstRunRecoveryGuidance.test.tsx b/skyvern-frontend/src/components/onboarding/FirstRunRecoveryGuidance.test.tsx
index 4b8a4a83e..426f004e7 100644
--- a/skyvern-frontend/src/components/onboarding/FirstRunRecoveryGuidance.test.tsx
+++ b/skyvern-frontend/src/components/onboarding/FirstRunRecoveryGuidance.test.tsx
@@ -124,7 +124,7 @@ describe("FirstRunRecoveryGuidance", () => {
/>,
);
fireEvent.click(getByTestId("recovery-path-edit_workflow"));
- expect(navigateMock).toHaveBeenCalledWith("/workflows/wpid_123/studio");
+ expect(navigateMock).toHaveBeenCalledWith("/agents/wpid_123/studio");
});
it("navigates to /build when the studio preview is off (AC2 wiring)", () => {
@@ -137,7 +137,7 @@ describe("FirstRunRecoveryGuidance", () => {
/>,
);
fireEvent.click(getByTestId("recovery-path-edit_workflow"));
- expect(navigateMock).toHaveBeenCalledWith("/workflows/wpid_123/build");
+ expect(navigateMock).toHaveBeenCalledWith("/agents/wpid_123/build");
});
it("records chosen + opened outcome for an external path (AC3)", () => {
diff --git a/skyvern-frontend/src/components/onboarding/FirstRunRecoveryGuidance.tsx b/skyvern-frontend/src/components/onboarding/FirstRunRecoveryGuidance.tsx
index 29c9e619b..c7d343d5d 100644
--- a/skyvern-frontend/src/components/onboarding/FirstRunRecoveryGuidance.tsx
+++ b/skyvern-frontend/src/components/onboarding/FirstRunRecoveryGuidance.tsx
@@ -54,7 +54,7 @@ function FirstRunRecoveryGuidance({
if (id === "edit_workflow") {
return workflowPermanentId
? workflowEditorPath(workflowPermanentId, studioEnabled)
- : "/workflows";
+ : "/agents";
}
return "/credentials";
}
diff --git a/skyvern-frontend/src/router.tsx b/skyvern-frontend/src/router.tsx
index 88aaa2a0f..1a1184c4d 100644
--- a/skyvern-frontend/src/router.tsx
+++ b/skyvern-frontend/src/router.tsx
@@ -5,6 +5,7 @@ import {
EditRoute,
StudioRoute,
} from "@/routes/workflows/StudioRouteGates";
+import { LegacyWorkflowsRedirect } from "@/routes/workflows/LegacyWorkflowsRedirect";
import { BrowserSession } from "@/routes/browserSessions/BrowserSession";
import { BrowserSessions } from "@/routes/browserSessions/BrowserSessions";
import { PageLayout } from "./components/PageLayout";
@@ -216,7 +217,11 @@ const router = createBrowserRouter([
],
},
{
- path: "workflows",
+ path: "workflows/*",
+ element: <LegacyWorkflowsRedirect />,
+ },
+ {
+ path: "agents",
element: <WorkflowsPageLayout />,
children: [
{
diff --git a/skyvern-frontend/src/routes/browserSessions/BrowserSessionWorkflowRuns.tsx b/skyvern-frontend/src/routes/browserSessions/BrowserSessionWorkflowRuns.tsx
index 5c77c121e..934374aea 100644
--- a/skyvern-frontend/src/routes/browserSessions/BrowserSessionWorkflowRuns.tsx
+++ b/skyvern-frontend/src/routes/browserSessions/BrowserSessionWorkflowRuns.tsx
@@ -101,7 +101,7 @@ function BrowserSessionWorkflowRuns() {
{runs.map((workflowRun) => {
const url = env.useNewRunsUrl
? `/runs/${workflowRun.workflow_run_id}`
- : `/workflows/${workflowRun.workflow_permanent_id}/${workflowRun.workflow_run_id}/overview`;
+ : `/agents/${workflowRun.workflow_permanent_id}/${workflowRun.workflow_run_id}/overview`;
return (
<TableRow
key={workflowRun.workflow_run_id}
diff --git a/skyvern-frontend/src/routes/history/RunHistory.tsx b/skyvern-frontend/src/routes/history/RunHistory.tsx
index d02f1c4b2..120794d22 100644
--- a/skyvern-frontend/src/routes/history/RunHistory.tsx
+++ b/skyvern-frontend/src/routes/history/RunHistory.tsx
@@ -115,7 +115,7 @@ function getRunNavigationPath(
// With the studio on, workflow runs open in its Run tab; otherwise they
// use the standalone run page (also the fallback when there is no wpid).
return studioEnabled && run.workflow_permanent_id
- ? `/workflows/${run.workflow_permanent_id}/studio?wr=${run.run_id}`
+ ? `/agents/${run.workflow_permanent_id}/studio?wr=${run.run_id}`
: `/runs/${run.run_id}`;
case TaskRunType.TaskV2:
return `/runs/${run.run_id}`;
@@ -399,11 +399,11 @@ function RunHistory() {
description="Every time you run a workflow, the result shows up on this page. Create your first workflow to get started."
primaryAction={{
label: "Create your first workflow",
- onClick: () => navigate("/workflows"),
+ onClick: () => navigate("/agents"),
}}
secondaryAction={{
label: "Browse templates",
- onClick: () => navigate("/workflows"),
+ onClick: () => navigate("/agents"),
}}
/>
</div>
diff --git a/skyvern-frontend/src/routes/root/SideNav.test.tsx b/skyvern-frontend/src/routes/root/SideNav.test.tsx
index abd02cbe5..8889a0cbf 100644
--- a/skyvern-frontend/src/routes/root/SideNav.test.tsx
+++ b/skyvern-frontend/src/routes/root/SideNav.test.tsx
@@ -130,7 +130,7 @@ describe("SideNav", () => {
fireEvent.click(screen.getByTitle("Agents"));
- expect(screen.getByTestId("location").textContent).toBe("/workflows");
+ expect(screen.getByTestId("location").textContent).toBe("/agents");
});
it("starts recipes collapsed on short screens", () => {
diff --git a/skyvern-frontend/src/routes/root/SideNav.tsx b/skyvern-frontend/src/routes/root/SideNav.tsx
index 6c32df86e..4d6220718 100644
--- a/skyvern-frontend/src/routes/root/SideNav.tsx
+++ b/skyvern-frontend/src/routes/root/SideNav.tsx
@@ -78,7 +78,7 @@ function SideNav({ collapsed }: Props = {}) {
},
{
label: "Agents",
- to: "/workflows",
+ to: "/agents",
icon: <LightningBoltIcon className="size-4" />,
children: [
{
@@ -101,7 +101,7 @@ function SideNav({ collapsed }: Props = {}) {
},
{
label: "All Agents",
- to: "/workflows",
+ to: "/agents",
icon: <ListBulletIcon className="size-3.5" />,
},
{
diff --git a/skyvern-frontend/src/routes/root/useSidebarHidden.test.tsx b/skyvern-frontend/src/routes/root/useSidebarHidden.test.tsx
new file mode 100644
index 000000000..c109ef326
--- /dev/null
+++ b/skyvern-frontend/src/routes/root/useSidebarHidden.test.tsx
@@ -0,0 +1,55 @@
+import { renderHook } from "@testing-library/react";
+import { MemoryRouter } from "react-router-dom";
+import { describe, expect, it } from "vitest";
+
+import { useSidebarHidden } from "./useSidebarHidden";
+
+function wrapper(initialEntry: string) {
+ return function Wrapper({ children }: { children: React.ReactNode }) {
+ return (
+ <MemoryRouter initialEntries={[initialEntry]}>{children}</MemoryRouter>
+ );
+ };
+}
+
+describe("useSidebarHidden", () => {
+ it("hides the sidebar on editor routes under /agents", () => {
+ for (const path of [
+ "/agents/wpid_1/edit",
+ "/agents/wpid_1/studio",
+ "/agents/wpid_1/build",
+ "/agents/wpid_1/wr_1/Login/build",
+ "/agents/wpid_1/debug",
+ ]) {
+ const { result } = renderHook(() => useSidebarHidden(), {
+ wrapper: wrapper(path),
+ });
+ expect(result.current).toBe(true);
+ }
+ });
+
+ it("hides the sidebar at the legacy /workflows alias so nothing flashes mid-redirect", () => {
+ for (const path of ["/workflows/wpid_1/edit", "/workflows/wpid_1/studio"]) {
+ const { result } = renderHook(() => useSidebarHidden(), {
+ wrapper: wrapper(path),
+ });
+ expect(result.current).toBe(true);
+ }
+ });
+
+ it("keeps the sidebar on list and run pages", () => {
+ for (const path of ["/agents", "/agents/wpid_1/runs", "/runs"]) {
+ const { result } = renderHook(() => useSidebarHidden(), {
+ wrapper: wrapper(path),
+ });
+ expect(result.current).toBe(false);
+ }
+ });
+
+ it("hides the sidebar for embedded views regardless of route", () => {
+ const { result } = renderHook(() => useSidebarHidden(), {
+ wrapper: wrapper("/agents?embed=true"),
+ });
+ expect(result.current).toBe(true);
+ });
+});
diff --git a/skyvern-frontend/src/routes/root/useSidebarHidden.ts b/skyvern-frontend/src/routes/root/useSidebarHidden.ts
index 1c5af286d..61209246c 100644
--- a/skyvern-frontend/src/routes/root/useSidebarHidden.ts
+++ b/skyvern-frontend/src/routes/root/useSidebarHidden.ts
@@ -1,5 +1,7 @@
import { useMatch, useSearchParams } from "react-router-dom";
+import { useAgentsPathMatch } from "@/routes/workflows/useAgentsPathMatch";
+
type Options = {
hideBrowserSessions?: boolean;
};
@@ -7,17 +9,17 @@ type Options = {
function useSidebarHidden({ hideBrowserSessions = false }: Options = {}) {
const [searchParams] = useSearchParams();
const embed = searchParams.get("embed");
- const workflowEditMatch = useMatch("/workflows/:workflowPermanentId/edit");
- const workflowStudioMatch = useMatch(
- "/workflows/:workflowPermanentId/studio",
+ const workflowEditMatch = useAgentsPathMatch("/:workflowPermanentId/edit");
+ const workflowStudioMatch = useAgentsPathMatch(
+ "/:workflowPermanentId/studio",
);
- const workflowBuildMatch = useMatch("/workflows/:workflowPermanentId/build");
- const workflowBlockBuildMatch = useMatch(
- "/workflows/:workflowPermanentId/:workflowRunId/:blockLabel/build",
+ const workflowBuildMatch = useAgentsPathMatch("/:workflowPermanentId/build");
+ const workflowBlockBuildMatch = useAgentsPathMatch(
+ "/:workflowPermanentId/:workflowRunId/:blockLabel/build",
);
- const workflowDebugMatch = useMatch("/workflows/:workflowPermanentId/debug");
- const workflowBlockDebugMatch = useMatch(
- "/workflows/:workflowPermanentId/:workflowRunId/:blockLabel/debug",
+ const workflowDebugMatch = useAgentsPathMatch("/:workflowPermanentId/debug");
+ const workflowBlockDebugMatch = useAgentsPathMatch(
+ "/:workflowPermanentId/:workflowRunId/:blockLabel/debug",
);
const browserSessionMatch = useMatch("/browser-session/:browserSessionId");
const nestedBrowserSessionMatch = useMatch(
diff --git a/skyvern-frontend/src/routes/schedules/ScheduleDetailPage.tsx b/skyvern-frontend/src/routes/schedules/ScheduleDetailPage.tsx
index fd0c8bff8..a35de9394 100644
--- a/skyvern-frontend/src/routes/schedules/ScheduleDetailPage.tsx
+++ b/skyvern-frontend/src/routes/schedules/ScheduleDetailPage.tsx
@@ -244,7 +244,7 @@ function ScheduleDetailPage() {
{humanReadable} · {schedule.timezone}
</p>
<Link
- to={`/workflows/${schedule.workflow_permanent_id}/runs`}
+ to={`/agents/${schedule.workflow_permanent_id}/runs`}
className="mt-1 inline-block text-xs text-slate-400 hover:text-slate-200 hover:underline"
onClick={(e) => e.stopPropagation()}
>
diff --git a/skyvern-frontend/src/routes/tasks/create/PromptBox.test.tsx b/skyvern-frontend/src/routes/tasks/create/PromptBox.test.tsx
index 56b0a292b..0e62bd677 100644
--- a/skyvern-frontend/src/routes/tasks/create/PromptBox.test.tsx
+++ b/skyvern-frontend/src/routes/tasks/create/PromptBox.test.tsx
@@ -194,7 +194,7 @@ describe("PromptBox", () => {
expect(yaml).toContain("run_with: agent");
expect(yaml).not.toContain("run_with: code");
expect(mockNavigate).toHaveBeenCalledWith(
- "/workflows/wpid_copilot/build?via=discover",
+ "/agents/wpid_copilot/build?via=discover",
{
state: { copilotMessage: "Build this workflow" },
},
diff --git a/skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx b/skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx
index d52bee3d1..8d2d6680a 100644
--- a/skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx
+++ b/skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx
@@ -316,7 +316,7 @@ function TaskDetails() {
to={
env.useNewRunsUrl
? `/runs/${workflowRun.workflow_run_id}`
- : `/workflows/${workflow.workflow_permanent_id}/${workflowRun.workflow_run_id}/overview`
+ : `/agents/${workflow.workflow_permanent_id}/${workflowRun.workflow_run_id}/overview`
}
>
{workflow.title}
diff --git a/skyvern-frontend/src/routes/workflows/LegacyBuildRedirect.tsx b/skyvern-frontend/src/routes/workflows/LegacyBuildRedirect.tsx
index 5fdf8eb3d..ab325351b 100644
--- a/skyvern-frontend/src/routes/workflows/LegacyBuildRedirect.tsx
+++ b/skyvern-frontend/src/routes/workflows/LegacyBuildRedirect.tsx
@@ -15,7 +15,7 @@ function LegacyBuildRedirect() {
: location.search;
return (
<Navigate
- to={`/workflows/${workflowPermanentId}/studio${query}`}
+ to={`/agents/${workflowPermanentId}/studio${query}`}
state={location.state}
replace
/>
diff --git a/skyvern-frontend/src/routes/workflows/LegacyWorkflowsRedirect.test.tsx b/skyvern-frontend/src/routes/workflows/LegacyWorkflowsRedirect.test.tsx
new file mode 100644
index 000000000..d90659700
--- /dev/null
+++ b/skyvern-frontend/src/routes/workflows/LegacyWorkflowsRedirect.test.tsx
@@ -0,0 +1,140 @@
+import { render, screen, waitFor } from "@testing-library/react";
+import { MemoryRouter, Route, Routes, useLocation } from "react-router-dom";
+import { describe, expect, it, vi } from "vitest";
+
+import { BuildRoute, DebugRoute } from "./StudioRouteGates";
+import { LegacyWorkflowsRedirect } from "./LegacyWorkflowsRedirect";
+
+const studioState = { enabled: true };
+
+vi.mock("@/hooks/useWorkflowStudioEnabled", () => ({
+ useWorkflowStudioEnabled: () => studioState.enabled,
+}));
+
+vi.mock("./debugger/Debugger", () => ({
+ Debugger: () => <div>debugger</div>,
+}));
+
+vi.mock("./editor/WorkflowEditor", () => ({
+ WorkflowEditor: () => <div>editor</div>,
+}));
+
+function LocationProbe() {
+ const location = useLocation();
+ return (
+ <>
+ <div data-testid="location">
+ {location.pathname}
+ {location.search}
+ {location.hash}
+ </div>
+ <div data-testid="state">{JSON.stringify(location.state)}</div>
+ </>
+ );
+}
+
+function renderAt(initialEntry: string | { pathname: string; state: unknown }) {
+ render(
+ <MemoryRouter initialEntries={[initialEntry]}>
+ <Routes>
+ <Route path="/workflows/*" element={<LegacyWorkflowsRedirect />} />
+ <Route
+ path="/agents/:workflowPermanentId/build"
+ element={<BuildRoute />}
+ />
+ <Route
+ path="/agents/:workflowPermanentId/:workflowRunId/:blockLabel/build"
+ element={<BuildRoute />}
+ />
+ <Route
+ path="/agents/:workflowPermanentId/debug"
+ element={<DebugRoute />}
+ />
+ <Route path="*" element={null} />
+ </Routes>
+ <LocationProbe />
+ </MemoryRouter>,
+ );
+}
+
+describe("LegacyWorkflowsRedirect", () => {
+ it("redirects the bare list URL", async () => {
+ renderAt("/workflows");
+ await waitFor(() =>
+ expect(screen.getByTestId("location").textContent).toBe("/agents"),
+ );
+ });
+
+ it("preserves the sub-path, query params, and hash byte-for-byte", async () => {
+ renderAt(
+ "/workflows/wpid_1/wr_2/overview?active=act_1&iteration=2&cache-key-value=a%20b&panes=copilot,browser#frame",
+ );
+ await waitFor(() =>
+ expect(screen.getByTestId("location").textContent).toBe(
+ "/agents/wpid_1/wr_2/overview?active=act_1&iteration=2&cache-key-value=a%20b&panes=copilot,browser#frame",
+ ),
+ );
+ });
+
+ it("keeps encoded path segments (spaces, unicode, %2F) untouched", async () => {
+ renderAt("/workflows/wpid_1/scripts/St%C3%A4dte%20a%2Fb");
+ await waitFor(() =>
+ expect(screen.getByTestId("location").textContent).toBe(
+ "/agents/wpid_1/scripts/St%C3%A4dte%20a%2Fb",
+ ),
+ );
+ });
+
+ it("carries location.state through the redirect", async () => {
+ renderAt({ pathname: "/workflows/wpid_1/run", state: { data: { a: 1 } } });
+ await waitFor(() =>
+ expect(screen.getByTestId("location").textContent).toBe(
+ "/agents/wpid_1/run",
+ ),
+ );
+ expect(screen.getByTestId("state").textContent).toBe(
+ JSON.stringify({ data: { a: 1 } }),
+ );
+ });
+
+ it("composes with the studio gate: legacy block-build URL lands on /agents studio with re-encoded ?bl=", async () => {
+ studioState.enabled = true;
+ renderAt("/workflows/wpid_1/wr_9/St%C3%A4dte%20suchen/build");
+ await waitFor(() =>
+ expect(screen.getByTestId("location").textContent).toBe(
+ "/agents/wpid_1/studio?wr=wr_9&bl=St%C3%A4dte%20suchen",
+ ),
+ );
+ });
+
+ it("composes with the studio gate: legacy /build keeps its own query when studio is on", async () => {
+ studioState.enabled = true;
+ renderAt("/workflows/wpid_1/build?via=discover");
+ await waitFor(() =>
+ expect(screen.getByTestId("location").textContent).toBe(
+ "/agents/wpid_1/studio?via=discover",
+ ),
+ );
+ });
+
+ it("composes the 3-hop chain: legacy /debug → /agents/debug → /agents/build when studio is off", async () => {
+ studioState.enabled = false;
+ renderAt("/workflows/wpid_1/debug?wr=wr_1#frame");
+ await waitFor(() =>
+ expect(screen.getByTestId("location").textContent).toBe(
+ "/agents/wpid_1/build?wr=wr_1#frame",
+ ),
+ );
+ });
+
+ it("stays on /agents build (no further hop) when studio is off", async () => {
+ studioState.enabled = false;
+ renderAt("/workflows/wpid_1/build?wr=wr_1");
+ await waitFor(() =>
+ expect(screen.getByTestId("location").textContent).toBe(
+ "/agents/wpid_1/build?wr=wr_1",
+ ),
+ );
+ expect(screen.getByText("debugger")).toBeTruthy();
+ });
+});
diff --git a/skyvern-frontend/src/routes/workflows/LegacyWorkflowsRedirect.tsx b/skyvern-frontend/src/routes/workflows/LegacyWorkflowsRedirect.tsx
new file mode 100644
index 000000000..1aba7b762
--- /dev/null
+++ b/skyvern-frontend/src/routes/workflows/LegacyWorkflowsRedirect.tsx
@@ -0,0 +1,23 @@
+import { Navigate, useLocation } from "react-router-dom";
+
+/**
+ * Permanent alias: pre-rename /workflows URLs (bookmarks, webhooks, docs) land
+ * on /agents. Swaps the prefix on the raw pathname — no decode/re-encode — so
+ * the rest of the path, query, hash, and state pass through byte-for-byte.
+ */
+function LegacyWorkflowsRedirect() {
+ const location = useLocation();
+ return (
+ <Navigate
+ to={
+ location.pathname.replace(/^\/workflows(?=\/|$)/, "/agents") +
+ location.search +
+ location.hash
+ }
+ state={location.state}
+ replace
+ />
+ );
+}
+
+export { LegacyWorkflowsRedirect };
diff --git a/skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx b/skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx
index d70d63b32..2a7072d1b 100644
--- a/skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx
+++ b/skyvern-frontend/src/routes/workflows/RunWorkflowForm.tsx
@@ -405,13 +405,13 @@ function RunWorkflowForm({
if (studioEnabled) {
// Land in the studio shell; the ?wr= deep link opens the Run pane.
navigate(
- `/workflows/${workflowPermanentId}/studio?wr=${response.data.workflow_run_id}`,
+ `/agents/${workflowPermanentId}/studio?wr=${response.data.workflow_run_id}`,
);
} else {
navigate(
env.useNewRunsUrl
? `/runs/${response.data.workflow_run_id}`
- : `/workflows/${workflowPermanentId}/${response.data.workflow_run_id}/overview`,
+ : `/agents/${workflowPermanentId}/${response.data.workflow_run_id}/overview`,
);
}
},
diff --git a/skyvern-frontend/src/routes/workflows/StudioRouteGates.tsx b/skyvern-frontend/src/routes/workflows/StudioRouteGates.tsx
index 12b7088f2..7e6c7f3a8 100644
--- a/skyvern-frontend/src/routes/workflows/StudioRouteGates.tsx
+++ b/skyvern-frontend/src/routes/workflows/StudioRouteGates.tsx
@@ -38,7 +38,7 @@ export function StudioRoute() {
}
return (
<Navigate
- to={`/workflows/${workflowPermanentId}/edit${location.search}`}
+ to={`/agents/${workflowPermanentId}/edit${location.search}`}
state={location.state}
replace
/>
@@ -56,7 +56,7 @@ export function EditRoute() {
if (studioEnabled) {
return (
<Navigate
- to={`/workflows/${workflowPermanentId}/studio${location.search}`}
+ to={`/agents/${workflowPermanentId}/studio${location.search}`}
state={location.state}
replace
/>
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx b/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx
index 58402039e..de51b2912 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx
@@ -195,7 +195,7 @@ function WorkflowPage() {
{workflow && (
<WorkflowActions
workflow={workflow}
- onSuccessfullyDeleted={() => navigate("/workflows")}
+ onSuccessfullyDeleted={() => navigate("/agents")}
/>
)}
{isCloud && analyticsEnabled ? (
@@ -207,7 +207,7 @@ function WorkflowPage() {
</Button>
) : null}
<Button asChild variant="secondary">
- <Link to={`/workflows/${workflowPermanentId}/scripts`}>
+ <Link to={`/agents/${workflowPermanentId}/scripts`}>
<CodeIcon className="mr-2 size-4" />
Scripts
</Link>
@@ -222,7 +222,7 @@ function WorkflowPage() {
</Link>
</Button>
<Button asChild>
- <Link to={`/workflows/${workflowPermanentId}/run`}>
+ <Link to={`/agents/${workflowPermanentId}/run`}>
<PlayIcon className="mr-2 size-4" />
Run
</Link>
@@ -248,8 +248,7 @@ function WorkflowPage() {
description="Run this workflow to see results here. Each run tracks status, parameters, and duration."
primaryAction={{
label: "Run this workflow",
- onClick: () =>
- navigate(`/workflows/${workflowPermanentId}/run`),
+ onClick: () => navigate(`/agents/${workflowPermanentId}/run`),
}}
secondaryAction={{
label: "View documentation",
@@ -325,7 +324,7 @@ function WorkflowPage() {
<TableRow
onClick={(event) => {
const url = studioEnabled
- ? `/workflows/${workflowPermanentId}/studio?wr=${workflowRun.workflow_run_id}`
+ ? `/agents/${workflowPermanentId}/studio?wr=${workflowRun.workflow_run_id}`
: legacyRunDetailPath(
workflowPermanentId,
workflowRun.workflow_run_id,
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx
index d862e3f28..b7c3af835 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx
@@ -273,7 +273,7 @@ function WorkflowRun() {
<h1 className="text-3xl">
<Link
className="hover:underline hover:underline-offset-2"
- to={`/workflows/${workflowPermanentId}/runs`}
+ to={`/agents/${workflowPermanentId}/runs`}
>
{workflow?.title}
</Link>
@@ -347,7 +347,7 @@ function WorkflowRun() {
recentRuns[0]?.run_id === workflowRun?.workflow_run_id;
const handleFirstFailedRunRetry = useCallback(() => {
- navigate(`/workflows/${workflowPermanentId}/run`, {
+ navigate(`/agents/${workflowPermanentId}/run`, {
state: {
data: workflowRun?.parameters ?? {},
proxyLocation,
@@ -539,7 +539,7 @@ function WorkflowRun() {
}
return (
<Navigate
- to={`/workflows/${workflowPermanentId}/studio?${studioParams.toString()}`}
+ to={`/agents/${workflowPermanentId}/studio?${studioParams.toString()}`}
replace
/>
);
@@ -698,7 +698,7 @@ function WorkflowRun() {
{workflowRunIsFinalized && !isTaskv2Run && !isWorkflowDeleted && (
<Button asChild>
<Link
- to={`/workflows/${workflowPermanentId}/run`}
+ to={`/agents/${workflowPermanentId}/run`}
state={{
data: parameters,
proxyLocation,
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowScriptDetailPage.tsx b/skyvern-frontend/src/routes/workflows/WorkflowScriptDetailPage.tsx
index 18a6b6dc5..b00b79e8b 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowScriptDetailPage.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowScriptDetailPage.tsx
@@ -151,7 +151,7 @@ function WorkflowScriptDetailPage() {
<header className="flex items-center justify-between">
<div className="flex items-center gap-4">
<Button asChild variant="ghost" size="icon">
- <Link to={`/workflows/${workflowPermanentId}/scripts`}>
+ <Link to={`/agents/${workflowPermanentId}/scripts`}>
<ArrowLeftIcon className="size-5" />
</Link>
</Button>
@@ -343,7 +343,7 @@ function WorkflowScriptDetailPage() {
<p className="text-sm text-muted-foreground">
Revision #{activeVersion} created on run{" "}
<Link
- to={`/workflows/${workflowPermanentId}/${activeVersionInfo.run_id}/code`}
+ to={`/agents/${workflowPermanentId}/${activeVersionInfo.run_id}/code`}
className="font-mono text-blue-400 hover:underline"
>
{activeVersionInfo.run_id}
@@ -404,7 +404,7 @@ function WorkflowScriptDetailPage() {
<TableRow key={run.workflow_run_id}>
<TableCell>
<Link
- to={`/workflows/${workflowPermanentId}/${run.workflow_run_id}/overview`}
+ to={`/agents/${workflowPermanentId}/${run.workflow_run_id}/overview`}
className="font-mono text-sm text-blue-400 hover:underline"
>
{run.workflow_run_id}
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowScriptsPage.tsx b/skyvern-frontend/src/routes/workflows/WorkflowScriptsPage.tsx
index b518cd163..f908ed8e2 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowScriptsPage.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowScriptsPage.tsx
@@ -368,7 +368,7 @@ function ScriptRow({
setExpanded(!expanded);
} else {
navigate(
- `/workflows/${workflowPermanentId}/scripts/${script.script_id}`,
+ `/agents/${workflowPermanentId}/scripts/${script.script_id}`,
);
}
}}
@@ -390,7 +390,7 @@ function ScriptRow({
/>
<div className="flex flex-col gap-0.5">
<Link
- to={`/workflows/${workflowPermanentId}/scripts/${script.script_id}`}
+ to={`/agents/${workflowPermanentId}/scripts/${script.script_id}`}
className="font-mono text-sm text-blue-400 hover:underline"
onClick={(e) => e.stopPropagation()}
>
@@ -429,7 +429,7 @@ function ScriptRow({
className="cursor-pointer bg-muted/30 hover:bg-muted/50"
onClick={() =>
navigate(
- `/workflows/${workflowPermanentId}/scripts/${script.script_id}?version=${group.latest_version}`,
+ `/agents/${workflowPermanentId}/scripts/${script.script_id}?version=${group.latest_version}`,
)
}
>
@@ -437,7 +437,7 @@ function ScriptRow({
<TableCell className="pl-8 text-sm">
{group.run_id ? (
<Link
- to={`/workflows/${workflowPermanentId}/${group.run_id}/code`}
+ to={`/agents/${workflowPermanentId}/${group.run_id}/code`}
className="font-mono text-xs text-blue-400 hover:underline"
onClick={(e) => e.stopPropagation()}
>
@@ -513,7 +513,7 @@ function WorkflowScriptsPage() {
) : (
<>
<Link
- to={`/workflows/${workflowPermanentId}/runs`}
+ to={`/agents/${workflowPermanentId}/runs`}
className="text-lg font-semibold hover:text-blue-400 hover:underline"
>
{workflow?.title}
@@ -528,7 +528,7 @@ function WorkflowScriptsPage() {
{workflow && (
<WorkflowActions
workflow={workflow}
- onSuccessfullyDeleted={() => navigate("/workflows")}
+ onSuccessfullyDeleted={() => navigate("/agents")}
/>
)}
<Button asChild variant="secondary">
@@ -540,7 +540,7 @@ function WorkflowScriptsPage() {
</Link>
</Button>
<Button asChild>
- <Link to={`/workflows/${workflowPermanentId}/run`}>
+ <Link to={`/agents/${workflowPermanentId}/run`}>
<PlayIcon className="mr-2 size-4" />
Run
</Link>
@@ -556,9 +556,7 @@ function WorkflowScriptsPage() {
disabled={scripts.length === 0}
/>
<Button asChild variant="outline" size="sm">
- <Link to={`/workflows/${workflowPermanentId}/runs`}>
- View Runs
- </Link>
+ <Link to={`/agents/${workflowPermanentId}/runs`}>View Runs</Link>
</Button>
</div>
</header>
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowsFlat.tsx b/skyvern-frontend/src/routes/workflows/WorkflowsFlat.tsx
index 0c70c4aa5..034a42252 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowsFlat.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowsFlat.tsx
@@ -469,13 +469,13 @@ function WorkflowsFlat() {
) {
if (event.ctrlKey || event.metaKey) {
window.open(
- window.location.origin + `/workflows/${workflowPermanentId}/runs`,
+ window.location.origin + `/agents/${workflowPermanentId}/runs`,
"_blank",
"noopener,noreferrer",
);
return;
}
- navigate(`/workflows/${workflowPermanentId}/runs`);
+ navigate(`/agents/${workflowPermanentId}/runs`);
}
function handleIconClick(
@@ -1132,7 +1132,7 @@ function WorkflowsFlat() {
onClick={(event) => {
handleIconClick(
event,
- `/workflows/${workflow.workflow_permanent_id}/run`,
+ `/agents/${workflow.workflow_permanent_id}/run`,
);
}}
>
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowsPageLayout.tsx b/skyvern-frontend/src/routes/workflows/WorkflowsPageLayout.tsx
index 7ba5cc720..483822808 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowsPageLayout.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowsPageLayout.tsx
@@ -1,20 +1,20 @@
import { cn } from "@/util/utils";
import { Outlet, useMatch, useSearchParams } from "react-router-dom";
+// Mounted only under /agents (the /workflows alias redirects before this
+// renders), so plain canonical-path matches suffice here.
function WorkflowsPageLayout() {
const [searchParams] = useSearchParams();
const embed = searchParams.get("embed");
- const workflowEditMatch = useMatch("/workflows/:workflowPermanentId/edit");
- const workflowStudioMatch = useMatch(
- "/workflows/:workflowPermanentId/studio",
- );
- const workflowBuildMatch = useMatch("/workflows/:workflowPermanentId/build");
+ const workflowEditMatch = useMatch("/agents/:workflowPermanentId/edit");
+ const workflowStudioMatch = useMatch("/agents/:workflowPermanentId/studio");
+ const workflowBuildMatch = useMatch("/agents/:workflowPermanentId/build");
const workflowBlockBuildMatch = useMatch(
- "/workflows/:workflowPermanentId/:workflowRunId/:blockLabel/build",
+ "/agents/:workflowPermanentId/:workflowRunId/:blockLabel/build",
);
- const workflowDebugMatch = useMatch("/workflows/:workflowPermanentId/debug");
+ const workflowDebugMatch = useMatch("/agents/:workflowPermanentId/debug");
const workflowBlockDebugMatch = useMatch(
- "/workflows/:workflowPermanentId/:workflowRunId/:blockLabel/debug",
+ "/agents/:workflowPermanentId/:workflowRunId/:blockLabel/debug",
);
const match =
workflowEditMatch ||
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowsTree.tsx b/skyvern-frontend/src/routes/workflows/WorkflowsTree.tsx
index a25860c2f..3080804c2 100644
--- a/skyvern-frontend/src/routes/workflows/WorkflowsTree.tsx
+++ b/skyvern-frontend/src/routes/workflows/WorkflowsTree.tsx
@@ -443,13 +443,13 @@ function WorkflowsTree() {
) {
if (event.ctrlKey || event.metaKey) {
window.open(
- window.location.origin + `/workflows/${workflowPermanentId}/runs`,
+ window.location.origin + `/agents/${workflowPermanentId}/runs`,
"_blank",
"noopener,noreferrer",
);
return;
}
- navigate(`/workflows/${workflowPermanentId}/runs`);
+ navigate(`/agents/${workflowPermanentId}/runs`);
}
function handleIconClick(
diff --git a/skyvern-frontend/src/routes/workflows/components/WorkflowRowContextMenu.tsx b/skyvern-frontend/src/routes/workflows/components/WorkflowRowContextMenu.tsx
index 2fc7c5aea..5a5b683ee 100644
--- a/skyvern-frontend/src/routes/workflows/components/WorkflowRowContextMenu.tsx
+++ b/skyvern-frontend/src/routes/workflows/components/WorkflowRowContextMenu.tsx
@@ -184,7 +184,7 @@ function WorkflowRowContextMenu({
</ContextMenuItem>
<ContextMenuItem
onSelect={() =>
- onNavigate(`/workflows/${workflow.workflow_permanent_id}/run`)
+ onNavigate(`/agents/${workflow.workflow_permanent_id}/run`)
}
>
<PlayIcon className="mr-2 h-4 w-4" />
diff --git a/skyvern-frontend/src/routes/workflows/components/WorkflowsTable.tsx b/skyvern-frontend/src/routes/workflows/components/WorkflowsTable.tsx
index 039be0b78..2366e39e9 100644
--- a/skyvern-frontend/src/routes/workflows/components/WorkflowsTable.tsx
+++ b/skyvern-frontend/src/routes/workflows/components/WorkflowsTable.tsx
@@ -84,7 +84,7 @@ function WorkflowsTable() {
if (event.ctrlKey || event.metaKey) {
window.open(
window.location.origin +
- `/workflows/${workflow.workflow_permanent_id}`,
+ `/agents/${workflow.workflow_permanent_id}`,
"_blank",
"noopener,noreferrer",
);
diff --git a/skyvern-frontend/src/routes/workflows/components/tree/WorkflowRow.tsx b/skyvern-frontend/src/routes/workflows/components/tree/WorkflowRow.tsx
index 57867f51a..f07b5f412 100644
--- a/skyvern-frontend/src/routes/workflows/components/tree/WorkflowRow.tsx
+++ b/skyvern-frontend/src/routes/workflows/components/tree/WorkflowRow.tsx
@@ -274,7 +274,7 @@ function WorkflowRow({ workflow, depth = 0 }: WorkflowRowProps) {
onClick={(event) => {
handleIconClick(
event,
- `/workflows/${workflow.workflow_permanent_id}/run`,
+ `/agents/${workflow.workflow_permanent_id}/run`,
);
}}
>
diff --git a/skyvern-frontend/src/routes/workflows/debugger/DebuggerBlockRuns.tsx b/skyvern-frontend/src/routes/workflows/debugger/DebuggerBlockRuns.tsx
index 7d26ed759..c2bfb72a1 100644
--- a/skyvern-frontend/src/routes/workflows/debugger/DebuggerBlockRuns.tsx
+++ b/skyvern-frontend/src/routes/workflows/debugger/DebuggerBlockRuns.tsx
@@ -64,7 +64,7 @@ function DebuggerBlockRuns() {
}
navigate(
- `/workflows/${run.workflow_permanent_id}/${run.workflow_run_id}/${blockLabel}/build`,
+ `/agents/${run.workflow_permanent_id}/${run.workflow_run_id}/${blockLabel}/build`,
);
};
diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx
index f8194f8e6..fc5815d85 100644
--- a/skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowHeader.tsx
@@ -75,7 +75,7 @@ function BrowserModeButton() {
const handleClick = () => {
const target = debugStore.isDebugMode ? "edit" : "build";
- navigate(`/workflows/${workflowPermanentId}/${target}`);
+ navigate(`/agents/${workflowPermanentId}/${target}`);
};
return (
@@ -214,7 +214,7 @@ function RunButton() {
const handleClick = () => {
closeWorkflowPanel();
- navigate(`/workflows/${workflowPermanentId}/run`);
+ navigate(`/agents/${workflowPermanentId}/run`);
};
return (
diff --git a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx
index 2b4dca309..5286841c2 100644
--- a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx
@@ -819,7 +819,7 @@ function Workspace({
// Per-workflow store reset. Earlier revisions did this from
// `useMountEffect`, but the Workspace instance can be reused across
// workflows when the parent route doesn't key by workflowPermanentId
- // (e.g. /workflows/A/build → /workflows/B/build); in that case the
+ // (e.g. /agents/A/build → /agents/B/build); in that case the
// mount-only initializer would skip and selectedBlockId / showAllCode /
// sidebar save timestamps would leak from A into B. Keying this on
// `workflowPermanentId` fires the reset on every workflow change,
diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx
index 808ae853e..e287bb865 100644
--- a/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/nodes/components/NodeHeader.tsx
@@ -575,10 +575,10 @@ function NodeHeader({
bl: label,
});
search.set(STUDIO_PANES_PARAM, panes.join(","));
- navigate(`/workflows/${workflowPermanentId}/studio?${search}`);
+ navigate(`/agents/${workflowPermanentId}/studio?${search}`);
} else {
navigate(
- `/workflows/${workflowPermanentId}/${response.data.run_id}/${label}/build`,
+ `/agents/${workflowPermanentId}/${response.data.run_id}/${label}/build`,
);
}
},
diff --git a/skyvern-frontend/src/routes/workflows/studio/RunTab.tsx b/skyvern-frontend/src/routes/workflows/studio/RunTab.tsx
index 09b67cb03..12abbe4f3 100644
--- a/skyvern-frontend/src/routes/workflows/studio/RunTab.tsx
+++ b/skyvern-frontend/src/routes/workflows/studio/RunTab.tsx
@@ -42,7 +42,7 @@ export function RunTab() {
onRetry={
isBlockRun
? undefined
- : () => navigate(`/workflows/${workflowPermanentId}/run`)
+ : () => navigate(`/agents/${workflowPermanentId}/run`)
}
/>
);
diff --git a/skyvern-frontend/src/routes/workflows/studio/StudioTopBar.test.tsx b/skyvern-frontend/src/routes/workflows/studio/StudioTopBar.test.tsx
index e297ee04e..b1175a393 100644
--- a/skyvern-frontend/src/routes/workflows/studio/StudioTopBar.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/studio/StudioTopBar.test.tsx
@@ -39,7 +39,7 @@ function renderAt(path: string) {
element={<RunStopButton />}
/>
<Route
- path="/workflows/:workflowPermanentId/run"
+ path="/agents/:workflowPermanentId/run"
element={<LocationProbe />}
/>
</Routes>
@@ -76,7 +76,7 @@ describe("RunStopButton concurrency with a live block run", () => {
fireEvent.click(screen.getByRole("button", { name: "Start full run" }));
expect(screen.getByTestId("location").textContent).toBe(
- "/workflows/wpid_1/run",
+ "/agents/wpid_1/run",
);
});
@@ -104,7 +104,7 @@ describe("RunStopButton concurrency with a live block run", () => {
expect(screen.queryByText("Start a full run?")).toBeNull();
expect(screen.getByTestId("location").textContent).toBe(
- "/workflows/wpid_1/run",
+ "/agents/wpid_1/run",
);
});
});
diff --git a/skyvern-frontend/src/routes/workflows/studio/StudioTopBar.tsx b/skyvern-frontend/src/routes/workflows/studio/StudioTopBar.tsx
index a5fe3c5ac..6e3379772 100644
--- a/skyvern-frontend/src/routes/workflows/studio/StudioTopBar.tsx
+++ b/skyvern-frontend/src/routes/workflows/studio/StudioTopBar.tsx
@@ -170,7 +170,7 @@ export function RunStopButton() {
},
});
- const startFullRun = () => navigate(`/workflows/${workflowPermanentId}/run`);
+ const startFullRun = () => navigate(`/agents/${workflowPermanentId}/run`);
if (running && activeRunId) {
const stopDialog = (
diff --git a/skyvern-frontend/src/routes/workflows/studioNavigation.ts b/skyvern-frontend/src/routes/workflows/studioNavigation.ts
index d9cdc2874..3907295b2 100644
--- a/skyvern-frontend/src/routes/workflows/studioNavigation.ts
+++ b/skyvern-frontend/src/routes/workflows/studioNavigation.ts
@@ -10,7 +10,7 @@ export function workflowEditorPath(
search = "",
): string {
const leaf = studioEnabled ? "studio" : "build";
- return `/workflows/${workflowPermanentId}/${leaf}${search}`;
+ return `/agents/${workflowPermanentId}/${leaf}${search}`;
}
/**
@@ -23,5 +23,5 @@ export function legacyRunDetailPath(
): string {
return env.useNewRunsUrl
? `/runs/${workflowRunId}`
- : `/workflows/${workflowPermanentId}/${workflowRunId}/overview`;
+ : `/agents/${workflowPermanentId}/${workflowRunId}/overview`;
}
diff --git a/skyvern-frontend/src/routes/workflows/useAgentsPathMatch.ts b/skyvern-frontend/src/routes/workflows/useAgentsPathMatch.ts
new file mode 100644
index 000000000..7f3cec9e1
--- /dev/null
+++ b/skyvern-frontend/src/routes/workflows/useAgentsPathMatch.ts
@@ -0,0 +1,16 @@
+import { type PathMatch, useMatch } from "react-router-dom";
+
+/**
+ * Matches an /agents sub-path, also honoring the legacy /workflows alias.
+ * The alias arm only fires in ancestors that render during the redirect's
+ * in-flight frame (RootLayout, DebugStoreProvider) — it keeps the sidebar
+ * from flashing on old bookmarks. Components mounted inside the /agents
+ * subtree never see a /workflows URL.
+ */
+function useAgentsPathMatch(subPattern: string): PathMatch<string> | null {
+ const agentsMatch = useMatch(`/agents${subPattern}`);
+ const legacyMatch = useMatch(`/workflows${subPattern}`);
+ return agentsMatch ?? legacyMatch;
+}
+
+export { useAgentsPathMatch };
diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunVerificationCodeForm.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunVerificationCodeForm.tsx
index 22bf92b21..e073de952 100644
--- a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunVerificationCodeForm.tsx
+++ b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunVerificationCodeForm.tsx
@@ -19,7 +19,7 @@ function WorkflowRunVerificationCodeForm({
const navigateUrl =
workflowRun?.workflow?.workflow_permanent_id && workflowRun?.workflow_run_id
- ? `/workflows/${workflowRun.workflow.workflow_permanent_id}/${workflowRun.workflow_run_id}`
+ ? `/agents/${workflowRun.workflow.workflow_permanent_id}/${workflowRun.workflow_run_id}`
: undefined;
return (
diff --git a/skyvern-frontend/src/store/DebugStoreContext.tsx b/skyvern-frontend/src/store/DebugStoreContext.tsx
index e1733d455..4c95bf8a0 100644
--- a/skyvern-frontend/src/store/DebugStoreContext.tsx
+++ b/skyvern-frontend/src/store/DebugStoreContext.tsx
@@ -1,12 +1,12 @@
import React, { createContext, useMemo } from "react";
-import { useMatch } from "react-router-dom";
import { useWorkflowStudioEnabled } from "@/hooks/useWorkflowStudioEnabled";
+import { useAgentsPathMatch } from "@/routes/workflows/useAgentsPathMatch";
function useIsDebugMode() {
- const workflowBuildMatch = useMatch("/workflows/:workflowPermanentId/build");
- const workflowBlockBuildMatch = useMatch(
- "/workflows/:workflowPermanentId/:workflowRunId/:blockLabel/build",
+ const workflowBuildMatch = useAgentsPathMatch("/:workflowPermanentId/build");
+ const workflowBlockBuildMatch = useAgentsPathMatch(
+ "/:workflowPermanentId/:workflowRunId/:blockLabel/build",
);
return useMemo(
() => Boolean(workflowBuildMatch || workflowBlockBuildMatch),
@@ -17,8 +17,8 @@ function useIsDebugMode() {
// Studio offers block runs without the constrained debug-view chrome; the active
// block run is carried in query params (not the path) so the canvas doesn't re-layout.
function useBlockRunsEnabled() {
- const editMatch = useMatch("/workflows/:workflowPermanentId/edit");
- const studioMatch = useMatch("/workflows/:workflowPermanentId/studio");
+ const editMatch = useAgentsPathMatch("/:workflowPermanentId/edit");
+ const studioMatch = useAgentsPathMatch("/:workflowPermanentId/studio");
const studioEnabled = useWorkflowStudioEnabled();
return useMemo(
() => studioEnabled && Boolean(editMatch || studioMatch),
diff --git a/skyvern-frontend/src/util/onboarding/contextualHints.test.ts b/skyvern-frontend/src/util/onboarding/contextualHints.test.ts
index ee3fe6bdf..44376a830 100644
--- a/skyvern-frontend/src/util/onboarding/contextualHints.test.ts
+++ b/skyvern-frontend/src/util/onboarding/contextualHints.test.ts
@@ -19,19 +19,21 @@ describe("HINT_REGISTRY", () => {
it("matches both the build and edit editor paths", () => {
const block = HINT_REGISTRY.find((h) => h.id === "add-another-block")!;
+ expect(block.matchRoute("/agents/wpid_123/build")).toBe(true);
+ expect(block.matchRoute("/agents/wpid_123/edit")).toBe(true);
expect(block.matchRoute("/workflows/wpid_123/build")).toBe(true);
- expect(block.matchRoute("/workflows/wpid_123/edit")).toBe(true);
- expect(block.matchRoute("/workflows")).toBe(false);
- expect(block.matchRoute("/workflows/wpid_123/runs")).toBe(false);
+ expect(block.matchRoute("/agents")).toBe(false);
+ expect(block.matchRoute("/agents/wpid_123/runs")).toBe(false);
});
- it("matches the runs and workflows list routes exactly", () => {
+ it("matches the runs and agents list routes exactly", () => {
const run = HINT_REGISTRY.find((h) => h.id === "run-recording")!;
const tmpl = HINT_REGISTRY.find((h) => h.id === "start-template")!;
expect(run.matchRoute("/runs")).toBe(true);
expect(run.matchRoute("/runs/abc")).toBe(false);
+ expect(tmpl.matchRoute("/agents")).toBe(true);
expect(tmpl.matchRoute("/workflows")).toBe(true);
- expect(tmpl.matchRoute("/workflows/wpid_1/edit")).toBe(false);
+ expect(tmpl.matchRoute("/agents/wpid_1/edit")).toBe(false);
});
it("gates the template hint on no first save", () => {
diff --git a/skyvern-frontend/src/util/onboarding/contextualHints.ts b/skyvern-frontend/src/util/onboarding/contextualHints.ts
index d10603698..4e051d355 100644
--- a/skyvern-frontend/src/util/onboarding/contextualHints.ts
+++ b/skyvern-frontend/src/util/onboarding/contextualHints.ts
@@ -21,7 +21,7 @@ export type ContextualHint = {
};
};
-const EDITOR_ROUTE = /^\/workflows\/[^/]+\/(?:build|edit|studio)$/;
+const EDITOR_ROUTE = /^\/(?:agents|workflows)\/[^/]+\/(?:build|edit|studio)$/;
export const HINT_REGISTRY: readonly ContextualHint[] = [
{
@@ -59,7 +59,9 @@ export const HINT_REGISTRY: readonly ContextualHint[] = [
surface: "dashboard",
seenKey: "seen_hint_template",
anchor: "[data-hint='start-template']",
- matchRoute: (pathname) => pathname === "/workflows",
+ // "/workflows" is the permanent legacy alias that redirects to /agents.
+ matchRoute: (pathname) =>
+ pathname === "/agents" || pathname === "/workflows",
prerequisite: (state) => state.first_save_at === null,
popover: {
title: "Start from a template",