Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
SKY-11391: Dedupe run-tab action detail panel (remove ACTIONS(N) + Selected action; bind tabs to child) (#6952)
Aaron Perezaf4ed126849d
diff --git a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsxindex df3cf0b47..d862e3f28 100644--- a/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx+++ b/skyvern-frontend/src/routes/workflows/WorkflowRun.tsx@@ -128,9 +128,6 @@ function WorkflowRunRightColumn({activeIteration={activeIteration}timeline={timeline}timelineReady={timelineReady}- onActionSelect={(item) => {- onSetActiveItem(item.action.action_id);- }}onThoughtSelect={(thought) => {onSetActiveItem(thought.thought_id);}}diff --git a/skyvern-frontend/src/routes/workflows/studio/runview/RunView.test.tsx b/skyvern-frontend/src/routes/workflows/studio/runview/RunView.test.tsxnew file mode 100644index 000000000..e3930d664--- /dev/null+++ b/skyvern-frontend/src/routes/workflows/studio/runview/RunView.test.tsx@@ -0,0 +1,179 @@+// @vitest-environment jsdom++import { cleanup, fireEvent, render, within } from "@testing-library/react";+import { MemoryRouter } from "react-router-dom";+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";+import { type ReactNode } from "react";++import { Status } from "@/api/types";+import { useRunViewStore } from "@/store/RunViewStore";+import type {+ WorkflowRunBlock,+ WorkflowRunTimelineItem,+} from "../../types/workflowRunTypes";+import { RunView } from "./RunView";++const mocks = vi.hoisted(() => ({+ workflowRun: undefined as unknown,+ timeline: undefined as unknown,+}));++vi.mock("../../hooks/useWorkflowRunWithWorkflowQuery", () => ({+ useWorkflowRunWithWorkflowQuery: () => ({+ data: mocks.workflowRun,+ isLoading: false,+ }),+}));+vi.mock("../../hooks/useWorkflowRunTimelineQuery", () => ({+ useWorkflowRunTimelineQuery: () => ({+ data: mocks.timeline,+ isLoading: false,+ }),+}));+vi.mock("../../hooks/useDebugSessionQuery", () => ({+ useDebugSessionQuery: () => ({ data: undefined }),+}));+vi.mock("../../editor/hooks/useIsGeneratingCode", () => ({+ useIsGeneratingCode: () => false,+}));+vi.mock("./RunHero", () => ({ RunHero: () => <div data-testid="run-hero" /> }));+vi.mock("../../workflowRun/WorkflowRunVerificationCodeForm", () => ({+ WorkflowRunVerificationCodeForm: () => null,+}));+// Radix ScrollArea needs ResizeObserver, which jsdom doesn't provide.+vi.mock("@/components/ui/scroll-area", () => ({+ ScrollArea: ({ children }: { children?: ReactNode }) => <div>{children}</div>,+ ScrollAreaViewport: ({ children }: { children?: ReactNode }) => (+ <div>{children}</div>+ ),+}));+vi.mock("posthog-js/react", () => ({+ usePostHog: () => ({ capture: vi.fn() }),+}));+vi.mock("@/hooks/useApiCredential", () => ({ useApiCredential: () => null }));++function buildBlock(+ overrides: Partial<WorkflowRunBlock> = {},+): WorkflowRunBlock {+ return {+ workflow_run_block_id: "wrb_default",+ workflow_run_id: "wr_default",+ parent_workflow_run_block_id: null,+ block_type: "http_request",+ label: null,+ description: null,+ title: null,+ status: Status.Completed,+ failure_reason: null,+ output: null,+ continue_on_failure: false,+ task_id: null,+ url: null,+ navigation_goal: null,+ navigation_payload: null,+ data_extraction_goal: null,+ data_schema: null,+ terminate_criterion: null,+ complete_criterion: null,+ include_action_history_in_verification: null,+ engine: null,+ actions: null,+ created_at: "2026-01-01T00:00:00Z",+ modified_at: "2026-01-01T00:00:00Z",+ duration: null,+ loop_values: null,+ current_value: null,+ current_index: null,+ ...overrides,+ };+}++function buildBlockItem(+ block: WorkflowRunBlock,+ children: Array<WorkflowRunTimelineItem> = [],+): WorkflowRunTimelineItem {+ return {+ type: "block",+ block,+ children,+ thought: null,+ created_at: block.created_at,+ modified_at: block.modified_at,+ };+}++function seedForLoopRun() {+ // current_index 0 keeps the header's fallback chip on "Iteration 1" so the+ // timeline's "Iteration 2" row is the only "Iteration 2" before selection.+ const loop = buildBlock({+ workflow_run_block_id: "wrb_loop",+ block_type: "for_loop",+ label: "checkout-loop",+ loop_values: ["alpha", "beta"],+ current_index: 0,+ current_value: "alpha",+ created_at: "2026-06-10T00:00:00Z",+ modified_at: "2026-06-10T00:01:00Z",+ });+ const iter0 = buildBlock({+ workflow_run_block_id: "wrb_iter0",+ block_type: "task",+ label: "iter0-task",+ parent_workflow_run_block_id: "wrb_loop",+ current_index: 0,+ created_at: "2026-06-10T00:00:10Z",+ });+ const iter1 = buildBlock({+ workflow_run_block_id: "wrb_iter1",+ block_type: "task",+ label: "iter1-task",+ parent_workflow_run_block_id: "wrb_loop",+ current_index: 1,+ created_at: "2026-06-10T00:00:20Z",+ });+ mocks.timeline = [+ buildBlockItem(loop, [buildBlockItem(iter0), buildBlockItem(iter1)]),+ ];+ mocks.workflowRun = {+ workflow_run_id: "wr_1",+ status: Status.Completed,+ workflow: {+ workflow_definition: { blocks: [], finally_block_label: null },+ },+ };+}++afterEach(() => {+ cleanup();+ mocks.workflowRun = undefined;+ mocks.timeline = undefined;+});+beforeEach(() => useRunViewStore.getState().reset());++describe("RunView iteration selection", () => {+ test("selecting the loop block after an iteration clears the iteration scope", () => {+ seedForLoopRun();+ // Seed ?active= so the loop is the selected (and expanded) item on mount,+ // making its iteration rows visible.+ const { container } = render(+ <MemoryRouter initialEntries={["/?active=wrb_loop"]}>+ <RunView workflowRunId="wr_1" />+ </MemoryRouter>,+ );+ const scope = within(container);++ // Baseline: loop overview (all iterable values), not a single iteration.+ expect(scope.queryByText(/Iterable values/)).not.toBeNull();++ // Drill into iteration 2.+ fireEvent.click(scope.getByText("Iteration 2"));+ expect(scope.queryByText("Iteration 2 value")).not.toBeNull();+ expect(scope.queryByText(/Iterable values/)).toBeNull();++ // Click the loop block row (descriptor text is timeline-only). The detail+ // must fall back to the loop overview instead of staying on iteration 2.+ fireEvent.click(scope.getByText(/Loop over 2 values/));+ expect(scope.queryByText(/Iterable values/)).not.toBeNull();+ expect(scope.queryByText("Iteration 2 value")).toBeNull();+ });+});diff --git a/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx b/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsxindex 9ea145c11..666992027 100644--- a/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx+++ b/skyvern-frontend/src/routes/workflows/studio/runview/RunView.tsx@@ -458,14 +458,22 @@ export function RunView({hideLiveBadgeactiveItem={activeItem}activeIteration={activeIteration}- onActionItemSelected={(item) => pinFrame(item.action.action_id)}- onBlockItemSelected={(block) =>- pinFrame(block.workflow_run_block_id)- }- onThoughtItemSelected={(thought) =>- pinFrame(thought.thought_id)- }- onLiveStreamSelected={() => pinFrame("stream")}+ onActionItemSelected={(item) => {+ setActiveIteration(null);+ pinFrame(item.action.action_id);+ }}+ onBlockItemSelected={(block) => {+ setActiveIteration(null);+ pinFrame(block.workflow_run_block_id);+ }}+ onThoughtItemSelected={(thought) => {+ setActiveIteration(null);+ pinFrame(thought.thought_id);+ }}+ onLiveStreamSelected={() => {+ setActiveIteration(null);+ pinFrame("stream");+ }}onIterationSelected={(loopBlock, iterationIndex) => {setActiveIteration(iterationIndex);pinFrame(loopBlock.workflow_run_block_id);@@ -480,7 +488,6 @@ export function RunView({timelineReady={Boolean(timeline)}showDownloadedFilesworkflowRunId={workflowRunId}- onActionSelect={(payload) => pinFrame(payload.action.action_id)}onThoughtSelect={(thought) => pinFrame(thought.thought_id)}/></div>diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunBlockDetail.test.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunBlockDetail.test.tsxindex 4c0bd2bf8..60bc8f2ee 100644--- a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunBlockDetail.test.tsx+++ b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunBlockDetail.test.tsx@@ -217,7 +217,7 @@ describe("WorkflowRunBlockDetail router", () => {);});- it("renders actions for a file_download block", () => {+ it("does not duplicate the timeline with an Actions (N) section", () => {const action: ActionsApiResponse = {action_id: "act_download",action_type: ActionTypes.Click,@@ -242,8 +242,10 @@ describe("WorkflowRunBlockDetail router", () => {render(<WorkflowRunBlockDetail activeItem={block} timeline={[]} />);- expect(screen.getByText("Actions (1)")).toBeDefined();- expect(screen.getByText("Click the invoice download link")).toBeDefined();+ // The bottom timeline already lists every action; the detail panel must+ // not re-list them under an "Actions (N)" section.+ expect(screen.queryByText(/^Actions \(\d+\)$/)).toBeNull();+ expect(screen.queryByText("Click the invoice download link")).toBeNull();});it("renders the conditional detail (branch evaluation) for a conditional block", () => {@@ -332,7 +334,7 @@ describe("WorkflowRunBlockDetail router", () => {expect(screen.getByText("Running")).toBeDefined();});- it("surfaces the selected action directly under the block header", () => {+ it("does not show a redundant Selected action section when a child action is selected", () => {const action: ActionsApiResponse = {action_id: "act_extract",action_type: ActionTypes.extract,@@ -363,11 +365,51 @@ describe("WorkflowRunBlockDetail router", () => {/>,);+ // The block header still identifies the resolved block...expect(screen.getByText("calendar_lookup")).toBeDefined();- expect(screen.getByText("Selected action")).toBeDefined();+ // ...but the redundant "Selected action" card is gone.+ expect(screen.queryByText("Selected action")).toBeNull();+ });++ it("reflects the selected child action's data in the inspector tabs, not the parent block", () => {+ const action: ActionsApiResponse = {+ action_id: "act_input",+ action_type: ActionTypes.InputText,+ status: Status.Completed,+ task_id: null,+ step_id: null,+ step_order: null,+ action_order: null,+ reasoning: "Input the last name into the search field",+ description: null,+ intention: null,+ response: null,+ text: "McTesterson",+ created_by: null,+ confidence_float: 1,+ };+ const block = buildBlock({+ workflow_run_block_id: "wrb_task",+ block_type: "task_v2",+ label: "registry_search",+ actions: [action],+ });++ render(+ <WorkflowRunBlockDetail+ activeItem={action}+ timeline={[buildBlockItem(block)]}+ />,+ );++ // The action's reasoning is surfaced in the inspector (Summary by default).expect(- screen.getAllByText("Extract the event date from the page")[0],+ screen.getByText("Input the last name into the search field"),).toBeDefined();+ // Its input value shows under Inputs — the child action, not the block.+ // Radix Tabs activates on mousedown, not a bare click event.+ fireEvent.mouseDown(screen.getByRole("tab", { name: "Inputs" }));+ expect(screen.getByText("McTesterson")).toBeDefined();});it("ignores a stale activeIteration when falling back via 'stream'", () => {diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunBlockDetail.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunBlockDetail.tsxindex d086a3dc3..9ec50391d 100644--- a/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunBlockDetail.tsx+++ b/skyvern-frontend/src/routes/workflows/workflowRun/WorkflowRunBlockDetail.tsx@@ -1,7 +1,6 @@import type { ActionsApiResponse } from "@/api/types";-import { useMemo, useState } from "react";+import { useMemo } from "react";import { FileIcon } from "@radix-ui/react-icons";-import { ActionCardCompact } from "@/routes/tasks/detail/ActionCardCompact";import { useWorkflowRunWithWorkflowQuery } from "../hooks/useWorkflowRunWithWorkflowQuery";import {isAction,@@ -45,10 +44,6 @@ type Props = {timelineReady?: boolean;showDownloadedFiles?: boolean;workflowRunId?: string;- onActionSelect?: (payload: {- block: WorkflowRunBlock;- action: ActionsApiResponse;- }) => void;onThoughtSelect?: (thought: ObserverThought) => void;};@@ -114,52 +109,9 @@ function BlockDownloadedFiles({);}-function SelectedActionHeader({- action,- block,- index,- onActionSelect,-}: {- action: ActionsApiResponse;- block: WorkflowRunBlock;- index: number;- onActionSelect?: Props["onActionSelect"];-}) {- const [expanded, setExpanded] = useState(true);-- return (- <div className="border-b border-slate-700 bg-slate-elevation1 px-3 py-2 duration-200 animate-in fade-in slide-in-from-top-1">- <div className="mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-500">- Selected action- </div>- <ActionCardCompact- action={action}- active- index={index}- expanded={expanded}- onToggleExpanded={() => setExpanded((prev) => !prev)}- onSelect={() => onActionSelect?.({ block, action })}- cardClassName="bg-slate-800/70"- />- </div>- );-}--function getActionDisplayIndex(- block: WorkflowRunBlock,- action: ActionsApiResponse,-): number {- const actionsTopDown = [...(block.actions ?? [])].reverse();- const index = actionsTopDown.findIndex(- (item) => item.action_id === action.action_id,- );- return index === -1 ? 1 : index + 1;-}-function renderBodyForBlock(block: WorkflowRunBlock,activeItem: WorkflowRunOverviewActiveElement,- onActionSelect: Props["onActionSelect"],onThoughtSelect: Props["onThoughtSelect"],activeIteration: number | null,timeline: Array<WorkflowRunTimelineItem>,@@ -178,19 +130,12 @@ function renderBodyForBlock(<BlockDetailTaskblock={block}activeItem={activeItem}- onActionSelect={onActionSelect}onThoughtSelect={onThoughtSelect}thoughts={thoughts}/>);case "conditional":- return (- <BlockDetailConditional- block={block}- activeItem={activeItem}- onActionSelect={onActionSelect}- />- );+ return <BlockDetailConditional block={block} />;case "for_loop":case "while_loop":return <BlockDetailLoop block={block} iterationIndex={activeIteration} />;@@ -212,7 +157,6 @@ function WorkflowRunBlockDetail({timelineReady = true,showDownloadedFiles = false,workflowRunId,- onActionSelect,onThoughtSelect,}: Props) {// activeIteration is a URL hint scoped to a specific selection. In@@ -244,7 +188,6 @@ function WorkflowRunBlockDetail({// they bypass the block header and render only as the body slot.let resolvedBlock: WorkflowRunBlock | null = null;let selectedAction: ActionsApiResponse | null = null;- let selectedActionIndex = 1;let body: React.ReactNode;if (activeItem === null || activeItem === "stream") {@@ -258,7 +201,6 @@ function WorkflowRunBlockDetail({body = renderBodyForBlock(target,activeItem,- onActionSelect,onThoughtSelect,effectiveIteration,timeline,@@ -274,11 +216,9 @@ function WorkflowRunBlockDetail({if (parentBlock) {resolvedBlock = parentBlock;selectedAction = activeItem;- selectedActionIndex = getActionDisplayIndex(parentBlock, activeItem);body = renderBodyForBlock(parentBlock,activeItem,- onActionSelect,onThoughtSelect,effectiveIteration,timeline,@@ -295,7 +235,6 @@ function WorkflowRunBlockDetail({body = renderBodyForBlock(activeItem,activeItem,- onActionSelect,onThoughtSelect,effectiveIteration,timeline,@@ -322,15 +261,9 @@ function WorkflowRunBlockDetail({</div><div className="min-h-0 flex-1 overflow-y-auto overscroll-contain"><div>- {resolvedBlock && selectedAction && (- <SelectedActionHeader- action={selectedAction}- block={resolvedBlock}- index={selectedActionIndex}- onActionSelect={onActionSelect}- />+ {resolvedBlock && (+ <BlockInspector block={resolvedBlock} action={selectedAction} />)}- {resolvedBlock && <BlockInspector block={resolvedBlock} />}{resolvedBlock && showDownloadedFiles && (<BlockDownloadedFilesblock={resolvedBlock}diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailConditional.test.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailConditional.test.tsxindex fc2db1d06..3702532fc 100644--- a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailConditional.test.tsx+++ b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailConditional.test.tsx@@ -5,29 +5,13 @@ vi.mock("@/hooks/useCredentialGetter", () => ({useCredentialGetter: () => null,}));-import { cleanup, fireEvent, render, screen } from "@testing-library/react";+import { cleanup, render, screen } from "@testing-library/react";import { afterEach, describe, expect, it, vi } from "vitest";-import { ActionTypes, Status, type ActionsApiResponse } from "@/api/types";+import { Status } from "@/api/types";import type { WorkflowRunBlock } from "../../types/workflowRunTypes";import { BlockDetailConditional } from "./BlockDetailConditional";-function buildAction(- overrides: Partial<ActionsApiResponse> = {},-): ActionsApiResponse {- return {- action_id: "act_default",- action_type: ActionTypes.extract,- status: Status.Completed,- reasoning: "Extract conditional result",- text: null,- response: null,- confidence_float: null,- created_by: null,- ...overrides,- } as ActionsApiResponse;-}-function buildConditional(overrides: Partial<WorkflowRunBlock> = {},): WorkflowRunBlock {@@ -113,47 +97,6 @@ describe("BlockDetailConditional", () => {expect(screen.getByText("fallback")).toBeDefined();});- it("renders conditional actions in the detail panel", () => {- const block = buildConditional({- actions: [- buildAction({- action_id: "act_condition_extract",- reasoning: "Extract the condition result from the page",- }),- ],- });-- render(<BlockDetailConditional block={block} />);-- expect(screen.getByText("Actions (1)")).toBeDefined();- expect(- screen.getByText("Extract the condition result from the page"),- ).toBeDefined();- });-- it("fires onActionSelect when a conditional action is selected", () => {- const onActionSelect = vi.fn();- const action = buildAction({- action_id: "act_condition_extract",- reasoning: "Extract the condition result from the page",- });- const block = buildConditional({ actions: [action] });-- render(- <BlockDetailConditional- block={block}- activeItem={null}- onActionSelect={onActionSelect}- />,- );-- fireEvent.click(- screen.getByText("Extract the condition result from the page"),- );-- expect(onActionSelect).toHaveBeenCalledWith({ block, action });- });-it("falls back to the legacy executed_branch_expression rendering when no evaluations array", () => {const block = buildConditional({executed_branch_id: "b_match",diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailConditional.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailConditional.tsxindex 185628cf9..28dd13415 100644--- a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailConditional.tsx+++ b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailConditional.tsx@@ -1,25 +1,13 @@-import type { ActionsApiResponse } from "@/api/types";import {hasEvaluations,type WorkflowRunBlock,} from "../../types/workflowRunTypes";-import type { WorkflowRunOverviewActiveElement } from "../WorkflowRunOverview";import { JsonExplorer } from "./BlockInspector";-import {- BlockActionList,- BlockDetailFailure,- CodeBlock,- Section,-} from "./shared";+import { BlockDetailFailure, CodeBlock, Section } from "./shared";import { cn } from "@/util/utils";type Props = {block: WorkflowRunBlock;- activeItem?: WorkflowRunOverviewActiveElement;- onActionSelect?: (payload: {- block: WorkflowRunBlock;- action: ActionsApiResponse;- }) => void;};function tryParseJson(value: string): unknown | null {@@ -44,11 +32,7 @@ function RenderedExpression({ value }: { value: string }) {);}-function BlockDetailConditional({- block,- activeItem = null,- onActionSelect,-}: Props) {+function BlockDetailConditional({ block }: Props) {const evaluations =hasEvaluations(block.output) && block.output.evaluations? block.output.evaluations@@ -61,11 +45,6 @@ function BlockDetailConditional({return (<div className="space-y-4 px-3 py-3 empty:hidden"><BlockDetailFailure block={block} />- <BlockActionList- block={block}- activeItem={activeItem}- onActionSelect={onActionSelect}- />{hasExecutedBranch && evaluations && evaluations.length > 0 ? (<Section title="Branches"><div className="space-y-2">diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailTask.test.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailTask.test.tsxindex ef2edb77b..5f05c71eb 100644--- a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailTask.test.tsx+++ b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailTask.test.tsx@@ -8,7 +8,7 @@ vi.mock("@/hooks/useCredentialGetter", () => ({import { cleanup, fireEvent, render, screen } from "@testing-library/react";import { afterEach, describe, expect, it, vi } from "vitest";-import { ActionTypes, Status, type ActionsApiResponse } from "@/api/types";+import { Status } from "@/api/types";import type {ObserverThought,WorkflowRunBlock,@@ -73,22 +73,6 @@ function buildThought(} as ObserverThought;}-function buildAction(- overrides: Partial<ActionsApiResponse> = {},-): ActionsApiResponse {- return {- action_id: "act_default",- action_type: ActionTypes.wait,- status: Status.Completed,- reasoning: null,- text: null,- response: null,- confidence_float: null,- created_by: null,- ...overrides,- } as ActionsApiResponse;-}-afterEach(() => {cleanup();});@@ -126,29 +110,4 @@ describe("BlockDetailTask thought selection", () => {);expect(screen.getByText("Considering the next step")).toBeDefined();});-- it("renders actions in chronological order to match their numbers", () => {- const newestFirstActions = [- buildAction({ action_id: "act_3", reasoning: "third action" }),- buildAction({ action_id: "act_2", reasoning: "second action" }),- buildAction({ action_id: "act_1", reasoning: "first action" }),- ];-- render(- <BlockDetailTask- block={buildTaskBlock({ actions: newestFirstActions })}- activeItem={null}- thoughts={[]}- />,- );-- const firstAction = screen.getByText("first action");- const thirdAction = screen.getByText("third action");- expect(- firstAction.compareDocumentPosition(thirdAction) &- Node.DOCUMENT_POSITION_FOLLOWING,- ).toBeTruthy();- expect(screen.getAllByText("#1").length).toBeGreaterThanOrEqual(1);- expect(screen.getAllByText("#3").length).toBeGreaterThanOrEqual(1);- });});diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailTask.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailTask.tsxindex c52f7f193..e98fc6230 100644--- a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailTask.tsx+++ b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockDetailTask.tsx@@ -1,23 +1,14 @@-import type { ActionsApiResponse } from "@/api/types";import type {ObserverThought,WorkflowRunBlock,} from "../../types/workflowRunTypes";import type { WorkflowRunOverviewActiveElement } from "../WorkflowRunOverview";-import {- BlockActionList,- BlockDetailFailure,- BlockThoughtList,-} from "./shared";+import { BlockDetailFailure, BlockThoughtList } from "./shared";type Props = {block: WorkflowRunBlock;activeItem: WorkflowRunOverviewActiveElement;thoughts?: Array<ObserverThought>;- onActionSelect?: (payload: {- block: WorkflowRunBlock;- action: ActionsApiResponse;- }) => void;onThoughtSelect?: (thought: ObserverThought) => void;};@@ -25,17 +16,11 @@ function BlockDetailTask({block,activeItem,thoughts = [],- onActionSelect,onThoughtSelect,}: Props) {return (<div className="space-y-4 px-3 py-3 empty:hidden"><BlockDetailFailure block={block} />- <BlockActionList- block={block}- activeItem={activeItem}- onActionSelect={onActionSelect}- /><BlockThoughtListthoughts={thoughts}activeItem={activeItem}diff --git a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockInspector.tsx b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockInspector.tsxindex e4d084d7f..7960222d2 100644--- a/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockInspector.tsx+++ b/skyvern-frontend/src/routes/workflows/workflowRun/blockDetail/BlockInspector.tsx@@ -6,6 +6,11 @@ import {import { useEffect, useMemo, useState } from "react";import { Link } from "react-router-dom";+import {+ ActionTypes,+ getReadableActionType,+ type ActionsApiResponse,+} from "@/api/types";import { Input } from "@/components/ui/input";import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";import { cn } from "@/util/utils";@@ -369,15 +374,80 @@ function getSummaryFields(block: WorkflowRunBlock): Array<InspectorField> {return fields;}-function BlockInspector({ block }: { block: WorkflowRunBlock }) {- const inputFields = useMemo(() => getInputFields(block), [block]);- const summaryFields = useMemo(() => getSummaryFields(block), [block]);- const outputValue = getOutputValue(block);- const showsExtractedInformation = shouldShowExtractedInformation(block);+function getActionInputValue(action: ActionsApiResponse): string | null {+ // Mirror ActionCardCompact: script-generated input text lives in response.+ if (action.action_type === ActionTypes.InputText) {+ return action.text ?? action.response;+ }+ return action.text;+}++function getActionInputFields(+ action: ActionsApiResponse,+): Array<InspectorField> {+ const fields: Array<InspectorField> = [];+ pushField(fields, "Input", getActionInputValue(action));+ return fields;+}++function getActionSummaryFields(+ action: ActionsApiResponse,+): Array<InspectorField> {+ const fields: Array<InspectorField> = [];+ pushField(fields, "Type", getReadableActionType(action.action_type));+ pushField(fields, "Status", action.status);+ pushField(+ fields,+ "Confidence",+ action.confidence_float != null+ ? `${Math.round(action.confidence_float * 100)}%`+ : null,+ );+ pushField(fields, "Reasoning", action.reasoning);+ pushField(fields, "Intention", action.intention);+ return fields;+}++function getActionOutputValue(action: ActionsApiResponse): unknown {+ // response doubles as stored input only for input-text actions — don't echo+ // it back as output there. Other action types legitimately carry their+ // result in response even when it equals text, so never suppress for them.+ if (+ action.action_type === ActionTypes.InputText &&+ typeof action.response === "string" &&+ action.response === getActionInputValue(action)+ ) {+ return null;+ }+ return action.response;+}++function BlockInspector({+ block,+ action,+}: {+ block: WorkflowRunBlock;+ action?: ActionsApiResponse | null;+}) {+ const inputFields = useMemo(+ () => (action ? getActionInputFields(action) : getInputFields(block)),+ [action, block],+ );+ const summaryFields = useMemo(+ () => (action ? getActionSummaryFields(action) : getSummaryFields(block)),+ [action, block],+ );+ const showsExtractedInformation =+ !action && shouldShowExtractedInformation(block);+ const outputValue = action+ ? getActionOutputValue(action)+ : getOutputValue(block);const hasOutput = showsExtractedInformation || !isEmptyValue(outputValue);const outputRootLabel = showsExtractedInformation? "extracted_information"- : "output";+ : action+ ? "response"+ : "output";const outputTabLabel = showsExtractedInformation? "Extracted Information": "Outputs";@@ -388,7 +458,7 @@ function BlockInspector({ block }: { block: WorkflowRunBlock }) {useEffect(() => {setActiveTab(defaultTab);- }, [block.workflow_run_block_id, defaultTab]);+ }, [block.workflow_run_block_id, action?.action_id, defaultTab]);return (<div className="border-b border-slate-700 bg-slate-elevation1 px-3 py-3">