Skip to content

Automate browser based workflows with AI

feat(SKY-11517): remove action timeline from Workflow Studio Run tab (#6849)

Celal Zamanoğlu7e440cee6a26
diff --git a/skyvern-frontend/src/routes/workflows/studio/runview/Filmstrip.tsx b/skyvern-frontend/src/routes/workflows/studio/runview/Filmstrip.tsx
deleted file mode 100644
index bf8683b23..000000000
--- a/skyvern-frontend/src/routes/workflows/studio/runview/Filmstrip.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-import { Fragment, useEffect, useRef } from "react";
-import { CounterClockwiseClockIcon } from "@radix-ui/react-icons";
-
-import { ReadableActionTypes, Status } from "@/api/types";
-import { Skeleton } from "@/components/ui/skeleton";
-import { statusIsAFailureType } from "@/routes/tasks/types";
-import { actionTypeIcons } from "@/routes/workflows/components/actionTypeIcons";
-import { useRunViewStore } from "@/store/RunViewStore";
-import { cn } from "@/util/utils";
-
-import { FilmstripFrame } from "../runProjections";
-import { FilmstripThumbnail } from "./FilmstripThumbnail";
-
-function frameFailed(status: Status): boolean {
- return statusIsAFailureType({ status }) || status === Status.Canceled;
-}
-
-export function Filmstrip({
- frames,
- shownFrameId,
- running,
-}: {
- frames: FilmstripFrame[];
- shownFrameId: string | null;
- running: boolean;
-}) {
- const pinFrame = useRunViewStore((s) => s.pinFrame);
- const pinnedFrameId = useRunViewStore((s) => s.pinnedFrameId);
- const stripRef = useRef<HTMLDivElement>(null);
-
- // Follow the live edge while the user hasn't pinned a frame.
- useEffect(() => {
- if (pinnedFrameId == null && stripRef.current) {
- stripRef.current.scrollLeft = stripRef.current.scrollWidth;
- }
- }, [frames.length, pinnedFrameId]);
-
- return (
- <div className="shrink-0 overflow-hidden rounded-lg border border-border bg-slate-elevation2">
- <div className="flex items-center justify-between gap-3 px-4 pb-1 pt-2">
- <span className="inline-flex items-center gap-2 text-xs font-semibold text-muted-foreground">
- <CounterClockwiseClockIcon className="h-3.5 w-3.5" />
- Action timeline
- </span>
- <span className="text-[11px] text-muted-foreground/70">
- {frames.length} action{frames.length === 1 ? "" : "s"} · click a frame
- to inspect
- </span>
- </div>
- <div
- ref={stripRef}
- className="flex items-stretch gap-0 overflow-x-auto px-4 pb-3 pt-1"
- >
- {frames.length === 0 && !running ? (
- <div className="px-1 py-4 text-xs text-muted-foreground/70">
- Actions will appear here as the run progresses.
- </div>
- ) : null}
- {frames.map((frame, i) => {
- const active = frame.id === shownFrameId;
- const failed = frameFailed(frame.status);
- return (
- <Fragment key={frame.id}>
- {frame.isBlockStart && i > 0 ? (
- <div
- className="mx-2 flex w-px shrink-0 items-center self-stretch bg-border"
- title={frame.blockLabel ?? undefined}
- />
- ) : null}
- <button
- type="button"
- onClick={() => pinFrame(frame.id)}
- aria-label={`Inspect step: ${frame.label}`}
- className={cn(
- "group flex w-[8.5rem] shrink-0 flex-col gap-1.5 rounded-md border border-transparent p-1.5 text-left transition-colors hover:border-border",
- "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
- active &&
- "border-studio-accent/60 bg-slate-elevation3 ring-1 ring-studio-accent/50",
- failed &&
- active &&
- "border-destructive/60 ring-destructive/50",
- )}
- >
- <div className="relative h-[4.75rem] overflow-hidden rounded bg-slate-elevation3">
- <FilmstripThumbnail
- artifactId={frame.screenshotArtifactId}
- alt={frame.label}
- />
- <span className="absolute left-1 top-1 rounded bg-black/60 px-1.5 py-0.5 font-mono text-[9.5px] font-bold text-white">
- {frame.index}
- </span>
- <span
- className={cn(
- "absolute bottom-1 right-1 grid h-5 w-5 place-items-center rounded text-white",
- failed ? "bg-destructive" : "bg-success",
- )}
- >
- {actionTypeIcons[frame.actionType]}
- </span>
- </div>
- <div className="truncate text-[11.5px] font-medium text-foreground">
- {frame.label}
- </div>
- <div className="font-mono text-[10px] text-muted-foreground/70">
- {ReadableActionTypes[frame.actionType] ?? frame.actionType}
- </div>
- </button>
- </Fragment>
- );
- })}
- {running ? (
- <div className="flex w-[8.5rem] shrink-0 flex-col gap-1.5 p-1.5">
- <Skeleton className="h-[4.75rem] rounded" />
- <Skeleton variant="text" lines={2} className="gap-1.5" />
- </div>
- ) : null}
- </div>
- </div>
- );
-}
diff --git a/skyvern-frontend/src/routes/workflows/studio/runview/FilmstripThumbnail.tsx b/skyvern-frontend/src/routes/workflows/studio/runview/FilmstripThumbnail.tsx
deleted file mode 100644
index 6ad8293e0..000000000
--- a/skyvern-frontend/src/routes/workflows/studio/runview/FilmstripThumbnail.tsx
+++ /dev/null
@@ -1,69 +0,0 @@
-import { ImageIcon } from "@radix-ui/react-icons";
-import { useQuery } from "@tanstack/react-query";
-import { useState } from "react";
-
-import { getClient } from "@/api/AxiosClient";
-import { ArtifactApiResponse } from "@/api/types";
-import { Skeleton } from "@/components/ui/skeleton";
-import { useCredentialGetter } from "@/hooks/useCredentialGetter";
-import { getImageURL } from "@/routes/tasks/detail/artifactUtils";
-import { cn } from "@/util/utils";
-
-export function FilmstripThumbnail({
- artifactId,
- alt,
-}: {
- artifactId: string | null;
- alt: string;
-}) {
- const credentialGetter = useCredentialGetter();
- const [imgLoaded, setImgLoaded] = useState(false);
- // Shares the ["artifact", id] cache key with ActionScreenshot, so the hero
- // and the strip thumbnail reuse a single fetch per action.
- const { data } = useQuery<ArtifactApiResponse>({
- queryKey: ["artifact", artifactId],
- queryFn: async () => {
- const client = await getClient(credentialGetter, "sans-api-v1");
- return client
- .get(`/artifacts/${artifactId}`)
- .then((response) => response.data);
- },
- enabled: Boolean(artifactId),
- refetchOnWindowFocus: false,
- refetchOnMount: false,
- staleTime: Infinity,
- retry: 1,
- });
-
- // Some actions (e.g. terminate) never capture a screenshot — show a neutral
- // placeholder instead of an empty black box.
- if (!artifactId || data?.archived) {
- return (
- <div className="flex h-full w-full items-center justify-center bg-slate-elevation3">
- <ImageIcon className="h-5 w-5 text-muted-foreground/40" />
- </div>
- );
- }
-
- // While the artifact resolves and the image paints, show a skeleton rather
- // than a black box; fade the screenshot in once it has actually loaded.
- return (
- <div className="relative h-full w-full bg-slate-elevation3">
- {data ? (
- <img
- src={getImageURL(data)}
- alt={alt}
- onLoad={() => setImgLoaded(true)}
- className={cn(
- "h-full w-full object-cover object-top transition-opacity",
- imgLoaded ? "opacity-100" : "opacity-0",
- )}
- loading="lazy"
- />
- ) : null}
- {!imgLoaded ? (
- <Skeleton className="absolute inset-0 rounded-none" />
- ) : null}
- </div>
- );
-}
diff --git a/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx b/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx
index 037208864..ccd187f5e 100644
--- a/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx
+++ b/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx
@@ -28,7 +28,6 @@ import {
formatElapsed,
runOutcomeFromStatus,
} from "../runProjections";
-import { Filmstrip } from "./Filmstrip";
import { RunDetailsButton } from "./RunDetailsButton";
import { RunHero } from "./RunHero";
import { RunInputsButton, type RunInputMeta } from "./RunInputsButton";
@@ -41,8 +40,8 @@ type RunViewProps = {
};
/**
- * Fused run view: browser hero + action filmstrip on the left, run timeline tree
- * + block detail on the right, sharing one pinned item via RunViewStore.
+ * Fused run view: browser hero on the left, run timeline tree + block detail on
+ * the right, sharing one pinned item via RunViewStore.
*/
export function RunView({ workflowRunId, onFix, onRetry }: RunViewProps) {
const queryOptions = workflowRunId ? { workflowRunId } : undefined;
@@ -341,11 +340,6 @@ export function RunView({ workflowRunId, onFix, onRetry }: RunViewProps) {
onFix={onFix}
onRetry={onRetry}
/>
- <Filmstrip
- frames={frames}
- shownFrameId={shownFrame?.id ?? null}
- running={running}
- />
</div>
<div className="relative w-[26rem] shrink-0">
<div className="absolute inset-0 grid grid-rows-[minmax(0,1fr)_minmax(0,1fr)] gap-3">