Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix(SKY-11366): polish Workflow Studio Run/Editor panel alignment + toolbar button (#6808)
Celal Zamanoğlu290425a6f9a0
diff --git a/skyvern-frontend/src/components/ApiWebhookActionsMenu.tsx b/skyvern-frontend/src/components/ApiWebhookActionsMenu.tsxindex 7e143e34f..13b1b4831 100644--- a/skyvern-frontend/src/components/ApiWebhookActionsMenu.tsx+++ b/skyvern-frontend/src/components/ApiWebhookActionsMenu.tsx@@ -1,3 +1,5 @@+import { type ReactElement } from "react";+import { Button } from "@/components/ui/button";import {DropdownMenu,@@ -20,6 +22,9 @@ type ApiWebhookActionsMenuProps = {webhookDisabled?: boolean;onTestWebhook: () => void;size?: "default" | "sm";+ // Single element forwarded to the trigger via Radix `asChild`; when set,+ // `size` is unused. Defaults to the solid secondary button (legacy pages).+ trigger?: ReactElement;};export function ApiWebhookActionsMenu({@@ -27,13 +32,16 @@ export function ApiWebhookActionsMenu({webhookDisabled = false,onTestWebhook,size = "default",+ trigger,}: ApiWebhookActionsMenuProps) {return (<DropdownMenu><DropdownMenuTrigger asChild>- <Button type="button" variant="secondary" size={size}>- API & Webhooks- </Button>+ {trigger ?? (+ <Button type="button" variant="secondary" size={size}>+ API & Webhooks+ </Button>+ )}</DropdownMenuTrigger><DropdownMenuContent><DropdownMenuLabel className="py-2 text-base">diff --git a/skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsx b/skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsxindex ef3b64393..82fe7632e 100644--- a/skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/FlowRenderer.tsx@@ -391,6 +391,9 @@ type Props = {// Width of a left-side panel (the studio Copilot column) the canvas sits right// of; the chain shifts left by half of it to read as page-centered, not pane.centerOffsetX?: number;+ // Embedded in the studio shell: aligns the block-config sidebar's top/bottom+ // edges with the Copilot column instead of the legacy header offsets.+ embedded?: boolean;};function FlowRenderer({@@ -415,6 +418,7 @@ function FlowRenderer({onAddNode,onLayoutPhaseChange,centerOffsetX = 0,+ embedded = false,}: Props) {const { blockLabel: targettedBlockLabel } = useParams();const reactFlowInstance = useReactFlow();@@ -1940,7 +1944,9 @@ function FlowRenderer({entirely in read-only mode so comparison canvases neverexpose the editable block form.*/}- {!readOnly && <BlockConfigSidebar onAddNode={onAddNode} />}+ {!readOnly && (+ <BlockConfigSidebar onAddNode={onAddNode} embedded={embedded} />+ )}{!readOnly && (<divdata-tour="sidebar-region"diff --git a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsxindex eea94486e..f37228783 100644--- a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx@@ -1704,6 +1704,7 @@ function Workspace({initialTitle={initialTitle}workflow={workflow}centerOffsetX={studioCanvasCenterOffset}+ embedded={embedded}onRequestDeleteNode={handleRequestDeleteNode}captureHistoryImmediately={captureWorkflowEditImmediately}onAddNode={addNode}diff --git a/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.tsx b/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.tsxindex 6e1acce28..c53dfd636 100644--- a/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/panels/BlockConfigSidebar.tsx@@ -297,9 +297,15 @@ function BlockLibrarySidebarBody({type BlockConfigSidebarProps = {onAddNode?: (props: AddNodeProps) => void;+ // In the studio shell the panel's top/bottom edges align with the Copilot+ // column's py-3 inset rather than the legacy editor's header offsets.+ embedded?: boolean;};-function BlockConfigSidebar({ onAddNode }: BlockConfigSidebarProps) {+function BlockConfigSidebar({+ onAddNode,+ embedded = false,+}: BlockConfigSidebarProps) {const resizableRef = useRef<Resizable | null>(null);const [editorShellMetrics, setEditorShellMetrics] = useState(() => ({gutterPx: getBlockSidebarGutterPx(null),@@ -441,9 +447,9 @@ function BlockConfigSidebar({ onAddNode }: BlockConfigSidebarProps) {}}style={{position: "absolute",- top: mode === "build" ? "7rem" : "2rem",+ top: embedded ? "0.75rem" : mode === "build" ? "7rem" : "2rem",right: "1.5rem",- bottom: "1.5rem",+ bottom: embedded ? "0.75rem" : "1.5rem",}}className={cn("z-30 flex flex-col",diff --git a/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx b/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsxindex 6069594b0..52a8f3683 100644--- a/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx+++ b/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx@@ -1,4 +1,5 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { Share1Icon } from "@radix-ui/react-icons";import { usePostHog } from "posthog-js/react";import { useSearchParams } from "react-router-dom";@@ -11,6 +12,7 @@ import { useRunViewStore } from "@/store/RunViewStore";import { useStudioShellStore } from "@/store/StudioShellStore";import { type ApiCommandOptions } from "@/util/apiCommands";import { runsApiBaseUrl } from "@/util/env";+import { cn } from "@/util/utils";import { useWorkflowRunTimelineQuery } from "../../hooks/useWorkflowRunTimelineQuery";import { useWorkflowRunWithWorkflowQuery } from "../../hooks/useWorkflowRunWithWorkflowQuery";@@ -235,7 +237,7 @@ export function RunView({ workflowRunId, onFix, onRetry }: RunViewProps) {);return (- <div className="flex h-full min-h-0 w-full flex-col px-3 pt-3">+ <div className="flex h-full min-h-0 w-full flex-col p-3"><div className="flex min-h-0 flex-1 items-stretch gap-3 overflow-hidden"><div className="flex min-w-0 flex-1 flex-col gap-3 overflow-hidden"><WorkflowRunVerificationCodeForm@@ -286,7 +288,19 @@ export function RunView({ workflowRunId, onFix, onRetry }: RunViewProps) {actions={<><ApiWebhookActionsMenu- size="sm"+ trigger={+ <button+ type="button"+ className={cn(+ "inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium",+ "text-muted-foreground hover:bg-slate-elevation3 hover:text-foreground",+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",+ )}+ >+ <Share1Icon className="h-4 w-4" />+ API & Webhooks+ </button>+ }getOptions={() => {const headers: Record<string, string> = {"Content-Type": "application/json",