Skip to content

Automate browser based workflows with AI

SKY-11457 Clarify Copilot queued send action (#6987)

Aaron Perez0ca97ff58786
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
index 8f38e4dd2..205c31ab5 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.queue.test.tsx
@@ -235,6 +235,45 @@ describe("WorkflowCopilotChat — keep the chat live during a turn", () => {
expect(screen.getByRole("button", { name: "Cancel run" })).toBeTruthy();
});
+ it("labels the in-flight follow-up action as the next send", async () => {
+ await renderChat();
+ await submit("build me a workflow");
+ await waitFor(() => expect(postStreaming).toHaveBeenCalledTimes(1));
+
+ expect(
+ screen.getByText(
+ "Copilot is working. Your next send will wait for the next turn.",
+ ),
+ ).toBeTruthy();
+ expect(
+ screen.getByPlaceholderText("Type a message to send next…"),
+ ).toBeTruthy();
+ expect(screen.getByRole("button", { name: "Send next" })).toBeTruthy();
+ expect(screen.queryByRole("button", { name: "Queue" })).toBeNull();
+ });
+
+ it("explains that the next send waits while the live browser is starting", async () => {
+ render(
+ <WorkflowCopilotChat requiresLiveBrowser isLiveBrowserReady={false} />,
+ );
+ await waitFor(() =>
+ expect(
+ screen.getByPlaceholderText("Type a prompt to send when ready..."),
+ ).toBeTruthy(),
+ );
+
+ expect(
+ screen.getByText(
+ "Live browser is starting. Your next send will wait until it connects.",
+ ),
+ ).toBeTruthy();
+ expect(screen.getByRole("button", { name: "Send" })).toBeTruthy();
+ // The old copy conflated sending with queuing; guard against its return.
+ expect(screen.queryByRole("button", { name: "Queue" })).toBeNull();
+ expect(screen.queryByText(/Send now to queue your prompt/)).toBeNull();
+ expect(screen.queryByPlaceholderText(/Type a prompt to queue/)).toBeNull();
+ });
+
it("still sends the message when dictation audio upload fails", async () => {
await renderChat();
speechState.takeAudioBlob.mockReturnValueOnce(
diff --git a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
index 1a43a30cf..362bc3c56 100644
--- a/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
+++ b/skyvern-frontend/src/routes/workflows/copilot/WorkflowCopilotChat.tsx
@@ -2022,9 +2022,9 @@ export function WorkflowCopilotChat({
const browserStatusText = queuedPrompt
? queuedPromptWaitingStatus
: isLoading
- ? "Copilot is working — message will queue…"
+ ? "Copilot is working. Your next send will wait for the next turn."
: isWaitingForLiveBrowser
- ? "Live browser is starting. Send now to queue your prompt."
+ ? "Live browser is starting. Your next send will wait until it connects."
: null;
const inputStatusText = isSpeechListening
? browserStatusText
@@ -2313,9 +2313,9 @@ export function WorkflowCopilotChat({
queuedPrompt
? "Prompt queued..."
: isLoading
- ? "Type a message to queue for the next turn…"
+ ? "Type a message to send next…"
: isWaitingForLiveBrowser
- ? "Type a prompt to queue..."
+ ? "Type a prompt to send when ready..."
: "Message Skyvern Copilot…"
}
value={inputValue}
@@ -2350,13 +2350,15 @@ export function WorkflowCopilotChat({
) : isLoading ? (
<>
<button
+ type="button"
onClick={() => handleSend()}
- title="Queue for the next turn"
+ title="Send after this turn finishes"
className="flex h-10 items-center justify-center rounded-lg border border-border px-3 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-accent-foreground"
>
- Queue
+ Send next
</button>
<button
+ type="button"
onClick={cancelSend}
title="Cancel run"
className="flex h-10 items-center justify-center rounded-lg bg-destructive px-3 text-sm font-medium text-destructive-foreground hover:bg-destructive/90"