Skip to content

Automate browser based workflows with AI

Capitalize Task in the workflow recording menu (#8598)

Cindy Lifeb9fe2fda5c
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.composerControls.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.composerControls.test.tsx
index 25fbebf4b..530b989b9 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.composerControls.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.composerControls.test.tsx
@@ -505,7 +505,7 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {
expect(screen.getByText("Start a new chat")).toBeTruthy(),
);
expect(screen.getByText("Upload an SOP")).toBeTruthy();
- expect(screen.getByText("Record task")).toBeTruthy();
+ expect(screen.getByText("Record Task")).toBeTruthy();
const actionLayout = screen.getByRole("button", {
name: "Upload an SOP",
}).parentElement?.parentElement;
@@ -527,7 +527,7 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {
});
expect(onUploadSOP).toHaveBeenCalledWith(file);
- fireEvent.click(screen.getByRole("button", { name: "Record task" }));
+ fireEvent.click(screen.getByRole("button", { name: "Record Task" }));
expect(onRecordTask).toHaveBeenCalledTimes(1);
});
@@ -550,7 +550,7 @@ describe("WorkflowCopilotChat — unflagged S4 composer", () => {
expect(screen.getByText("Uploading SOP…")).toBeTruthy(),
);
const recordTaskButton = screen.getByRole("button", {
- name: "Record task",
+ name: "Record Task",
});
expect(recordTaskButton.hasAttribute("disabled")).toBe(true);
expect(recordTaskButton.parentElement?.getAttribute("tabindex")).toBe("0");
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
index c60f3a424..8a149e578 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
@@ -5792,7 +5792,7 @@ export function WorkflowCopilotChat({
content={
recordTaskDisabled
? (authoringUnavailableReason ??
- "Record task is available when the browser is ready")
+ "Record Task is available when the browser is ready")
: "Demonstrate the task in the browser"
}
blocked={recordTaskDisabled}
@@ -5801,7 +5801,7 @@ export function WorkflowCopilotChat({
>
<button
type="button"
- aria-label="Record task"
+ aria-label="Record Task"
className="flex w-full min-w-0 items-center gap-3 rounded-lg border border-red-500/45 bg-red-500/[0.06] p-3 text-left transition-colors hover:bg-red-500/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"
disabled={recordTaskDisabled}
onClick={onRecordTask}
@@ -5811,7 +5811,7 @@ export function WorkflowCopilotChat({
</span>
<span className="min-w-0">
<span className="block font-medium text-foreground">
- Record task
+ Record Task
</span>
<span className="mt-0.5 block text-xs leading-snug text-muted-foreground">
Demonstrate it in the browser and create workflow
diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowAddMenu.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowAddMenu.tsx
index d29cdb36c..98c25e086 100644
--- a/skyvern-frontend/src/routes/workflows/editor/WorkflowAddMenu.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowAddMenu.tsx
@@ -51,7 +51,7 @@ function WorkflowAddMenu({
},
];
- // Show Record task whenever a browser session exists (ready or still
+ // Show Record 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) {
@@ -59,7 +59,7 @@ function WorkflowAddMenu({
id: "2",
icon: <SquareIcon className={buttonSize ? "h-3 w-3" : undefined} />,
enabled: settingsStore.isUsingABrowser && !recordingStore.isRecording,
- text: "Record task",
+ text: "Record Task",
onClick: () => {
onRecord();
},
diff --git a/skyvern-frontend/src/routes/workflows/editor/__tests__/WorkflowAddMenu.test.tsx b/skyvern-frontend/src/routes/workflows/editor/__tests__/WorkflowAddMenu.test.tsx
index 43e79734c..e93c9cb47 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 === "Record Task");
}
-describe("WorkflowAddMenu — Record task item visibility/enabled state", () => {
+describe("WorkflowAddMenu — Record 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 Record 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 Record 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 Record 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 Record 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/recording/RecordingPanel.test.tsx b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.test.tsx
index 12686583f..829367695 100644
--- a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.test.tsx
@@ -119,7 +119,7 @@ describe("RecordingPanel", () => {
cleanup();
});
- it("explains what Record task captures and what Skyvern creates", () => {
+ it("explains what Record Task captures and what Skyvern creates", () => {
render(<RecordingPanel browserSessionId="pbs_123" />);
expect(screen.getByText("Recording task")).toBeTruthy();
diff --git a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.tsx b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.tsx
index db2bcbec3..16017382b 100644
--- a/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.tsx
+++ b/skyvern-frontend/src/routes/workflows/editor/recording/RecordingPanel.tsx
@@ -650,7 +650,7 @@ function RecordingPanel({ browserSessionId }: Props) {
{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.
+ Record Task from the workflow editor again.
</div>
)}
diff --git a/skyvern-frontend/src/routes/workflows/studio/BrowserPaneHeader.tsx b/skyvern-frontend/src/routes/workflows/studio/BrowserPaneHeader.tsx
index 1295d194f..adf94191f 100644
--- a/skyvern-frontend/src/routes/workflows/studio/BrowserPaneHeader.tsx
+++ b/skyvern-frontend/src/routes/workflows/studio/BrowserPaneHeader.tsx
@@ -231,12 +231,12 @@ export function BrowserPaneActions() {
variant="ghost"
size="sm"
className="h-7 shrink-0 gap-1.5 px-1.5 text-red-500"
- aria-label="Record task"
+ aria-label="Record Task"
disabled={disabled}
onClick={() => startRecordingAtEnd?.()}
>
<span className="h-2 w-2 rounded-full bg-red-500" />
- {compact ? null : "Record task"}
+ {compact ? null : "Record Task"}
</Button>
</ControlTooltip>
);
diff --git a/skyvern-frontend/src/routes/workflows/studio/BrowserTab.test.tsx b/skyvern-frontend/src/routes/workflows/studio/BrowserTab.test.tsx
index 520323c0f..72d9cd784 100644
--- a/skyvern-frontend/src/routes/workflows/studio/BrowserTab.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/studio/BrowserTab.test.tsx
@@ -626,9 +626,9 @@ describe("BrowserTab view machine", () => {
renderBrowserPane(STUDIO_PATH);
const recordTaskButton = screen.getByRole("button", {
- name: "Record task",
+ name: "Record Task",
});
- expect(recordTaskButton.textContent).toContain("Record task");
+ expect(recordTaskButton.textContent).toContain("Record Task");
fireEvent.click(recordTaskButton);
expect(startRecording).toHaveBeenCalledOnce();
@@ -726,7 +726,7 @@ describe("BrowserTab pills and selection sync", () => {
expect(screen.getByTestId("run-live-stream")).toBeTruthy();
for (const name of [
- "Record task",
+ "Record Task",
"Reconnect browser stream",
"Open browser in new tab",
"Turn off browser",