Skip to content

Commit

Permalink
🔄 synced local 'skyvern-frontend/src/' with remote 'skyvern-frontend/…
Browse files Browse the repository at this point in the history
…src/'

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Adds a link to task diagnostics in `BlockCard` using `ExternalLinkIcon` and `Link` if `task_id` is present.
>
>   - **Behavior**:
>     - Adds a link to task diagnostics in `BlockCard` if `block.task_id` is present.
>     - Uses `ExternalLinkIcon` and `Link` from `react-router-dom` to navigate to `/tasks/{task_id}/diagnostics`.
>   - **UI Components**:
>     - Replaces `CubeIcon` with `ExternalLinkIcon` in `BlockCard`.
>     - Adds `Button` component to wrap the `Link` for better styling and interaction.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for 88b9c999bf305ad38cec82b24bd1bde8f8122c53. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
wintonzheng committed Jan 2, 2025
1 parent 3510a81 commit 6f53e0d
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions skyvern-frontend/src/routes/workflows/workflowRun/BlockCard.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { CubeIcon } from "@radix-ui/react-icons";
import { ExternalLinkIcon } from "@radix-ui/react-icons";
import { WorkflowRunBlock } from "../types/workflowRunTypes";
import { cn } from "@/util/utils";
import { WorkflowBlockIcon } from "../editor/nodes/WorkflowBlockIcon";
import { workflowBlockTitle } from "../editor/nodes/types";
import { Button } from "@/components/ui/button";
import { Link } from "react-router-dom";

type Props = {
active: boolean;
Expand All @@ -21,18 +23,26 @@ function BlockCard({ block, onClick, active }: Props) {
)}
onClick={onClick}
>
<div className="flex justify-between">
<div className="flex items-center justify-between">
<div className="flex gap-3">
<WorkflowBlockIcon
workflowBlockType={block.block_type}
className="size-6"
/>
<span>{workflowBlockTitle[block.block_type]}</span>
</div>
<div className="flex items-center gap-1 rounded bg-slate-elevation5 px-2 py-1">
<CubeIcon className="size-4" />
<span className="text-xs">Block</span>
</div>
{block.task_id && (
<Button
title="Go to task diagnostics"
asChild
size="icon"
className="size-8 bg-slate-800 text-primary hover:bg-slate-700"
>
<Link to={`/tasks/${block.task_id}/diagnostics`}>
<ExternalLinkIcon />
</Link>
</Button>
)}
</div>
</div>
);
Expand Down

0 comments on commit 6f53e0d

Please sign in to comment.