Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
redo 6035 because of 6036, which undid 6035 (#3302)
Jonathan Dobson7002c33bb465
diff --git a/skyvern-frontend/src/components/BrowserStream.tsx b/skyvern-frontend/src/components/BrowserStream.tsxindex 15727d4dd..d0bf8c867 100644--- a/skyvern-frontend/src/components/BrowserStream.tsx+++ b/skyvern-frontend/src/components/BrowserStream.tsx@@ -334,7 +334,7 @@ function BrowserStream({ref={setCanvasContainerRef}>{isVncConnected && (- <div className="overlay z-10 flex items-center justify-center">+ <div className="overlay z-10 flex items-center justify-center overflow-hidden">{showControlButtons && (<div className="control-buttons pointer-events-none relative flex h-full w-full items-center justify-center"><Buttondiff --git a/skyvern-frontend/src/components/FloatingWindow.tsx b/skyvern-frontend/src/components/FloatingWindow.tsxindex e93398092..fc0f7d75c 100644--- a/skyvern-frontend/src/components/FloatingWindow.tsx+++ b/skyvern-frontend/src/components/FloatingWindow.tsx@@ -31,6 +31,7 @@ import { PowerIcon } from "./icons/PowerIcon";type OS = "Windows" | "macOS" | "Linux" | "Unknown";const Constants = {+ HandleSize: "40px",MinHeight: 52,MinWidth: 256,} as const;@@ -180,11 +181,14 @@ function FloatingWindow({title,zIndex,// --+ onBlur,onBreakout,onCycle,onFocus,- onBlur,onInteract,+ onMinimize,+ onMaximize,+ onRestore,}: {bounded?: boolean;children: React.ReactNode;@@ -201,11 +205,14 @@ function FloatingWindow({title: string;zIndex?: number;// --+ onBlur?: () => void;onBreakout?: () => void;onCycle?: () => void;onFocus?: () => void;- onBlur?: () => void;onInteract?: () => void;+ onMinimize?: () => void;+ onMaximize?: () => void;+ onRestore?: () => void;}) {const [reloadKey, setReloadKey] = useState(0);const [isReloading, setIsReloading] = useState(false);@@ -424,6 +431,8 @@ function FloatingWindow({});setPosition({ x: 0, y: 0 });++ onMaximize?.();};const minimize = () => {@@ -459,6 +468,8 @@ function FloatingWindow({});setPosition({ x: left, y: top });++ onMinimize?.();};const restore = () => {@@ -480,6 +491,8 @@ function FloatingWindow({setIsMaximized(false);setIsMinimized(false);++ onRestore?.();};const reload = () => {@@ -571,12 +584,14 @@ function FloatingWindow({})}handleStyles={{bottomLeft: {- width: "40px",- height: "40px",+ width: isMinimized || isMaximized ? "0px" : Constants.HandleSize,+ height: isMinimized || isMaximized ? "0px" : Constants.HandleSize,+ zIndex: 20,},bottomRight: {- width: "40px",- height: "40px",+ width: isMinimized || isMaximized ? "0px" : Constants.HandleSize,+ height: isMinimized || isMaximized ? "0px" : Constants.HandleSize,+ zIndex: 20,},}}minHeight={Constants.MinHeight}diff --git a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsxindex 26eb2c723..3a6fbc455 100644--- a/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx+++ b/skyvern-frontend/src/routes/workflows/editor/Workspace.tsx@@ -127,6 +127,7 @@ function Workspace({"history","infiniteCanvas",]);+ const [hideControlButtons, setHideControlButtons] = useState(false);// ---start fya: https://github.com/frontyardartconst hasForLoopNode = nodes.some((node) => node.type === "loop");@@ -799,6 +800,15 @@ function Workspace({onBreakout={handleOnBreakout}onCycle={handleOnCycle}onFocus={() => promote("browserWindow")}+ onMinimize={() => {+ setHideControlButtons(true);+ }}+ onMaximize={() => {+ setHideControlButtons(false);+ }}+ onRestore={() => {+ setHideControlButtons(false);+ }}>{activeDebugSession &&activeDebugSession.browser_session_id &&@@ -806,7 +816,7 @@ function Workspace({<BrowserStreaminteractive={false}browserSessionId={activeDebugSession.browser_session_id}- showControlButtons={true}+ showControlButtons={!hideControlButtons}/>) : (<div className="flex h-full w-full flex-col items-center justify-center gap-2 pb-2 pt-4 text-sm text-slate-400">