Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Demonstrate task: consistent naming and entry point (SKY-17916) (#8962)
Cindy Li291099551c2a
diff --git a/docs/cloud/quickstart.mdx b/docs/cloud/quickstart.mdxindex a943fd406..cd8144c12 100644--- a/docs/cloud/quickstart.mdx+++ b/docs/cloud/quickstart.mdx@@ -31,7 +31,7 @@ You describe a task in plain words. Copilot turns it into an agent, tests it inClick the arrow to send.- **Try an example** below the box fills in a ready-made prompt you can edit.- - The **+** menu attaches files to the prompt (**Upload document**) or starts a recording of you doing the task yourself (**Record task**).+ - The **+** menu attaches files to the prompt (**Upload document**) or lets you do the task in the browser yourself (**Demonstrate task**).- The microphone button lets you dictate the prompt.<img src="/images/cloud/cloud-home-prompt.png" alt="Home with the Hacker News task typed in the What task would you like to accomplish box and the Try an example cards below" />diff --git a/docs/cloud/studio.mdx b/docs/cloud/studio.mdxindex bf10ca119..885517027 100644--- a/docs/cloud/studio.mdx+++ b/docs/cloud/studio.mdx@@ -85,7 +85,7 @@ Open the **Editor** pane. Blocks run top to bottom in the order shown.Hover over the **+** on the line between two blocks (or under **Start** on a new agent).</Step><Step title="Choose Add Block">- The menu offers **Add Block**, **Record Task** (do the steps yourself in a live browser and turn them into blocks) and **Upload SOP** (generate blocks from a PDF procedure).+ The menu offers **Add Block**, **Demonstrate task** (do the steps yourself in a live browser and turn them into blocks) and **Upload SOP** (generate blocks from a PDF procedure).</Step><Step title="Pick a block">The block library lists every block. Type in **Search blocks...** to filter, then click a block to insert it.diff --git a/skyvern-frontend/src/components/BrowserStream.tsx b/skyvern-frontend/src/components/BrowserStream.tsxindex 5a70a05c5..e83e9f36e 100644--- a/skyvern-frontend/src/components/BrowserStream.tsx+++ b/skyvern-frontend/src/components/BrowserStream.tsx@@ -1075,7 +1075,7 @@ function BrowserStream({<div className="relative h-full w-full"><div className="pointer-events-auto absolute top-[-3rem] flex w-full items-center justify-start gap-2"><RecordingPill />- <Tip content="Your actions appear in Copilot while you demonstrate the task. Stop when you are ready, or discard from the recording menu.">+ <Tip content="Your actions appear in Copilot while you demonstrate the task. Finish when you are ready, or discard from the demonstration menu."><div className="cursor-pointer text-red-500"><InfoCircledIcon /></div>diff --git a/skyvern-frontend/src/components/RecordingPill.tsx b/skyvern-frontend/src/components/RecordingPill.tsxindex 9e91c84ef..9e22ee7c6 100644--- a/skyvern-frontend/src/components/RecordingPill.tsx+++ b/skyvern-frontend/src/components/RecordingPill.tsx@@ -54,7 +54,7 @@ export function RecordingPill() {"opacity-50": finishRequested,})}/>- {finishRequested ? "CREATING STEPS" : "RECORDING TASK"}{" "}+ {finishRequested ? "CREATING STEPS" : "DEMONSTRATING TASK"}{" "}{formatRecordingClock(elapsedSeconds)}<span className="text-red-400/80">·</span>{count}diff --git a/skyvern-frontend/src/routes/browserSessions/hooks/useProcessRecordingMutation.ts b/skyvern-frontend/src/routes/browserSessions/hooks/useProcessRecordingMutation.tsindex b0a436ad1..8c4029123 100644--- a/skyvern-frontend/src/routes/browserSessions/hooks/useProcessRecordingMutation.ts+++ b/skyvern-frontend/src/routes/browserSessions/hooks/useProcessRecordingMutation.ts@@ -268,7 +268,7 @@ const useProcessRecordingMutation = ({variant: "warning",title: "No workflow steps created",description:- "Skyvern couldn't turn this task recording into workflow steps.",+ "Skyvern couldn't turn your demonstration into workflow steps.",});},onError: (error, { owner }) => {diff --git a/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx b/skyvern-frontend/src/routes/tasks/create/PromptBox.tsxindex 09e275948..2b352a44c 100644--- a/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx+++ b/skyvern-frontend/src/routes/tasks/create/PromptBox.tsx@@ -446,7 +446,9 @@ function PromptBoxImpl(const recordTaskMutation = useMutation({mutationFn: async () => {const client = await getClient(credentialGetter);- const yaml = convertToYAML(buildBlankWorkflowRequest("Recorded Agent"));+ const yaml = convertToYAML(+ buildBlankWorkflowRequest("Demonstrated Agent"),+ );const result = await client.post<string, AxiosResponse<unknown>>("/workflows",yaml,@@ -471,7 +473,7 @@ function PromptBoxImpl();},onError: (error: AxiosError) => {- showCreateErrorToast("Could not start recording", error);+ showCreateErrorToast("Could not start demonstration", error);},});@@ -829,7 +831,7 @@ function PromptBoxImpl(}}><VideoIcon className="mr-2 size-4" />- Record task+ Demonstrate task</DropdownMenuItem></DropdownMenuContent></DropdownMenu>diff --git a/skyvern-frontend/src/routes/workflows/copilot/RecordingRefinementProgressCard.tsx b/skyvern-frontend/src/routes/workflows/copilot/RecordingRefinementProgressCard.tsxindex b9ab7b43d..27151969c 100644--- a/skyvern-frontend/src/routes/workflows/copilot/RecordingRefinementProgressCard.tsx+++ b/skyvern-frontend/src/routes/workflows/copilot/RecordingRefinementProgressCard.tsx@@ -38,7 +38,7 @@ function RecordingRefinementProgressCard({</span><span className="min-w-0 flex-1"><span className="block text-[12.5px] font-semibold text-foreground">- Recorded {actionCount} action{actionCount === 1 ? "" : "s"}+ Captured {actionCount} action{actionCount === 1 ? "" : "s"}</span><span className="mt-0.5 block text-[10.5px] text-muted-foreground">Task demonstration captured@@ -55,10 +55,10 @@ function RecordingRefinementProgressCard({: complete? awaitingReview? "The draft workflow is ready for you to review. I didn’t run it while refining."- : "I drafted a workflow from the recording without running it. Run it to check it works."+ : "I drafted a workflow from your demonstration without running it. Run it to check it works.": status === "cancelled"- ? "I stopped refining this recording."- : "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again."}+ ? "I stopped refining this demonstration."+ : "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again."}</p><div className="flex items-center gap-2 pl-1 text-xs text-muted-foreground">@@ -71,7 +71,7 @@ function RecordingRefinementProgressCard({)}<span>{working- ? `Reviewing ${actionCount} recorded action${actionCount === 1 ? "" : "s"}`+ ? `Reviewing ${actionCount} captured action${actionCount === 1 ? "" : "s"}`: complete? awaitingReview? "Draft ready for review"diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.composerControls.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.composerControls.test.tsxindex 996056bd9..2bf890485 100644--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.composerControls.test.tsx+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.composerControls.test.tsx@@ -182,7 +182,7 @@ vi.mock("@/routes/workflows/editor/recording/RecordingPanel", async () => {</button>) : (<button type="button" onClick={() => onExpandedChange?.(true)}>- Expand recording+ Expand demonstration</button>)}</div>@@ -614,7 +614,7 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {expect(ta.closest("[class*='focus-within']")).not.toBeNull();});- it("starts SOP upload and task recording from the empty state", async () => {+ it("starts SOP upload and task demonstration from the empty state", async () => {const onUploadSOP = vi.fn();const onRecordTask = vi.fn();@@ -632,7 +632,7 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {expect(screen.getByText("What should this agent do?")).toBeTruthy(),);expect(screen.getByText("Upload an SOP")).toBeTruthy();- expect(screen.getByText("Record task")).toBeTruthy();+ expect(screen.getByText("Demonstrate task")).toBeTruthy();const actionLayout = screen.getByRole("button", {name: "Upload an SOP",}).parentElement?.parentElement;@@ -648,11 +648,11 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {});expect(onUploadSOP).toHaveBeenCalledWith(file);- fireEvent.click(screen.getByRole("button", { name: "Record task" }));+ fireEvent.click(screen.getByRole("button", { name: "Demonstrate task" }));expect(onRecordTask).toHaveBeenCalledTimes(1);});- it("does not allow SOP upload and task recording at the same time", async () => {+ it("does not allow SOP upload and task demonstration at the same time", async () => {const onUploadSOP = vi.fn();const onRecordTask = vi.fn();const { rerender } = render(@@ -671,7 +671,7 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {expect(screen.getByText("Uploading SOP…")).toBeTruthy(),);const recordTaskButton = screen.getByRole("button", {- name: "Record task",+ name: "Demonstrate task",});expect(recordTaskButton.hasAttribute("disabled")).toBe(true);expect(recordTaskButton.parentElement?.getAttribute("tabindex")).toBe("0");@@ -735,7 +735,7 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {],},});- fireEvent.click(screen.getByRole("button", { name: "Record task" }));+ fireEvent.click(screen.getByRole("button", { name: "Demonstrate task" }));expect(onUploadSOP).not.toHaveBeenCalled();expect(onRecordTask).not.toHaveBeenCalled();},@@ -837,7 +837,9 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {.getByTestId("recording-inline").getAttribute("data-mount-id");- fireEvent.click(screen.getByRole("button", { name: "Expand recording" }));+ fireEvent.click(+ screen.getByRole("button", { name: "Expand demonstration" }),+ );expect(screen.getByTestId("recording-focus")).toBeTruthy();expect(document.querySelectorAll('[data-recording-controller="true"]'),diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.demonstration.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.demonstration.test.tsxindex c90d441ea..a237c35d9 100644--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.demonstration.test.tsx+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.demonstration.test.tsx@@ -301,7 +301,7 @@ describe("WorkflowCopilotChat demonstration", () => {insertion: { after_label: "open_form", before_label: "finish" },});const status = screen- .getByText("Recording · 0 actions")+ .getByText("Demonstrating · 0 actions").closest('[role="status"]');expect(status?.querySelector(".bg-red-500")).toBeTruthy();expect(status?.querySelector("svg")).toBeNull();@@ -441,7 +441,7 @@ describe("WorkflowCopilotChat demonstration", () => {).not.toHaveProperty("demonstration_insertion");expect(- await screen.findByText("Recording paused · 2 actions"),+ await screen.findByText("Demonstration paused · 2 actions"),).toBeTruthy();expect(useRecordingLauncherStore.getState()@@ -477,7 +477,7 @@ describe("WorkflowCopilotChat demonstration", () => {).toHaveLength(2),);await waitFor(() =>- expect(screen.queryByText("Recording paused · 2 actions")).toBeNull(),+ expect(screen.queryByText("Demonstration paused · 2 actions")).toBeNull(),);const sentGroup = screen.getByRole("group", {@@ -554,7 +554,7 @@ describe("WorkflowCopilotChat demonstration", () => {sansApiPost.mockRejectedValueOnce(new Error("network down"));fireEvent.click(await screen.findByRole("button", { name: "Discard" }));await waitFor(() => expect(sansApiPost).toHaveBeenCalledTimes(1));- expect(await screen.findByText("Recording · 1 action")).toBeTruthy();+ expect(await screen.findByText("Demonstrating · 1 action")).toBeTruthy();expect(screen.getByRole("group", { name: "Your demonstration" }),).toBeTruthy();@@ -574,7 +574,7 @@ describe("WorkflowCopilotChat demonstration", () => {),);await waitFor(() => {- expect(screen.queryByText("Recording · 1 action")).toBeNull();+ expect(screen.queryByText("Demonstrating · 1 action")).toBeNull();expect(screen.queryByRole("group", { name: "Your demonstration" }),).toBeNull();@@ -817,7 +817,7 @@ describe("WorkflowCopilotChat demonstration", () => {}const pausedText = await screen.findByText(- "Recording paused · 3 actions",+ "Demonstration paused · 3 actions",);const pausedStatus = pausedText.closest('[role="status"]');expect(pausedStatus).toBeTruthy();@@ -864,7 +864,7 @@ describe("WorkflowCopilotChat demonstration", () => {);if (status === "stopping") {expect(- await screen.findByText("Recording paused · 3 actions"),+ await screen.findByText("Demonstration paused · 3 actions"),).toBeTruthy();await waitFor(() =>expect(@@ -884,7 +884,9 @@ describe("WorkflowCopilotChat demonstration", () => {).toHaveLength(2),);await waitFor(() =>- expect(screen.queryByText("Recording paused · 3 actions")).toBeNull(),+ expect(+ screen.queryByText("Demonstration paused · 3 actions"),+ ).toBeNull(),);}expect(diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runGrounding.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runGrounding.test.tsxindex 355f05490..51ff34f2c 100644--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runGrounding.test.tsx+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.runGrounding.test.tsx@@ -361,9 +361,9 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {"I have the demonstration. I’m turning it into workflow steps now.",),).toBeTruthy();- expect(screen.getByText("Recorded 2 actions")).toBeTruthy();+ expect(screen.getByText("Captured 2 actions")).toBeTruthy();expect(screen.getByText("Task demonstration captured")).toBeTruthy();- expect(screen.getByText("Reviewing 2 recorded actions")).toBeTruthy();+ expect(screen.getByText("Reviewing 2 captured actions")).toBeTruthy();await act(async () => {streamCalls[0]?.onMessage({@@ -454,7 +454,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {).toBeTruthy();expect(screen.queryByText(- "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again.",+ "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again.",),).toBeNull();@@ -588,7 +588,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {).toBeTruthy();expect(screen.queryByText(- "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again.",+ "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again.",),).toBeNull();@@ -620,7 +620,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {expect(screen.getByText(- "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again.",+ "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again.",),).toBeTruthy();expect(@@ -1063,7 +1063,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {expect(screen.getByText(- "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again.",+ "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again.",),).toBeTruthy();expect(@@ -1168,7 +1168,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {).toBeTruthy();expect(screen.queryByText(- "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again.",+ "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again.",),).toBeNull();expect(@@ -1292,7 +1292,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {expect(screen.getByText("Draft ready to test")).toBeTruthy();expect(screen.getByText(- "I drafted a workflow from the recording without running it. Run it to check it works.",+ "I drafted a workflow from your demonstration without running it. Run it to check it works.",),).toBeTruthy();expect(@@ -1348,7 +1348,9 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {await renderChat();- expect(screen.getByText("I stopped refining this recording.")).toBeTruthy();+ expect(+ screen.getByText("I stopped refining this demonstration."),+ ).toBeTruthy();expect(screen.getByText("Refinement cancelled")).toBeTruthy();});@@ -1383,7 +1385,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {});expect(screen.getByText(- "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again.",+ "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again.",),).toBeTruthy();@@ -1427,7 +1429,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {expect(screen.getByText("Draft ready to test")).toBeTruthy();expect(screen.getByText(- "I drafted a workflow from the recording without running it. Run it to check it works.",+ "I drafted a workflow from your demonstration without running it. Run it to check it works.",),).toBeTruthy();});@@ -1633,7 +1635,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {expect(screen.getByText(- "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again.",+ "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again.",),).toBeTruthy();expect(screen.getByText("Refinement needs attention")).toBeTruthy();@@ -1684,7 +1686,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {expect(screen.getByText(- "I couldn’t finish refining this recording. Your recorded steps are still in the editor, so you can edit them there or ask me to try again.",+ "I couldn’t finish refining this demonstration. The captured steps are still in the editor, so you can edit them there or ask me to try again.",),).toBeTruthy();expect(screen.getByText("Refinement needs attention")).toBeTruthy();@@ -1743,7 +1745,7 @@ describe("WorkflowCopilotChat — run grounding bridge", () => {await waitFor(() =>expect(- screen.getByText("I stopped refining this recording."),+ screen.getByText("I stopped refining this demonstration."),).toBeTruthy(),);expect(screen.getByText("Refinement cancelled")).toBeTruthy();diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsxindex 85678fa32..c684e20cc 100644--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx@@ -1370,12 +1370,12 @@ function RecordingChapterProxy({><span className="block truncate text-xs font-semibold text-foreground">{isFinishing- ? "Finishing recording…"+ ? "Finishing demonstration…": "Copilot is following along"}</span><span className="block truncate text-[10.5px] text-muted-foreground">{isFinishing ? (- "Saving the last recorded actions"+ "Saving the last actions") : (<>{actionCount} captured action{actionCount === 1 ? "" : "s"}@@ -1387,8 +1387,8 @@ function RecordingChapterProxy({<div ref={stopSlotRef} className="flex shrink-0" /><buttontype="button"- aria-label="Expand recording"- title="Expand recording"+ aria-label="Expand demonstration"+ title="Expand demonstration"onClick={onExpand}className="flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">@@ -11119,7 +11119,7 @@ export function WorkflowCopilotChat({content={recordTaskDisabled? (authoringUnavailableReason ??- "Record Task is available when the browser is ready")+ "Demonstrate task is available when the browser is ready"): "Skyvern records your clicks, typing, and navigation, then turns them into workflow steps"}blocked={recordTaskDisabled}@@ -11128,7 +11128,7 @@ export function WorkflowCopilotChat({><buttontype="button"- aria-label="Record task"+ aria-label="Demonstrate task"className="flex w-full min-w-0 items-center gap-3 rounded-lg border border-border bg-slate-elevation3 p-3 text-left transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"disabled={recordTaskDisabled}onClick={() => {@@ -11141,7 +11141,7 @@ export function WorkflowCopilotChat({</span><span className="min-w-0"><span className="block font-medium text-foreground">- Record task+ Demonstrate task</span><span className="mt-0.5 block text-xs leading-snug text-muted-foreground">Do it once in the browser@@ -12192,8 +12192,8 @@ export function WorkflowCopilotChat({)}<span>{demonstrationRecorder.phase === "recording"- ? "Recording"- : "Recording paused"}+ ? "Demonstrating"+ : "Demonstration paused"}{` · ${demonstrationRecorder.actionCount} ${demonstrationRecorder.actionCount === 1? "action"diff --git a/skyvern-frontend/src/routes/workflows/copilot/useDemonstrationRecorder.ts b/skyvern-frontend/src/routes/workflows/copilot/useDemonstrationRecorder.tsindex 563a0b050..412e4e267 100644--- a/skyvern-frontend/src/routes/workflows/copilot/useDemonstrationRecorder.ts+++ b/skyvern-frontend/src/routes/workflows/copilot/useDemonstrationRecorder.ts@@ -156,9 +156,9 @@ export function useDemonstrationRecorder({if (frame.reason === "event_limit") {setLimitReached(true);toast({- title: "This recording reached its size limit",+ title: "This demonstration reached its size limit",description:- "Build the workflow from what was recorded, or discard it.",+ "Build the workflow from the captured actions, or discard the demonstration.",});}updatePhase("stopped");@@ -337,7 +337,7 @@ export function useDemonstrationRecorder({setHasSkippedSensitiveField(false);if (stopped?.action_count === 0) {setActionCount(0);- toast({ title: "Nothing was recorded yet" });+ toast({ title: "No actions captured yet" });updateBusy(false);return;}diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowAddMenu.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowAddMenu.tsxindex 516402762..1e813c61d 100644--- a/skyvern-frontend/src/routes/workflows/editor/WorkflowAddMenu.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowAddMenu.tsx@@ -53,7 +53,7 @@ function WorkflowAddMenu({},];- // Show Record Task whenever a browser session exists (ready or still+ // Show Demonstrate task whenever a browser session exists (ready or still// connecting). Disable it until the browser is actually ready so users// can see the action will be available without it popping in mid-load.if (settingsStore.isUsingABrowser || settingsStore.isLoadingABrowser) {@@ -64,7 +64,7 @@ function WorkflowAddMenu({canRecordTask &&settingsStore.isUsingABrowser &&!recordingStore.isRecording,- text: "Record Task",+ text: "Demonstrate task",onClick: () => {onRecord();},diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.test.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.test.tsxindex 087839b81..7c72467e8 100644--- a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.test.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.test.tsx@@ -2910,7 +2910,7 @@ describe("Discover recording handoff", () => {);});-describe("Record Browser pending-change prompt", () => {+describe("Demonstration pending-change prompt", () => {const del = vi.fn();beforeEach(() => {@@ -3008,11 +3008,11 @@ describe("Record Browser pending-change prompt", () => {act(() => useRecordingLauncherStore.getState().startRecordingAtEnd!());}- test("the Browser pane Record button asks first, and Save and record saves before recording", async () => {+ test("the demonstration action asks first, and Save and demonstrate saves before recording", async () => {renderPendingWorkspace();await clickBrowserPaneRecord();expect(- screen.getByText("Save or discard changes before recording"),+ screen.getByText("Save or discard changes before demonstrating"),).toBeTruthy();expect(useRecordingStore.getState().isRecording).toBe(false);@@ -3020,7 +3020,9 @@ describe("Record Browser pending-change prompt", () => {data: { ...(liveWorkflow as object), version: 2 },});await act(async () =>- fireEvent.click(screen.getByRole("button", { name: "Save and record" })),+ fireEvent.click(+ screen.getByRole("button", { name: "Save and demonstrate" }),+ ),);await waitFor(() =>expect(useRecordingStore.getState().isRecording).toBe(true),@@ -3029,7 +3031,7 @@ describe("Record Browser pending-change prompt", () => {expect(useWorkflowHasChangesStore.getState().pendingRecordingId).toBe(null);});- test("Save and record does not record if the browser stopped being ready during the save", async () => {+ test("Save and demonstrate does not record if the browser stopped being ready during the save", async () => {renderPendingWorkspace();await clickBrowserPaneRecord();put.mockImplementation(async () => {@@ -3037,7 +3039,9 @@ describe("Record Browser pending-change prompt", () => {return { data: { ...(liveWorkflow as object), version: 2 } };});await act(async () =>- fireEvent.click(screen.getByRole("button", { name: "Save and record" })),+ fireEvent.click(+ screen.getByRole("button", { name: "Save and demonstrate" }),+ ),);await waitFor(() =>expect(useWorkflowHasChangesStore.getState().pendingRecordingId).toBe(@@ -3048,12 +3052,12 @@ describe("Record Browser pending-change prompt", () => {expect(useRecordingStore.getState().isRecording).toBe(false);});- test("Discard and record reloads the saved workflow, deletes the old recording, then records", async () => {+ test("Discard and demonstrate reloads the saved workflow, deletes the old recording, then records", async () => {renderPendingWorkspace();await clickBrowserPaneRecord();await act(async () =>fireEvent.click(- screen.getByRole("button", { name: "Discard and record" }),+ screen.getByRole("button", { name: "Discard and demonstrate" }),),);await waitFor(() =>@@ -3074,7 +3078,9 @@ describe("Record Browser pending-change prompt", () => {}),);await clickBrowserPaneRecord();- const discard = screen.getByRole("button", { name: "Discard and record" });+ const discard = screen.getByRole("button", {+ name: "Discard and demonstrate",+ });expect((discard as HTMLButtonElement).disabled).toBe(true);fireEvent.click(discard);await new Promise((resolve) => setTimeout(resolve, 0));@@ -3093,7 +3099,7 @@ describe("Record Browser pending-change prompt", () => {});await waitFor(() =>expect(- screen.getByText("Save or discard changes before recording"),+ screen.getByText("Save or discard changes before demonstrating"),).toBeTruthy(),);expect(@@ -3102,7 +3108,7 @@ describe("Record Browser pending-change prompt", () => {fireEvent.click(screen.getByRole("button", { name: "Cancel" }));await waitFor(() =>expect(- screen.queryByText("Save or discard changes before recording"),+ screen.queryByText("Save or discard changes before demonstrating"),).toBeNull(),);expect(useRecordingStore.getState().isRecording).toBe(false);diff --git a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsxindex 943939357..e6aeb709e 100644--- a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx@@ -1916,7 +1916,7 @@ function Workspace({},[authoringActionAvailability.canUploadSOP, sopToBlocksMutation],);- // `/discover`'s "Record task" lands here with ?record=1; start once the browser is ready.+ // `/discover`'s "Demonstrate task" lands here with ?record=1; start once the browser is ready.useEffect(() => {if (!autoRecordRequested ||diff --git a/skyvern-frontend/src/routes/workflows/editor/__tests__/WorkflowAddMenu.test.tsx b/skyvern-frontend/src/routes/workflows/editor/__tests__/WorkflowAddMenu.test.tsxindex e93c9cb47..f651e607c 100644--- a/skyvern-frontend/src/routes/workflows/editor/__tests__/WorkflowAddMenu.test.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/__tests__/WorkflowAddMenu.test.tsx@@ -70,10 +70,10 @@ function lastItems(): RadialMenuItem[] {}function recordTaskItem(items: RadialMenuItem[]) {- return items.find((i) => i.text === "Record Task");+ return items.find((i) => i.text === "Demonstrate task");}-describe("WorkflowAddMenu — Record Task item visibility/enabled state", () => {+describe("WorkflowAddMenu — Demonstrate task item visibility/enabled state", () => {beforeEach(() => {radialMenuMock.mockClear();});@@ -84,7 +84,7 @@ describe("WorkflowAddMenu — Record Task item visibility/enabled state", () =>cleanup();});- it("does NOT show the Record Task item when no session is using or loading (CORR-1 regression guard)", () => {+ it("does NOT show the Demonstrate task item when no session is using or loading (CORR-1 regression guard)", () => {useSettingsStore.getState().setIsUsingABrowser(false);useSettingsStore.getState().setIsLoadingABrowser(false);@@ -93,7 +93,7 @@ describe("WorkflowAddMenu — Record Task item visibility/enabled state", () =>expect(recordTaskItem(lastItems())).toBeUndefined();});- it("shows the Record Task item as DISABLED while a session is loading", () => {+ it("shows the Demonstrate task item as DISABLED while a session is loading", () => {useSettingsStore.getState().setIsUsingABrowser(false);useSettingsStore.getState().setIsLoadingABrowser(true);@@ -104,7 +104,7 @@ describe("WorkflowAddMenu — Record Task item visibility/enabled state", () =>expect(item?.enabled).toBe(false);});- it("shows the Record Task item as ENABLED once the browser is ready and not recording", () => {+ it("shows the Demonstrate task item as ENABLED once the browser is ready and not recording", () => {useSettingsStore.getState().setIsUsingABrowser(true);useSettingsStore.getState().setIsLoadingABrowser(false);useRecordingStore.setState({ isRecording: false });@@ -116,7 +116,7 @@ describe("WorkflowAddMenu — Record Task item visibility/enabled state", () =>expect(item?.enabled).toBe(true);});- it("disables the Record Task item while recording is in progress, even when isUsingABrowser is true", () => {+ it("disables the Demonstrate task item while recording is in progress, even when isUsingABrowser is true", () => {useSettingsStore.getState().setIsUsingABrowser(true);useSettingsStore.getState().setIsLoadingABrowser(false);useRecordingStore.setState({ isRecording: true });diff --git a/skyvern-frontend/src/routes/workflows/editor/edges/EdgeWithAddButton.test.tsx b/skyvern-frontend/src/routes/workflows/editor/edges/EdgeWithAddButton.test.tsxindex 86e185e3d..28019cef2 100644--- a/skyvern-frontend/src/routes/workflows/editor/edges/EdgeWithAddButton.test.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/edges/EdgeWithAddButton.test.tsx@@ -209,13 +209,17 @@ describe("EdgeWithAddButton", () => {const token = lock === "copilot" ? beginCopilotAcceptance() : null;if (lock === "yaml") expect(beginYamlCommit(owner)).toBe(true);renderEdge({}, { debug: true });- await act(async () => fireEvent.click(screen.getByText("Record Task")));+ await act(async () =>+ fireEvent.click(screen.getByText("Demonstrate task")),+ );expect(useRecordingStore.getState().isRecording).toBe(false);act(() => {if (token) finishCopilotAcceptance(token);else finishYamlCommit(owner);});- await act(async () => fireEvent.click(screen.getByText("Record Task")));+ await act(async () =>+ fireEvent.click(screen.getByText("Demonstrate task")),+ );expect(useRecordingStore.getState().isRecording).toBe(true);expect(useWorkflowYamlEditorStore.getState().authoringInProgress).toBe(true,@@ -241,7 +245,9 @@ describe("EdgeWithAddButton", () => {.getState().setPendingRecording("br-pending", "wpid_test");const { unmount } = renderEdge({}, { debug: true });- await act(async () => fireEvent.click(screen.getByText("Record Task")));+ await act(async () =>+ fireEvent.click(screen.getByText("Demonstrate task")),+ );expect(useRecordingStore.getState().isRecording).toBe(false);const blockedStart = usePendingRecordingStartGate.getState().blockedStart;expect(blockedStart).not.toBeNull();diff --git a/skyvern-frontend/src/routes/workflows/editor/nodes/NodeAdderNode/NodeAdderNode.test.tsx b/skyvern-frontend/src/routes/workflows/editor/nodes/NodeAdderNode/NodeAdderNode.test.tsxindex 76e2a2ab1..29aa1c425 100644--- a/skyvern-frontend/src/routes/workflows/editor/nodes/NodeAdderNode/NodeAdderNode.test.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/nodes/NodeAdderNode/NodeAdderNode.test.tsx@@ -209,13 +209,17 @@ describe("NodeAdderNode", () => {const token = lock === "copilot" ? beginCopilotAcceptance() : null;if (lock === "yaml") expect(beginYamlCommit(owner)).toBe(true);renderNodeAdder({}, { debug: true });- await act(async () => fireEvent.click(screen.getByText("Record Task")));+ await act(async () =>+ fireEvent.click(screen.getByText("Demonstrate task")),+ );expect(useRecordingStore.getState().isRecording).toBe(false);act(() => {if (token) finishCopilotAcceptance(token);else finishYamlCommit(owner);});- await act(async () => fireEvent.click(screen.getByText("Record Task")));+ await act(async () =>+ fireEvent.click(screen.getByText("Demonstrate task")),+ );expect(useRecordingStore.getState().isRecording).toBe(true);expect(useWorkflowYamlEditorStore.getState().authoringInProgress).toBe(true,@@ -244,7 +248,9 @@ describe("NodeAdderNode", () => {.getState().setPendingRecording("br-pending", "wpid_test");const { unmount } = renderNodeAdder({}, { debug: true });- await act(async () => fireEvent.click(screen.getByText("Record Task")));+ await act(async () =>+ fireEvent.click(screen.getByText("Demonstrate task")),+ );expect(useRecordingStore.getState().isRecording).toBe(false);const blockedStart = usePendingRecordingStartGate.getState().blockedStart;expect(blockedStart).not.toBeNull();diff --git a/skyvern-frontend/src/routes/workflows/editor/recording/PendingRecordingStartDialog.tsx b/skyvern-frontend/src/routes/workflows/editor/recording/PendingRecordingStartDialog.tsxindex 0b3f759d5..eeedf4d9d 100644--- a/skyvern-frontend/src/routes/workflows/editor/recording/PendingRecordingStartDialog.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/recording/PendingRecordingStartDialog.tsx@@ -23,8 +23,8 @@ import { usePendingRecordingStartGate } from "./pendingRecordingStartGate";function startOrExplain(start: (() => boolean) | null) {if (start && !start())toast({- title: "Recording didn't start",- description: "Where you chose to record changed. Click Record again.",+ title: "Demonstration didn't start",+ description: "The starting point changed. Choose Demonstrate task again.",});}@@ -148,7 +148,9 @@ export function PendingRecordingStartDialog({}}><DialogHeader>- <DialogTitle>Save or discard changes before recording</DialogTitle>+ <DialogTitle>+ Save or discard changes before demonstrating+ </DialogTitle><DialogDescription asChild><div className="space-y-2"><p>@@ -157,7 +159,7 @@ export function PendingRecordingStartDialog({? editorLocked? `${getWorkflowLockMessage()}.`: "Finish the current authoring action first."- : "Blocks from your last recording aren't saved yet.")}+ : "Blocks from your last demonstration aren't saved yet.")}</p><p>Discarding reloads the last saved version and removes these@@ -180,11 +182,11 @@ export function PendingRecordingStartDialog({disabled={saving || locked}onClick={discard}>- {discardRecords ? "Discard and record" : "Discard changes"}+ {discardRecords ? "Discard and demonstrate" : "Discard changes"}</Button><Button ref={saveRef} disabled={saving || locked} onClick={save}>{saving && <ReloadIcon className="mr-2 size-4 animate-spin" />}- Save and record+ Save and demonstrate</Button></DialogFooter></DialogContent>diff --git a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingFeedbackPrompt.test.tsx b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingFeedbackPrompt.test.tsxindex 191eb0701..ed4c287cb 100644--- a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingFeedbackPrompt.test.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingFeedbackPrompt.test.tsx@@ -152,7 +152,7 @@ describe("RecordingFeedbackPrompt", () => {}),]);- await click("Dismiss recording feedback");+ await click("Dismiss demonstration feedback");expect(screen.queryByTestId("recording-feedback-prompt")).toBeNull();act(() =>diff --git a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingFeedbackPrompt.tsx b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingFeedbackPrompt.tsxindex 4ec7aeabb..1b0e931ca 100644--- a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingFeedbackPrompt.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingFeedbackPrompt.tsx@@ -37,7 +37,7 @@ export function RecordingFeedbackPrompt({return (<divrole="group"- aria-label="Recording feedback"+ aria-label="Demonstration feedback"className="flex items-start justify-between gap-2 rounded-lg border border-border bg-slate-elevation2 px-3 py-2"data-testid="recording-feedback-prompt">@@ -62,13 +62,13 @@ export function RecordingFeedbackPrompt({}rate(target, rating, reasonCode, options);}}- prompt="Were these recorded steps helpful?"+ prompt="Were the steps from your demonstration helpful?"reasonOptions={REASON_OPTIONS}className="min-w-0 flex-1"/><buttontype="button"- aria-label="Dismiss recording feedback"+ aria-label="Dismiss demonstration feedback"onClick={dismiss}className="ml-1 inline-flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground">diff --git a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.test.tsx b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.test.tsxindex 1894d09c7..f2da4dd72 100644--- a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.test.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.test.tsx@@ -208,7 +208,7 @@ describe("RecordingPanel", () => {render(<RecordingPanel browserSessionId={null} />);const stopButton = screen.getByRole("button", {- name: /stop recording/i,+ name: /finish demonstration/i,}) as HTMLButtonElement;expect(stopButton.disabled).toBe(true);@@ -223,7 +223,7 @@ describe("RecordingPanel", () => {expect((screen.getByRole("button", {- name: /stop recording/i,+ name: /finish demonstration/i,}) as HTMLButtonElement).disabled,).toBe(true);@@ -231,7 +231,7 @@ describe("RecordingPanel", () => {rerender(<RecordingPanel browserSessionId="pbs_123" />);const stopButton = screen.getByRole("button", {- name: /stop recording/i,+ name: /finish demonstration/i,}) as HTMLButtonElement;expect(stopButton.disabled).toBe(false);@@ -251,7 +251,9 @@ describe("RecordingPanel", () => {<RecordingPanel browserSessionId="pbs_123" />,);- fireEvent.click(screen.getByRole("button", { name: /stop recording/i }));+ fireEvent.click(+ screen.getByRole("button", { name: /finish demonstration/i }),+ );// The debug session's browser_session_id blips to null while the// finalize timeout is pending.@@ -260,7 +262,7 @@ describe("RecordingPanel", () => {expect(mutateMock).not.toHaveBeenCalled();// It resolves again; the finalize wait should retry rather than- // leaving the panel stuck on "Finishing recording".+ // leaving the panel stuck on "Finishing demonstration".rerender(<RecordingPanel browserSessionId="pbs_123" />);vi.advanceTimersByTime(5000);@@ -280,7 +282,9 @@ describe("RecordingPanel", () => {<RecordingPanel browserSessionId="pbs_123" />,);- fireEvent.click(screen.getByRole("button", { name: /stop recording/i }));+ fireEvent.click(+ screen.getByRole("button", { name: /finish demonstration/i }),+ );rerender(<RecordingPanelbrowserSessionId="pbs_123"diff --git a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.tsx b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.tsxindex 81f9ebea4..43f538abf 100644--- a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.tsx@@ -572,7 +572,7 @@ function RecordingPanelImpl(const showInterpretationFallbackNote =!interpretationEnabled && exposedEventCount > 0;const headerTitle = isFinishing- ? "Finishing recording…"+ ? "Finishing demonstration…": "Copilot is following along";// Focusing and filling one field both carry its credential kind, so group by@@ -657,7 +657,7 @@ function RecordingPanelImpl(</div>) : null;- const stopLabel = mutationIsError ? "Try again" : "Stop recording";+ const stopLabel = mutationIsError ? "Try again" : "Finish demonstration";const renderStopButton = (className: string, iconOnly = false) => (<Buttonsize={iconOnly ? "icon" : "sm"}@@ -724,7 +724,7 @@ function RecordingPanelImpl(</div><div className="mt-0.5 truncate text-[11px] text-muted-foreground">{isFinishing- ? "Saving the last recorded actions"+ ? "Saving the last actions": `${actionCount} captured action${actionCount === 1 ? "" : "s"}`}</div></div>@@ -732,7 +732,7 @@ function RecordingPanelImpl(<buttontype="button"aria-label={- collapsed ? "Show recorded actions" : "Hide recorded actions"+ collapsed ? "Show captured actions" : "Hide captured actions"}onClick={() => onCollapsedChange?.(!collapsed)}className="flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"@@ -747,7 +747,7 @@ function RecordingPanelImpl(<buttontype="button"aria-label={- expanded ? "Return recording to chat" : "Expand recording"+ expanded ? "Return demonstration to chat" : "Expand demonstration"}onClick={() => onExpandedChange?.(!expanded)}className="flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"@@ -762,7 +762,7 @@ function RecordingPanelImpl(<DropdownMenuTrigger asChild><buttontype="button"- aria-label="Recording options"+ aria-label="Demonstration options"disabled={isFinishing && !mutationIsError}className="flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50">@@ -775,7 +775,7 @@ function RecordingPanelImpl(onSelect={onDiscardClick}><TrashIcon className="mr-2 size-4" />- Discard recording+ Discard demonstration</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -847,7 +847,7 @@ function RecordingPanelImpl(<div className="px-3 py-2 text-[11px] leading-relaxed text-muted-foreground">{exposedEventCount} interaction{exposedEventCount === 1 ? "" : "s"} captured — workflow steps- will be generated when you stop recording.+ will be generated when you finish the demonstration.</div>)}</div>@@ -879,7 +879,7 @@ function RecordingPanelImpl({insertionPointMissing && (<div className="flex-none border-t px-3.5 py-2 text-[11px] leading-relaxed text-red-700 dark:text-red-400">Could not determine where to insert workflow steps. Discard and choose- Record task from the workflow editor again.+ Demonstrate task from the workflow editor again.</div>)}@@ -892,8 +892,8 @@ function RecordingPanelImpl()}<span className="truncate">{isFinishing- ? "Finishing recording…"- : `Recording · ${formatRecordingClock(elapsedSeconds)}`}+ ? "Finishing demonstration…"+ : `Demonstrating · ${formatRecordingClock(elapsedSeconds)}`}</span></div>{isFinishing && !mutationIsError ? (@@ -909,14 +909,14 @@ function RecordingPanelImpl(<Dialog open onOpenChange={setConfirmDiscardOpen}><DialogContent><DialogHeader>- <DialogTitle>Discard task recording?</DialogTitle>+ <DialogTitle>Discard demonstration?</DialogTitle><DialogDescription>{visibleSteps.length > 0? `You have ${visibleSteps.length} captured workflow step${visibleSteps.length === 1 ? "" : "s"} that will be lost if you discard.`: "Your captured browser interactions will be lost if you discard."}{" "}- Are you sure you want to discard this task recording?+ Are you sure you want to discard this demonstration?</DialogDescription></DialogHeader><DialogFooter>@@ -924,7 +924,7 @@ function RecordingPanelImpl(variant="outline"onClick={() => setConfirmDiscardOpen(false)}>- Keep recording task+ Keep demonstrating</Button><Button variant="destructive" onClick={discard}>Discarddiff --git a/skyvern-frontend/src/routes/workflows/editor/recording/pendingRecordingStartGate.test.tsx b/skyvern-frontend/src/routes/workflows/editor/recording/pendingRecordingStartGate.test.tsxindex fa97d30f5..5cdb0fe35 100644--- a/skyvern-frontend/src/routes/workflows/editor/recording/pendingRecordingStartGate.test.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/recording/pendingRecordingStartGate.test.tsx@@ -108,7 +108,7 @@ describe("requestRecordingStart", () => {act(() => requestRecordingStart(start, "auto_record"));expect(start).not.toHaveBeenCalled();expect(- screen.getByText("Save or discard changes before recording"),+ screen.getByText("Save or discard changes before demonstrating"),).toBeTruthy();expect(screen.getByText(/This can't be undone/)).toBeTruthy();expect(blockedEvents()).toEqual([@@ -124,8 +124,8 @@ describe("requestRecordingStart", () => {});it.each([- ["Save and record", "save"],- ["Discard and record", "discard"],+ ["Save and demonstrate", "save"],+ ["Discard and demonstrate", "discard"],])("%s resolves the pending change, then starts", async (label) => {setPending();const onSave = vi.fn(async () => clearChanges());@@ -171,14 +171,16 @@ describe("requestRecordingStart", () => {});const start = vi.fn();act(() => requestRecordingStart(start, "launcher"));- await act(async () => fireEvent.click(screen.getByText("Save and record")));+ await act(async () =>+ fireEvent.click(screen.getByText("Save and demonstrate")),+ );expect(useWorkflowHasChangesStore.getState().pendingRecordingId).toBe("br-pending",);expect(start).not.toHaveBeenCalled();});- it("resumes Save and record after the code-cache confirmation saves", async () => {+ it("resumes Save and demonstrate after the code-cache confirmation saves", async () => {setPending();renderDialog(async () => {useWorkflowHasChangesStore@@ -188,10 +190,12 @@ describe("requestRecordingStart", () => {});const start = vi.fn();act(() => requestRecordingStart(start, "launcher"));- await act(async () => fireEvent.click(screen.getByText("Save and record")));+ await act(async () =>+ fireEvent.click(screen.getByText("Save and demonstrate")),+ );expect(start).not.toHaveBeenCalled();expect(- screen.queryByText("Save or discard changes before recording"),+ screen.queryByText("Save or discard changes before demonstrating"),).toBeNull();act(() => {clearChanges();@@ -202,7 +206,7 @@ describe("requestRecordingStart", () => {expect(start).toHaveBeenCalledOnce();});- it("keeps Save and record when the confirmation closes while its save is running", async () => {+ it("keeps Save and demonstrate when the confirmation closes while its save is running", async () => {setPending();renderDialog(async () => {useWorkflowHasChangesStore@@ -212,7 +216,9 @@ describe("requestRecordingStart", () => {});const start = vi.fn();act(() => requestRecordingStart(start, "launcher"));- await act(async () => fireEvent.click(screen.getByText("Save and record")));+ await act(async () =>+ fireEvent.click(screen.getByText("Save and demonstrate")),+ );// Yes was clicked; its save holds the editor when the dialog is dismissed.act(() => {useWorkflowYamlEditorStore.setState({ commitInProgress: true });@@ -238,7 +244,9 @@ describe("requestRecordingStart", () => {});const start = vi.fn();act(() => requestRecordingStart(start, "launcher"));- await act(async () => fireEvent.click(screen.getByText("Save and record")));+ await act(async () =>+ fireEvent.click(screen.getByText("Save and demonstrate")),+ );act(() =>useWorkflowHasChangesStore.getState()@@ -278,7 +286,7 @@ describe("requestRecordingStart", () => {const start = vi.fn();act(() => requestRecordingStart(start, "edge"));act(() => {- fireEvent.click(screen.getByText("Save and record"));+ fireEvent.click(screen.getByText("Save and demonstrate"));});act(change);await act(async () => finishSave());@@ -299,7 +307,7 @@ describe("requestRecordingStart", () => {recordsAfterDiscard: false,}),);- expect(screen.queryByText("Discard and record")).toBeNull();+ expect(screen.queryByText("Discard and demonstrate")).toBeNull();await act(async () =>fireEvent.click(screen.getByText("Discard changes")),);@@ -310,11 +318,11 @@ describe("requestRecordingStart", () => {},);- it("focuses Save and record when the prompt opens, never Discard", () => {+ it("focuses Save and demonstrate when the prompt opens, never Discard", () => {setPending();renderDialog();act(() => requestRecordingStart(vi.fn(), "launcher"));- expect(document.activeElement?.textContent).toBe("Save and record");+ expect(document.activeElement?.textContent).toBe("Save and demonstrate");});it("while save is paused, focuses Cancel and disables Save and Discard", () => {@@ -326,10 +334,10 @@ describe("requestRecordingStart", () => {act(() => requestRecordingStart(vi.fn(), "launcher"));expect(document.activeElement?.textContent).toBe("Cancel");expect(- screen.getByText("Save and record").closest("button")!.disabled,+ screen.getByText("Save and demonstrate").closest("button")!.disabled,).toBe(true);expect(- screen.getByText("Discard and record").closest("button")!.disabled,+ screen.getByText("Discard and demonstrate").closest("button")!.disabled,).toBe(true);});@@ -359,10 +367,10 @@ describe("requestRecordingStart", () => {expect(document.activeElement?.textContent).toBe("Cancel");expect(screen.getByText(message)).toBeTruthy();expect(- screen.getByText("Save and record").closest("button")!.disabled,+ screen.getByText("Save and demonstrate").closest("button")!.disabled,).toBe(true);expect(- screen.getByText("Discard and record").closest("button")!.disabled,+ screen.getByText("Discard and demonstrate").closest("button")!.disabled,).toBe(true);},);@@ -373,7 +381,7 @@ describe("requestRecordingStart", () => {const start = vi.fn();act(() => requestRecordingStart(start, "launcher"));await act(async () =>- fireEvent.click(screen.getByText("Discard and record")),+ fireEvent.click(screen.getByText("Discard and demonstrate")),);expect(start).not.toHaveBeenCalled();expect(toast).toHaveBeenCalledWith(@@ -393,11 +401,13 @@ describe("requestRecordingStart", () => {);canRecord = false;await act(async () =>- fireEvent.click(screen.getByRole("button", { name: "Save and record" })),+ fireEvent.click(+ screen.getByRole("button", { name: "Save and demonstrate" }),+ ),);expect(start).not.toHaveBeenCalled();expect(toast).toHaveBeenCalledWith(- expect.objectContaining({ title: "Recording didn't start" }),+ expect.objectContaining({ title: "Demonstration didn't start" }),);});@@ -411,7 +421,7 @@ describe("requestRecordingStart", () => {registerEditorOwner(createYamlCommitOwner("wpid_other"));});expect(- screen.queryByText("Save or discard changes before recording"),+ screen.queryByText("Save or discard changes before demonstrating"),).toBeNull();expect(usePendingRecordingStartGate.getState().blockedStart).toBe(null);expect(start).not.toHaveBeenCalled();@@ -426,7 +436,7 @@ describe("requestRecordingStart", () => {expect(usePendingRecordingStartGate.getState().blockedStart).toBe(null);act(() => setPending());expect(- screen.queryByText("Save or discard changes before recording"),+ screen.queryByText("Save or discard changes before demonstrating"),).toBeNull();expect(start).not.toHaveBeenCalled();});diff --git a/skyvern-frontend/src/routes/workflows/editor/recording/pendingRecordingStartGate.ts b/skyvern-frontend/src/routes/workflows/editor/recording/pendingRecordingStartGate.tsindex 86c6c47e2..3936b6fc6 100644--- a/skyvern-frontend/src/routes/workflows/editor/recording/pendingRecordingStartGate.ts+++ b/skyvern-frontend/src/routes/workflows/editor/recording/pendingRecordingStartGate.ts@@ -28,7 +28,7 @@ export const usePendingRecordingStartGate = create<{owner: null,}));-// Every Record Browser entry point starts through here: processing refuses a+// Every demonstration entry point starts through here: processing refuses a// recording while generated changes are pending, so asking afterwards would// waste the new demonstration.export function requestRecordingStart(diff --git a/skyvern-frontend/src/routes/workflows/editor/sortable/dragModeGate.test.ts b/skyvern-frontend/src/routes/workflows/editor/sortable/dragModeGate.test.tsindex 2cb7d8b68..c77ab2ca1 100644--- a/skyvern-frontend/src/routes/workflows/editor/sortable/dragModeGate.test.ts+++ b/skyvern-frontend/src/routes/workflows/editor/sortable/dragModeGate.test.ts@@ -32,7 +32,7 @@ describe("getDragGateReason (SKY-9061)", () => {test("returns the recording hint when recording is on", () => {expect(getDragGateReason({ isRecording: true, isCanvasLocked: false }),- ).toBe("Finish recording the task to reorder blocks");+ ).toBe("Finish the demonstration to reorder blocks");});test("returns the canvas-lock hint when only canvas is locked", () => {@@ -43,7 +43,7 @@ describe("getDragGateReason (SKY-9061)", () => {test("prefers recording hint when both gates are active", () => {expect(getDragGateReason({ isRecording: true, isCanvasLocked: true })).toBe(- "Finish recording the task to reorder blocks",+ "Finish the demonstration to reorder blocks",);});});diff --git a/skyvern-frontend/src/routes/workflows/editor/sortable/dragModeGate.ts b/skyvern-frontend/src/routes/workflows/editor/sortable/dragModeGate.tsindex a685236ad..dc96e19d9 100644--- a/skyvern-frontend/src/routes/workflows/editor/sortable/dragModeGate.ts+++ b/skyvern-frontend/src/routes/workflows/editor/sortable/dragModeGate.ts@@ -30,7 +30,7 @@ export function getDragGateReason({isRecording,isCanvasLocked,}: DragModeGateInputs): string | null {- if (isRecording) return "Finish recording the task to reorder blocks";+ if (isRecording) return "Finish the demonstration to reorder blocks";if (isCanvasLocked) return "Unlock canvas to reorder blocks";return null;}diff --git a/skyvern-frontend/src/routes/workflows/editor/sortable/dropBlockedToast.test.ts b/skyvern-frontend/src/routes/workflows/editor/sortable/dropBlockedToast.test.tsindex 9509dd16e..7a15ffa18 100644--- a/skyvern-frontend/src/routes/workflows/editor/sortable/dropBlockedToast.test.ts+++ b/skyvern-frontend/src/routes/workflows/editor/sortable/dropBlockedToast.test.ts@@ -57,15 +57,15 @@ describe("formatDropBlockedToast (SKY-9062)", () => {});describe("drag-mode", () => {- test("recording reason tells the user to stop recording", () => {+ test("demonstration reason tells the user to finish", () => {// Matches the tooltip text surfaced on the grip handle so both// affordances converge on the same fix (`getDragGateReason`).const content = formatDropBlockedToast({kind: "drag-mode",});- expect(content.title).toContain("recording");+ expect(content.title).toContain("demonstration");expect(content.description).toBe(- "Finish recording the task to reorder blocks.",+ "Finish the demonstration to reorder blocks.",);expect(content.details).toEqual([]);});diff --git a/skyvern-frontend/src/routes/workflows/editor/sortable/dropBlockedToast.tsx b/skyvern-frontend/src/routes/workflows/editor/sortable/dropBlockedToast.tsxindex 17e28feb9..80343b481 100644--- a/skyvern-frontend/src/routes/workflows/editor/sortable/dropBlockedToast.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/sortable/dropBlockedToast.tsx@@ -85,8 +85,8 @@ export function formatDropBlockedToast(}case "drag-mode": {return {- title: "Can't reorder: task recording is active",- description: "Finish recording the task to reorder blocks.",+ title: "Can't reorder: demonstration is active",+ description: "Finish the demonstration to reorder blocks.",details: [],};}diff --git a/skyvern-frontend/src/routes/workflows/editor/workspaceAuthoringActions.test.ts b/skyvern-frontend/src/routes/workflows/editor/workspaceAuthoringActions.test.tsindex 3093d9017..a6b6ca6a1 100644--- a/skyvern-frontend/src/routes/workflows/editor/workspaceAuthoringActions.test.ts+++ b/skyvern-frontend/src/routes/workflows/editor/workspaceAuthoringActions.test.ts@@ -43,7 +43,7 @@ describe("workspace authoring actions", () => {});});- it("makes SOP upload and task recording mutually exclusive", () => {+ it("makes SOP upload and task demonstration mutually exclusive", () => {expect(resolveWorkspaceAuthoringActionAvailability({browserReady: true,diff --git a/skyvern-frontend/src/routes/workflows/studio/BrowserPaneHeader.tsx b/skyvern-frontend/src/routes/workflows/studio/BrowserPaneHeader.tsxindex 362dce6be..5954c012f 100644--- a/skyvern-frontend/src/routes/workflows/studio/BrowserPaneHeader.tsx+++ b/skyvern-frontend/src/routes/workflows/studio/BrowserPaneHeader.tsx@@ -37,8 +37,6 @@ import {import { toast } from "@/components/ui/use-toast";import { useCredentialGetter } from "@/hooks/useCredentialGetter";import { useStreamTransport } from "@/hooks/useRuntimeConfig";-import { useRecordingLauncherStore } from "@/store/useRecordingLauncherStore";-import { useRecordingStore } from "@/store/useRecordingStore";import { useSettingsStore } from "@/store/SettingsStore";import { useStudioBrowserStore } from "@/store/useStudioBrowserStore";import { cn } from "@/util/utils";@@ -247,21 +245,14 @@ export function BrowserPaneViewPills() {export function BrowserPaneActions() {const workflowPermanentId = useWorkflowPermanentId();- const compact = useStudioPaneCompact();const credentialGetter = useCredentialGetter();const queryClient = useQueryClient();const { debugBrowserSessionId: browserSessionId, liveSurface } =useBrowserPaneView();- const isRecording = useRecordingStore((s) => s.isRecording);- const startRecordingAtEnd = useRecordingLauncherStore(- (s) => s.startRecordingAtEnd,- );// These act on the debug browser; while the pane streams the run's own- // browser instead, they'd hit an invisible session. Record explains itself- // with a disabled tooltip; the ⋯ menu's session actions are hidden.+ // browser instead, they'd hit an invisible session, so the ⋯ menu's session+ // actions are hidden.const debugHidden = liveSurface === "run";- const blockedTitle =- "Showing the run's browser — debug browser controls come back after the run";const reload = useStudioBrowserStore((s) => s.reload);const [confirmRestart, setConfirmRestart] = useState(false);const moreActionsRef = useRef<HTMLButtonElement>(null);@@ -311,35 +302,6 @@ export function BrowserPaneActions() {return (<>- {!isRecording- ? (() => {- const disabled =- !browserSessionId || debugHidden || !startRecordingAtEnd;- const tooltip = debugHidden- ? blockedTitle- : startRecordingAtEnd- ? "Complete the task in the browser. Skyvern captures the browser view and your clicks, typing, and navigation, then turns them into workflow steps."- : "Recording is available when the editor is ready";- return (- <ControlTooltip- content={<span className="block max-w-[260px]">{tooltip}</span>}- blocked={disabled}- >- <Button- variant="ghost"- size="sm"- className="h-7 shrink-0 gap-1.5 px-1.5 text-red-500"- aria-label="Record task"- disabled={disabled}- onClick={() => startRecordingAtEnd?.()}- >- <span className="h-2 w-2 rounded-full bg-red-500" />- {compact ? null : "Record task"}- </Button>- </ControlTooltip>- );- })()- : null}{browserSessionId && !debugHidden ? (<DropdownMenu><ControlTooltip content="More browser actions">diff --git a/skyvern-frontend/src/routes/workflows/studio/BrowserTab.test.tsx b/skyvern-frontend/src/routes/workflows/studio/BrowserTab.test.tsxindex 34de4dd66..ff306d831 100644--- a/skyvern-frontend/src/routes/workflows/studio/BrowserTab.test.tsx+++ b/skyvern-frontend/src/routes/workflows/studio/BrowserTab.test.tsx@@ -794,24 +794,19 @@ describe("BrowserTab view machine", () => {renderBrowserPane(`${STUDIO_PATH}&wr=wr_1&active=act_1`);expect(screen.getByTestId("browser-pane-stream-slot")).toBeTruthy();- expect(screen.queryByRole("button", { name: "Stop recording" })).toBeNull();+ expect(+ screen.queryByRole("button", { name: "Finish demonstration" }),+ ).toBeNull();});- it("starts a browser recording from the studio browser header", () => {- const startRecording = vi.fn();+ it("offers no record button in the studio browser header", () => {mocks.debugSession = { browser_session_id: "pbs_test" };- useRecordingLauncherStore.setState({- startRecordingAtEnd: startRecording,- });+ useRecordingLauncherStore.setState({ startRecordingAtEnd: vi.fn() });renderBrowserPane(STUDIO_PATH);- const recordTaskButton = screen.getByRole("button", {- name: "Record task",- });- expect(recordTaskButton.textContent).toContain("Record task");- fireEvent.click(recordTaskButton);-- expect(startRecording).toHaveBeenCalledOnce();+ expect(+ screen.queryByRole("button", { name: "Demonstrate task" }),+ ).toBeNull();});it("hides replay pills a run has nothing for, and restores them as artifacts arrive", () => {@@ -1041,13 +1036,9 @@ describe("BrowserTab pills and selection sync", () => {it("hides the debug-browser menu while the run's own stream is shown", () => {seedRun({ status: Status.Running, browserSessionId: "pbs_run" });mocks.debugSession = { browser_session_id: "pbs_test" };- useRecordingLauncherStore.setState({ startRecordingAtEnd: vi.fn() });renderBrowserPane(`${STUDIO_PATH}&wr=wr_1`);expect(screen.getByTestId("run-live-stream")).toBeTruthy();- expect(- (screen.getByLabelText("Record task") as HTMLButtonElement).disabled,- ).toBe(true);expect(screen.queryByRole("button", { name: "More browser actions" }),).toBeNull();diff --git a/skyvern-frontend/src/routes/workflows/studio/CopilotPaneHeader.tsx b/skyvern-frontend/src/routes/workflows/studio/CopilotPaneHeader.tsxindex aad98ee2c..f939c5698 100644--- a/skyvern-frontend/src/routes/workflows/studio/CopilotPaneHeader.tsx+++ b/skyvern-frontend/src/routes/workflows/studio/CopilotPaneHeader.tsx@@ -68,7 +68,7 @@ export function CopilotActiveDot() {const label = attention? COPILOT_ATTENTION_DOT[attention]: recording- ? "Copilot recording active"+ ? "Copilot demonstration active": "Copilot session active";return (<span@@ -98,7 +98,7 @@ export function CopilotPaneStatus() {)}aria-hidden="true"/>- {finishing ? "Finishing" : "Recording"}+ {finishing ? "Finishing" : "Demonstrating"}</span>);}