Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
Standardize data tables with a consistent Linear/Apollo-style design (#6326)
Suchintan486d78cda9c7
diff --git a/skyvern-frontend/src/components/SidebarTreeNav.tsx b/skyvern-frontend/src/components/SidebarTreeNav.tsxindex 6e7aa2868..43ab33ef9 100644--- a/skyvern-frontend/src/components/SidebarTreeNav.tsx+++ b/skyvern-frontend/src/components/SidebarTreeNav.tsx@@ -182,15 +182,19 @@ function CollapsedNavItem({return (<DropdownMenu open={open} onOpenChange={setOpen} modal={false}><DropdownMenuTrigger asChild>- <button- type="button"+ <Link+ to={item.to}title={item.label}className={triggerClassName}+ onClick={() => {+ clearHoverTimer();+ setOpen(false);+ }}onMouseEnter={() => scheduleHover(true, FLYOUT_OPEN_DELAY_MS)}onMouseLeave={() => scheduleHover(false, FLYOUT_CLOSE_DELAY_MS)}><span className={iconClassName}>{item.icon}</span>- </button>+ </Link></DropdownMenuTrigger><DropdownMenuContentside="right"diff --git a/skyvern-frontend/src/components/StatusBadge.tsx b/skyvern-frontend/src/components/StatusBadge.tsxindex 3c4f99fc5..0a5d7c92f 100644--- a/skyvern-frontend/src/components/StatusBadge.tsx+++ b/skyvern-frontend/src/components/StatusBadge.tsx@@ -1,37 +1,111 @@+import { type ReactNode } from "react";+import { Status } from "@/api/types";-import { Badge } from "./ui/badge";import { cn } from "@/util/utils";+type PillTone =+ | "success"+ | "danger"+ | "terminated"+ | "running"+ | "queued"+ | "neutral";++const toneStyles: Record<PillTone, { pill: string; dot: string }> = {+ success: {+ pill: "bg-emerald-500/10 text-emerald-700 ring-emerald-600/20 dark:text-emerald-400 dark:ring-emerald-500/25",+ dot: "bg-emerald-500",+ },+ danger: {+ pill: "bg-rose-500/10 text-rose-700 ring-rose-600/20 dark:text-rose-400 dark:ring-rose-500/25",+ dot: "bg-rose-500",+ },+ terminated: {+ pill: "bg-orange-500/10 text-orange-700 ring-orange-600/20 dark:text-orange-400 dark:ring-orange-500/25",+ dot: "bg-orange-500",+ },+ running: {+ pill: "bg-blue-500/10 text-blue-700 ring-blue-600/20 dark:text-blue-400 dark:ring-blue-500/25",+ dot: "bg-blue-500",+ },+ queued: {+ pill: "bg-amber-500/10 text-amber-700 ring-amber-600/20 dark:text-amber-500 dark:ring-amber-500/25",+ dot: "bg-amber-500",+ },+ neutral: {+ pill: "bg-slate-500/10 text-slate-600 ring-slate-500/20 dark:text-slate-300 dark:ring-slate-400/20",+ dot: "bg-slate-400",+ },+};++type PillProps = {+ tone: PillTone;+ pulse?: boolean;+ className?: string;+ children: ReactNode;+};++function Pill({ tone, pulse = false, className, children }: PillProps) {+ return (+ <span+ className={cn(+ "inline-flex items-center gap-1.5 whitespace-nowrap rounded-md px-2 py-0.5 text-xs font-medium ring-1 ring-inset",+ toneStyles[tone].pill,+ className,+ )}+ >+ <span+ className={cn(+ "size-1.5 shrink-0 rounded-full",+ toneStyles[tone].dot,+ pulse && "animate-pulse",+ )}+ />+ {children}+ </span>+ );+}+type Props = {className?: string;status: Status | "pending";};+function toneForStatus(status: Status | "pending"): PillTone {+ switch (status) {+ case Status.Completed:+ return "success";+ case Status.Failed:+ case Status.Canceled:+ case Status.TimedOut:+ return "danger";+ case Status.Terminated:+ return "terminated";+ case Status.Running:+ return "running";+ case Status.Queued:+ case "pending":+ return "queued";+ case Status.Created:+ default:+ return "neutral";+ }+}+function StatusBadge({ className, status }: Props) {const statusText = status === "timed_out" ? "timed out" : status;+ const tone = toneForStatus(status);return (- <Badge- className={cn("flex h-7 w-24 justify-center", className, {- "border-green-900/20 bg-green-900/10 text-green-800 hover:bg-green-900/15 dark:border-transparent dark:bg-green-900 dark:text-green-50 dark:hover:bg-green-900/80":- status === Status.Completed,- "border-orange-900/20 bg-orange-900/10 text-orange-800 hover:bg-orange-900/15 dark:border-transparent dark:bg-orange-900 dark:text-orange-50 dark:hover:bg-orange-900/80":- status === Status.Terminated,- "border-gray-900/20 bg-gray-900/10 text-gray-800 hover:bg-gray-900/15 dark:border-transparent dark:bg-gray-900 dark:text-gray-50 dark:hover:bg-gray-900/80":- status === Status.Created,- "border-red-900/20 bg-red-900/10 text-red-800 hover:bg-red-900/15 dark:border-transparent dark:bg-red-900 dark:text-red-50 dark:hover:bg-red-900/80":- status === Status.Failed ||- status === Status.Canceled ||- status === Status.TimedOut,- "bg-yellow-900 text-yellow-50 hover:bg-yellow-900/80":- status === Status.Running ||- status === Status.Queued ||- status === "pending",- })}+ <Pill+ tone={tone}+ pulse={tone === "running" || tone === "queued"}+ className={cn("capitalize", className)}>{statusText}- </Badge>+ </Pill>);}-export { StatusBadge };+export { StatusBadge, Pill };+export type { PillTone };diff --git a/skyvern-frontend/src/components/ui/table.tsx b/skyvern-frontend/src/components/ui/table.tsxindex cfa69ebb1..ad607f59a 100644--- a/skyvern-frontend/src/components/ui/table.tsx+++ b/skyvern-frontend/src/components/ui/table.tsx@@ -24,7 +24,11 @@ const TableHeader = React.forwardRef<HTMLTableSectionElement,React.HTMLAttributes<HTMLTableSectionElement>>(({ className, ...props }, ref) => (- <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />+ <thead+ ref={ref}+ className={cn("bg-muted/30 [&_tr]:border-b", className)}+ {...props}+ />));TableHeader.displayName = "TableHeader";@@ -34,7 +38,10 @@ const TableBody = React.forwardRef<>(({ className, ...props }, ref) => (<tbodyref={ref}- className={cn("[&_tr:last-child]:border-0", className)}+ className={cn(+ "[&_tr:hover]:bg-muted/40 [&_tr:last-child]:border-0",+ className,+ )}{...props}/>));@@ -62,7 +69,7 @@ const TableRow = React.forwardRef<<trref={ref}className={cn(- "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",+ "border-b border-border/60 transition-colors data-[state=selected]:bg-muted",className,)}{...props}@@ -77,7 +84,7 @@ const TableHead = React.forwardRef<<thref={ref}className={cn(- "h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",+ "h-9 px-3 text-left align-middle text-[11px] font-semibold uppercase tracking-wider text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",className,)}{...props}@@ -92,7 +99,7 @@ const TableCell = React.forwardRef<<tdref={ref}className={cn(- "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",+ "px-3 py-2.5 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",className,)}{...props}@@ -112,6 +119,27 @@ const TableCaption = React.forwardRef<));TableCaption.displayName = "TableCaption";+type TableMessageRowProps = React.TdHTMLAttributes<HTMLTableCellElement> & {+ colSpan: number;+};++const TableMessageRow = React.forwardRef<+ HTMLTableCellElement,+ TableMessageRowProps+>(({ className, colSpan, children, ...props }, ref) => (+ <TableRow>+ <TableCell+ ref={ref}+ colSpan={colSpan}+ className={cn("h-24 text-center text-muted-foreground", className)}+ {...props}+ >+ {children}+ </TableCell>+ </TableRow>+));+TableMessageRow.displayName = "TableMessageRow";+export {Table,TableHeader,@@ -121,4 +149,5 @@ export {TableRow,TableCell,TableCaption,+ TableMessageRow,};diff --git a/skyvern-frontend/src/routes/browserProfiles/BrowserProfileItem.tsx b/skyvern-frontend/src/routes/browserProfiles/BrowserProfileItem.tsxindex b8dcce7d5..2193c883e 100644--- a/skyvern-frontend/src/routes/browserProfiles/BrowserProfileItem.tsx+++ b/skyvern-frontend/src/routes/browserProfiles/BrowserProfileItem.tsx@@ -11,7 +11,7 @@ import {TooltipProvider,TooltipTrigger,} from "@/components/ui/tooltip";-import { basicLocalTimeFormat, basicTimeFormat } from "@/util/timeFormat";+import { basicTimeFormat, compactLocalDateTime } from "@/util/timeFormat";import { DeleteBrowserProfileButton } from "./DeleteBrowserProfileButton";import { RenameBrowserProfileDialog } from "./RenameBrowserProfileDialog";@@ -41,28 +41,25 @@ function BrowserProfileItem({ profile }: Props) {};return (- <TableRow- className="cursor-pointer hover:bg-slate-elevation2"- onClick={handleRowClick}- >+ <TableRow className="cursor-pointer" onClick={handleRowClick}><TableCell className="truncate"><span title={profile.name}>{profile.name}</span></TableCell>- <TableCell className="truncate text-neutral-600 dark:text-slate-400">+ <TableCell className="truncate text-muted-foreground">{profile.description ? (<span title={profile.description}>{profile.description}</span>) : (<span className="opacity-50">—</span>)}</TableCell>- <TableCell className="truncate text-neutral-600 dark:text-slate-400">+ <TableCell className="truncate text-muted-foreground">{profile.source_browser_type ?? <span className="opacity-50">—</span>}</TableCell><TableCell- className="text-neutral-600 dark:text-slate-400"+ className="text-muted-foreground"title={basicTimeFormat(profile.created_at)}>- {basicLocalTimeFormat(profile.created_at)}+ {compactLocalDateTime(profile.created_at)}</TableCell><TableCell onClick={stopRowClick}><div className="flex justify-end gap-2">diff --git a/skyvern-frontend/src/routes/browserProfiles/BrowserProfilesList.tsx b/skyvern-frontend/src/routes/browserProfiles/BrowserProfilesList.tsxindex 0a721d4c7..bc5bc8e31 100644--- a/skyvern-frontend/src/routes/browserProfiles/BrowserProfilesList.tsx+++ b/skyvern-frontend/src/routes/browserProfiles/BrowserProfilesList.tsx@@ -132,25 +132,15 @@ function BrowserProfilesList({ searchKey }: Props = {}) {return (<div className="space-y-4">- <div className="rounded-lg border">+ <div className="overflow-hidden rounded-lg border border-border"><Table className="w-full table-fixed">- <TableHeader className="rounded-t-lg bg-slate-elevation2">+ <TableHeader><TableRow>- <TableHead className="w-1/4 truncate rounded-tl-lg text-neutral-600 dark:text-slate-400">- Name- </TableHead>- <TableHead className="w-1/3 truncate text-neutral-600 dark:text-slate-400">- Description- </TableHead>- <TableHead className="w-1/6 truncate text-neutral-600 dark:text-slate-400">- Source Browser- </TableHead>- <TableHead className="w-1/6 truncate text-neutral-600 dark:text-slate-400">- Created- </TableHead>- <TableHead className="w-32 truncate rounded-tr-lg text-right text-neutral-600 dark:text-slate-400">- Actions- </TableHead>+ <TableHead className="w-[22%] truncate">Name</TableHead>+ <TableHead className="w-[40%] truncate">Description</TableHead>+ <TableHead className="w-[15%] truncate">Source Browser</TableHead>+ <TableHead className="w-[15%] truncate">Created</TableHead>+ <TableHead className="w-32 text-right">Actions</TableHead></TableRow></TableHeader><TableBody>@@ -192,7 +182,7 @@ function BrowserProfilesList({ searchKey }: Props = {}) {Items per page</span><select- className="h-9 rounded-md border border-slate-300 bg-background px-3"+ className="h-8 rounded-md border border-input bg-background px-2 text-sm"value={itemsPerPage}onChange={(e) => {const next = Number(e.target.value);diff --git a/skyvern-frontend/src/routes/browserProfiles/BrowserProfilesPage.tsx b/skyvern-frontend/src/routes/browserProfiles/BrowserProfilesPage.tsxindex 419faf02d..58813ad69 100644--- a/skyvern-frontend/src/routes/browserProfiles/BrowserProfilesPage.tsx+++ b/skyvern-frontend/src/routes/browserProfiles/BrowserProfilesPage.tsx@@ -2,6 +2,7 @@ import { useState } from "react";import { useSearchParams } from "react-router-dom";import { useDebounce } from "use-debounce";+import { BrowserIcon } from "@/components/icons/BrowserIcon";import { TableSearchInput } from "@/components/TableSearchInput";import { BrowserProfilesList } from "./BrowserProfilesList";@@ -21,10 +22,15 @@ function BrowserProfilesPage() {useBackgroundBrowserProfileCreate();return (- <div className="space-y-5">- <h1 className="text-2xl">Browser Profiles</h1>- <div className="w-96 text-sm text-neutral-600 dark:text-slate-300">- {subHeaderText}+ <div className="space-y-6">+ <div className="space-y-2">+ <div className="flex items-center gap-2">+ <BrowserIcon className="size-6" />+ <h1 className="text-2xl">Browser Profiles</h1>+ </div>+ <p className="text-sm leading-6 text-muted-foreground">+ {subHeaderText}+ </p></div><div className="flex items-center justify-between gap-4"><TableSearchInputdiff --git a/skyvern-frontend/src/routes/browserSessions/BrowserSessions.test.tsx b/skyvern-frontend/src/routes/browserSessions/BrowserSessions.test.tsxindex 1dbe1742b..fa05f2fe0 100644--- a/skyvern-frontend/src/routes/browserSessions/BrowserSessions.test.tsx+++ b/skyvern-frontend/src/routes/browserSessions/BrowserSessions.test.tsx@@ -7,7 +7,7 @@ import { MemoryRouter } from "react-router-dom";import { BrowserSessions } from "./BrowserSessions";import { type BrowserSession } from "@/routes/workflows/types/browserSessionTypes";-const openBrowserSession: BrowserSession = {+const openUnoccupiedSession: BrowserSession = {browser_address: "ws://example.test/devtools/browser/session-1",browser_session_id: "session-1",completed_at: null,@@ -23,7 +23,7 @@ const openBrowserSession: BrowserSession = {vi.mock("@/routes/browserSessions/hooks/useBrowserSessionsQuery", () => ({useBrowserSessionsQuery: vi.fn((page: number) => ({- data: page === 1 ? [openBrowserSession] : [],+ data: page === 1 ? [openUnoccupiedSession] : [],isLoading: false,})),}));@@ -42,28 +42,29 @@ afterEach(() => {cleanup();});-describe("BrowserSessions", () => {- it("renders the open session Yes pill with completed run status colors", () => {- render(- <MemoryRouter- initialEntries={["/browser-sessions"]}- future={{ v7_relativeSplatPath: true, v7_startTransition: true }}- >- <BrowserSessions />- </MemoryRouter>,- );-- const openPill = screen.getByText("Yes");+function renderPage() {+ render(+ <MemoryRouter+ initialEntries={["/browser-sessions"]}+ future={{ v7_relativeSplatPath: true, v7_startTransition: true }}+ >+ <BrowserSessions />+ </MemoryRouter>,+ );+}- const pillClasses = openPill.className.split(/\s+/);+describe("BrowserSessions", () => {+ it("renders a session row with its id and timeout", () => {+ renderPage();+ expect(screen.getByText("session-1")).toBeTruthy();+ expect(screen.getByText("60m")).toBeTruthy();+ });- expect(pillClasses).toContain("border-green-900/20");- expect(pillClasses).toContain("bg-green-900/10");- expect(pillClasses).toContain("text-green-800");- expect(pillClasses).toContain("hover:bg-green-900/15");- expect(pillClasses).toContain("dark:bg-green-900");- expect(pillClasses).toContain("dark:text-green-50");- expect(openPill.className).not.toMatch(/emerald|bg-success/);- expect(openPill.className).not.toMatch(/shadow-(emerald|\[)/);+ it("derives Open=Yes / Occupied=No from the session's lifecycle fields", () => {+ renderPage();+ // completed_at === null && started_at !== null => open+ expect(screen.getAllByText("Yes")).toHaveLength(1);+ // runnable_id === null => not occupied+ expect(screen.getAllByText("No")).toHaveLength(1);});});diff --git a/skyvern-frontend/src/routes/browserSessions/BrowserSessions.tsx b/skyvern-frontend/src/routes/browserSessions/BrowserSessions.tsxindex 3a5048697..ef9cee0be 100644--- a/skyvern-frontend/src/routes/browserSessions/BrowserSessions.tsx+++ b/skyvern-frontend/src/routes/browserSessions/BrowserSessions.tsx@@ -4,7 +4,6 @@ import { useNavigate, useSearchParams } from "react-router-dom";import { ProxyLocation } from "@/api/types";-import { Badge } from "@/components/ui/badge";import { Button } from "@/components/ui/button";import { Checkbox } from "@/components/ui/checkbox";import {@@ -15,6 +14,7 @@ import {DrawerTitle,} from "@/components/ui/drawer";import { HelpTooltip } from "@/components/HelpTooltip";+import { Pill } from "@/components/StatusBadge";import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";import {@@ -39,6 +39,7 @@ import {TableCell,TableHead,TableHeader,+ TableMessageRow,TableRow,} from "@/components/ui/table";import { useBrowserSessionsQuery } from "@/routes/browserSessions/hooks/useBrowserSessionsQuery";@@ -58,17 +59,9 @@ function sessionIsOpen(browserSession: BrowserSession): boolean {);}-const No = () => (- <Badge className="flex h-7 w-12 justify-center border border-neutral-200 bg-neutral-100 text-neutral-600 shadow-none hover:bg-neutral-100 dark:border-white/10 dark:bg-white/[0.06] dark:text-neutral-300 dark:hover:bg-white/[0.08]">- No- </Badge>-);+const No = () => <Pill tone="neutral">No</Pill>;-const Yes = () => (- <Badge className="flex h-7 w-12 justify-center border-green-900/20 bg-green-900/10 text-green-800 shadow-none hover:bg-green-900/15 dark:border-transparent dark:bg-green-900 dark:text-green-50 dark:hover:bg-green-900/80">- Yes- </Badge>-);+const Yes = () => <Pill tone="success">Yes</Pill>;const BROWSER_TYPE_OPTIONS: Array<{value: BrowserSessionType;@@ -178,21 +171,19 @@ function BrowserSessions() {}return (- <div className="px-8">- {/* header */}- <div className="space-y-5">+ <div className="container mx-auto space-y-6">+ <div className="space-y-2"><div className="flex items-center gap-2"><GlobeIcon className="size-6" /><h1 className="text-2xl">Browsers</h1></div>- <p className="text-sm leading-6 text-neutral-600 dark:text-neutral-400">+ <p className="text-sm leading-6 text-muted-foreground">Create your own live browsers to interact with websites, or run agentsin.</p></div>- {/* browsers */}- <div className="mt-6 space-y-4">+ <div className="space-y-4"><div className="flex justify-end"><div className="flex gap-4"><Button@@ -210,43 +201,33 @@ function BrowserSessions() {</Button></div></div>- <div className="rounded-lg border">+ <div className="overflow-hidden rounded-lg border border-border"><Table className="w-full table-fixed">- <TableHeader className="rounded-t-lg bg-slate-elevation2">+ <TableHeader><TableRow>- <TableHead className="w-1/4 truncate rounded-tl-lg text-slate-400">- ID- </TableHead>- <TableHead className="w-1/12 truncate text-slate-400">- Open- </TableHead>- <TableHead className="w-1/6 truncate text-slate-400">- <span className="mr-2">Occupied</span>- <HelpTooltip- className="inline"- content="Browser is busy running a task or agent"- />- </TableHead>- <TableHead className="w-1/6 truncate text-slate-400">- Started- </TableHead>- <TableHead className="w-1/6 truncate text-slate-400">- Timeout- </TableHead>- <TableHead className="w-1/2 truncate text-slate-400">- CDP Url+ <TableHead className="w-[22%] truncate">ID</TableHead>+ <TableHead className="w-[10%] truncate">Open</TableHead>+ <TableHead className="w-[14%]">+ <span className="inline-flex items-center gap-1.5">+ Occupied+ <HelpTooltip+ className="inline"+ content="Browser is busy running a task or agent"+ />+ </span></TableHead>+ <TableHead className="w-[14%] truncate">Started</TableHead>+ <TableHead className="w-[12%] truncate">Timeout</TableHead>+ <TableHead className="w-[28%] truncate">CDP Url</TableHead></TableRow></TableHeader><TableBody>{isLoading ? (- <TableRow>- <TableCell colSpan={6}>Loading...</TableCell>- </TableRow>+ <TableMessageRow colSpan={6}>Loading browsers…</TableMessageRow>) : browserSessions?.length === 0 ? (- <TableRow>- <TableCell colSpan={6}>No browser sessions found</TableCell>- </TableRow>+ <TableMessageRow colSpan={6}>+ No browser sessions found+ </TableMessageRow>) : (browserSessions?.map((browserSession) => {const isOpen = sessionIsOpen(browserSession);@@ -264,18 +245,18 @@ function BrowserSessions() {return (<TableRowkey={browserSession.browser_session_id}- className="cursor-pointer hover:bg-slate-elevation2"+ className="cursor-pointer"onClick={(e) => {handleRowClick(e, browserSession.browser_session_id);}}><TableCell>- <div className="flex items-center font-mono text-sm">- <div className="truncate opacity-75">+ <div className="flex items-center font-mono text-xs">+ <div className="truncate text-muted-foreground">{browserSession.browser_session_id}</div><CopyText- className="opacity-75 hover:opacity-100"+ className="opacity-60 hover:opacity-100"text={browserSession.browser_session_id}/></div>@@ -285,6 +266,7 @@ function BrowserSessions() {{browserSession.runnable_id ? <Yes /> : <No />}</TableCell><TableCell+ className="text-muted-foreground"title={browserSession.started_at? basicTimeFormat(browserSession.started_at)@@ -293,14 +275,16 @@ function BrowserSessions() {>{ago}</TableCell>- <TableCell>+ <TableCell className="tabular-nums text-muted-foreground">{browserSession.timeout? `${browserSession.timeout}m`: "-"}</TableCell><TableCell>- <div className="flex items-center font-mono text-sm">- <div className="truncate opacity-75">{cdpUrl}</div>+ <div className="flex items-center font-mono text-xs">+ <div className="truncate text-muted-foreground">+ {cdpUrl}+ </div>{cdpUrl !== "-" ? (<CopyTextclassName="opacity-75 hover:opacity-100"@@ -319,7 +303,7 @@ function BrowserSessions() {<div className="absolute left-3 top-1/2 flex -translate-y-1/2 items-center gap-2 text-sm"><span className="text-slate-400">Items per page</span><select- className="h-9 rounded-md border border-slate-300 bg-background"+ className="h-8 rounded-md border border-input bg-background px-2 text-sm"value={itemsPerPage}onChange={(e) => {const next = Number(e.target.value);diff --git a/skyvern-frontend/src/routes/history/RunHistory.tsx b/skyvern-frontend/src/routes/history/RunHistory.tsxindex ed26be922..2ce2ba6c6 100644--- a/skyvern-frontend/src/routes/history/RunHistory.tsx+++ b/skyvern-frontend/src/routes/history/RunHistory.tsx@@ -37,6 +37,7 @@ import {TableCell,TableHead,TableHeader,+ TableMessageRow,TableRow,} from "@/components/ui/table";import { useRunsQuery } from "@/hooks/useRunsQuery";@@ -238,13 +239,7 @@ function RunHistory() {// No runs foundif (runs?.length === 0) {- return (- <TableRow>- <TableCell colSpan={6}>- <div className="text-center">No runs found</div>- </TableCell>- </TableRow>- );+ return <TableMessageRow colSpan={6}>No runs found</TableMessageRow>;}return runs?.map((run) => {@@ -429,26 +424,16 @@ function RunHistory() {}}/></div>- <div className="rounded-lg border">+ <div className="overflow-hidden rounded-lg border border-border"><Table className="sm:table-fixed">- <TableHeader className="rounded-t-lg bg-slate-elevation2">+ <TableHeader><TableRow>- <TableHead className="w-[20%] rounded-tl-lg text-neutral-600 dark:text-slate-400">- Run ID- </TableHead>- <TableHead className="w-[20%] text-neutral-600 dark:text-slate-400">- Detail- </TableHead>- <TableHead className="w-[16%] text-neutral-600 dark:text-slate-400">- Status- </TableHead>- <TableHead className="w-[27%] text-neutral-600 dark:text-slate-400">- Created At- </TableHead>- <TableHead className="w-[8%] text-neutral-600 dark:text-slate-400">- Duration- </TableHead>- <TableHead className="w-[8%] rounded-tr-lg text-neutral-600 dark:text-slate-400"></TableHead>+ <TableHead className="w-[20%]">Run ID</TableHead>+ <TableHead className="w-[20%]">Detail</TableHead>+ <TableHead className="w-[16%]">Status</TableHead>+ <TableHead className="w-[27%]">Created At</TableHead>+ <TableHead className="w-[8%]">Duration</TableHead>+ <TableHead className="w-[8%]"></TableHead></TableRow></TableHeader><TableBody>{displayTableBody()}</TableBody>diff --git a/skyvern-frontend/src/routes/root/SideNav.test.tsx b/skyvern-frontend/src/routes/root/SideNav.test.tsxindex 0e8ffa022..abd02cbe5 100644--- a/skyvern-frontend/src/routes/root/SideNav.test.tsx+++ b/skyvern-frontend/src/routes/root/SideNav.test.tsx@@ -1,5 +1,5 @@import { cleanup, fireEvent, render, screen } from "@testing-library/react";-import { MemoryRouter } from "react-router-dom";+import { MemoryRouter, useLocation } from "react-router-dom";import { afterEach, describe, expect, it, vi } from "vitest";import { SideNav } from "./SideNav";@@ -8,6 +8,16 @@ import { useSidebarStore } from "@/store/SidebarStore";const capture = vi.fn();const mutate = vi.fn();+function LocationProbe() {+ const location = useLocation();+ return (+ <div data-testid="location">+ {location.pathname}+ {location.search}+ </div>+ );+}+vi.mock("posthog-js/react", () => ({useFeatureFlagEnabled: () => false,usePostHog: () => ({@@ -108,6 +118,21 @@ describe("SideNav", () => {});});+ it("navigates to the parent route when clicking a collapsed group icon", () => {+ useSidebarStore.setState({ collapsed: true });++ render(+ <MemoryRouter initialEntries={["/discover"]}>+ <SideNav />+ <LocationProbe />+ </MemoryRouter>,+ );++ fireEvent.click(screen.getByTitle("Agents"));++ expect(screen.getByTestId("location").textContent).toBe("/workflows");+ });+it("starts recipes collapsed on short screens", () => {window.localStorage.clear();setViewportHeight(860);diff --git a/skyvern-frontend/src/routes/schedules/SchedulesPage.tsx b/skyvern-frontend/src/routes/schedules/SchedulesPage.tsxindex 9b910ef87..78a84a5db 100644--- a/skyvern-frontend/src/routes/schedules/SchedulesPage.tsx+++ b/skyvern-frontend/src/routes/schedules/SchedulesPage.tsx@@ -428,9 +428,9 @@ function SchedulesPage() {{/* Table */}<div className="space-y-4">- <div className="overflow-hidden rounded-lg border border-slate-700">+ <div className="overflow-hidden rounded-lg border border-border"><Table className="table-fixed">- <TableHeader className="bg-slate-elevation2 text-slate-400 [&_tr]:border-b-0">+ <TableHeader><TableRow>{showCheckbox && (<TableHead className="w-[3%]">diff --git a/skyvern-frontend/src/routes/workflows/WorkflowActions.tsx b/skyvern-frontend/src/routes/workflows/WorkflowActions.tsxindex ca628cbd9..65734c58d 100644--- a/skyvern-frontend/src/routes/workflows/WorkflowActions.tsx+++ b/skyvern-frontend/src/routes/workflows/WorkflowActions.tsx@@ -30,6 +30,7 @@ import {CopyIcon,DotsHorizontalIcon,DownloadIcon,+ MixerHorizontalIcon,ReloadIcon,} from "@radix-ui/react-icons";import { useMutation, useQueryClient } from "@tanstack/react-query";@@ -43,6 +44,9 @@ import { WorkflowApiResponse } from "./types/workflowTypes";type Props = {workflow: WorkflowApiResponse;onSuccessfullyDeleted?: () => void;+ hasParameters?: boolean;+ parametersExpanded?: boolean;+ onToggleParameters?: () => void;};function downloadFile(fileName: string, contents: string) {@@ -61,7 +65,13 @@ function downloadFile(fileName: string, contents: string) {document.body.removeChild(element);}-function WorkflowActions({ workflow, onSuccessfullyDeleted }: Props) {+function WorkflowActions({+ workflow,+ onSuccessfullyDeleted,+ hasParameters,+ parametersExpanded,+ onToggleParameters,+}: Props) {const credentialGetter = useCredentialGetter();const queryClient = useQueryClient();@@ -147,11 +157,32 @@ function WorkflowActions({ workflow, onSuccessfullyDeleted }: Props) {<Dialog><DropdownMenu><DropdownMenuTrigger asChild>- <Button size="icon" variant="outline">+ <Button+ size="icon"+ variant="ghost"+ className="text-muted-foreground hover:text-foreground"+ ><DotsHorizontalIcon className="h-4 w-4" /></Button></DropdownMenuTrigger><DropdownMenuContent>+ {onToggleParameters ? (+ <>+ <DropdownMenuItem+ onSelect={() => onToggleParameters()}+ disabled={!hasParameters}+ className="p-2"+ >+ <MixerHorizontalIcon className="mr-2 h-4 w-4" />+ {hasParameters+ ? parametersExpanded+ ? "Hide parameters"+ : "Show parameters"+ : "No parameters"}+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ </>+ ) : null}<DropdownMenuItemonSelect={() => {if (!workflow) {diff --git a/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx b/skyvern-frontend/src/routes/workflows/WorkflowPage.tsxindex 3b9453fca..97d22f98e 100644--- a/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx+++ b/skyvern-frontend/src/routes/workflows/WorkflowPage.tsx@@ -34,11 +34,12 @@ import {TableCell,TableHead,TableHeader,+ TableMessageRow,TableRow,} from "@/components/ui/table";import {- basicLocalTimeFormat,basicTimeFormat,+ compactLocalDateTime,formatExecutionTime,} from "@/util/timeFormat";import { cn } from "@/util/utils";@@ -212,26 +213,24 @@ function WorkflowPage() {onChange={setStatusFilters}/></div>- <div className="rounded-md border">+ <div className="overflow-hidden rounded-lg border border-border"><Table><TableHeader><TableRow>- <TableHead className="w-1/5">ID</TableHead>- <TableHead className="w-1/5">Status</TableHead>- <TableHead className="w-1/5">Created At</TableHead>- <TableHead className="w-1/5">Duration</TableHead>- <TableHead className="w-1/5"></TableHead>+ <TableHead className="w-[20%]">ID</TableHead>+ <TableHead className="w-[20%]">Status</TableHead>+ <TableHead className="w-[20%]">Created At</TableHead>+ <TableHead className="w-[20%]">Duration</TableHead>+ <TableHead className="w-[20%] text-right">Actions</TableHead></TableRow></TableHeader><TableBody>{isLoading ? (- <TableRow>- <TableCell colSpan={5}>Loading...</TableCell>- </TableRow>+ <TableMessageRow colSpan={5}>Loading runs…</TableMessageRow>) : workflowRuns?.length === 0 ? (- <TableRow>- <TableCell colSpan={5}>No agent runs found</TableCell>- </TableRow>+ <TableMessageRow colSpan={5}>+ No agent runs found+ </TableMessageRow>) : (workflowRuns?.map((workflowRun) => {const workflowRunId =@@ -271,16 +270,19 @@ function WorkflowPage() {}}className="cursor-pointer">- <TableCell>{workflowRunId}</TableCell>+ <TableCell className="font-mono text-xs text-muted-foreground">+ {workflowRunId}+ </TableCell><TableCell><StatusBadge status={workflowRun.status} /></TableCell><TableCell+ className="text-muted-foreground"title={basicTimeFormat(workflowRun.created_at)}>- {basicLocalTimeFormat(workflowRun.created_at)}+ {compactLocalDateTime(workflowRun.created_at)}</TableCell>- <TableCell className="text-slate-400">+ <TableCell className="tabular-nums text-muted-foreground">{formatExecutionTime(workflowRun.started_at ?? workflowRun.created_at,workflowRun.finished_at,@@ -293,7 +295,7 @@ function WorkflowPage() {<TooltipTrigger asChild><Buttonsize="icon"- variant="outline"+ variant="ghost"onClick={(event) => {event.stopPropagation();toggleParametersExpanded(@@ -301,7 +303,9 @@ function WorkflowPage() {);}}className={cn(- isExpanded && "text-blue-400",+ isExpanded+ ? "text-blue-400"+ : "text-muted-foreground hover:text-foreground",)}><MixerHorizontalIcon className="h-4 w-4" />diff --git a/skyvern-frontend/src/routes/workflows/Workflows.tsx b/skyvern-frontend/src/routes/workflows/Workflows.tsxindex b540214fb..f22b72cc7 100644--- a/skyvern-frontend/src/routes/workflows/Workflows.tsx+++ b/skyvern-frontend/src/routes/workflows/Workflows.tsx@@ -14,6 +14,7 @@ import {TableCell,TableHead,TableHeader,+ TableMessageRow,TableRow,} from "@/components/ui/table";import {@@ -23,14 +24,13 @@ import {TooltipTrigger,} from "@/components/ui/tooltip";import { useCredentialGetter } from "@/hooks/useCredentialGetter";-import { basicLocalTimeFormat, basicTimeFormat } from "@/util/timeFormat";+import { basicTimeFormat, compactLocalDateTime } from "@/util/timeFormat";import { cn } from "@/util/utils";import {BookmarkFilledIcon,ChevronDownIcon,DotsHorizontalIcon,LightningBoltIcon,- MixerHorizontalIcon,Pencil2Icon,PlayIcon,PlusIcon,@@ -540,19 +540,15 @@ function Workflows() {</DropdownMenu></div></div>- <div className="rounded-lg border">+ <div className="overflow-hidden rounded-lg border border-border"><Table className="table-fixed">- <TableHeader className="rounded-t-lg bg-slate-elevation2">+ <TableHeader><TableRow>- <TableHead className="w-[25%] rounded-tl-lg text-slate-400">- ID- </TableHead>- <TableHead className="w-[30%] text-slate-400">Title</TableHead>- <TableHead className="w-[15%] text-slate-400">Folder</TableHead>- <TableHead className="w-[15%] text-slate-400">- Created At- </TableHead>- <TableHead className="w-[15%] rounded-tr-lg"></TableHead>+ <TableHead className="w-[25%]">ID</TableHead>+ <TableHead className="w-[30%]">Title</TableHead>+ <TableHead className="w-[15%]">Folder</TableHead>+ <TableHead className="w-[15%]">Created At</TableHead>+ <TableHead className="w-[15%] text-right">Actions</TableHead></TableRow></TableHeader><TableBody>@@ -585,9 +581,7 @@ function Workflows() {</TableRow>))) : displayWorkflows?.length === 0 ? (- <TableRow>- <TableCell colSpan={5}>No agents found</TableCell>- </TableRow>+ <TableMessageRow colSpan={5}>No agents found</TableMessageRow>) : (displayWorkflows?.map((workflow) => {const parameterItems = workflow.workflow_definition.parameters@@ -621,18 +615,18 @@ function Workflows() {</div></TableCell><TableCell>- <span className="text-slate-400">-</span>+ <span className="text-muted-foreground">-</span></TableCell>- <TableCell>- {basicLocalTimeFormat(workflow.created_at)}+ <TableCell className="text-muted-foreground">+ {compactLocalDateTime(workflow.created_at)}</TableCell><TableCell>- <div className="flex justify-end gap-2">+ <div className="flex justify-end gap-0.5"><Button size="icon" variant="ghost" disabled><FolderIcon className="h-4 w-4" /></Button><Button size="icon" variant="ghost" disabled>- <MixerHorizontalIcon className="h-4 w-4" />+ <Pencil2Icon className="h-4 w-4" /></Button><Button size="icon" variant="ghost" disabled><PlayIcon className="h-4 w-4" />@@ -654,7 +648,7 @@ function Workflows() {}}><div- className="truncate"+ className="truncate font-mono text-xs text-muted-foreground"title={workflow.workflow_permanent_id}><HighlightText@@ -718,7 +712,7 @@ function Workflows() {</span></div>) : (- <span className="text-slate-400">-</span>+ <span className="text-muted-foreground">-</span>)}</TableCell><TableCell@@ -728,12 +722,13 @@ function Workflows() {workflow.workflow_permanent_id,);}}+ className="text-muted-foreground"title={basicTimeFormat(workflow.created_at)}>- {basicLocalTimeFormat(workflow.created_at)}+ {compactLocalDateTime(workflow.created_at)}</TableCell><TableCell>- <div className="flex justify-end gap-2">+ <div className="flex justify-end gap-0.5"><TooltipProvider><Tooltip><TooltipTrigger asChild>@@ -756,35 +751,8 @@ function Workflows() {<TooltipTrigger asChild><Buttonsize="icon"- variant="outline"- onClick={() =>- toggleParametersExpanded(- workflow.workflow_permanent_id,- )- }- disabled={!hasParameters}- className={cn(- isExpanded && "text-blue-400",- )}- >- <MixerHorizontalIcon className="h-4 w-4" />- </Button>- </TooltipTrigger>- <TooltipContent>- {hasParameters- ? isExpanded- ? "Hide Inputs"- : "Show Inputs"- : "No Inputs"}- </TooltipContent>- </Tooltip>- </TooltipProvider>- <TooltipProvider>- <Tooltip>- <TooltipTrigger asChild>- <Button- size="icon"- variant="outline"+ variant="ghost"+ className="text-muted-foreground hover:text-foreground"onClick={(event) => {handleIconClick(event,@@ -805,7 +773,8 @@ function Workflows() {<TooltipTrigger asChild><Buttonsize="icon"- variant="outline"+ variant="ghost"+ className="text-cta hover:text-cta"onClick={(event) => {handleIconClick(event,@@ -821,7 +790,16 @@ function Workflows() {</TooltipContent></Tooltip></TooltipProvider>- <WorkflowActions workflow={workflow} />+ <WorkflowActions+ workflow={workflow}+ hasParameters={hasParameters}+ parametersExpanded={isExpanded}+ onToggleParameters={() =>+ toggleParametersExpanded(+ workflow.workflow_permanent_id,+ )+ }+ /></div></TableCell></TableRow>diff --git a/skyvern-frontend/src/routes/workflows/components/WorkflowFolderSelector.tsx b/skyvern-frontend/src/routes/workflows/components/WorkflowFolderSelector.tsxindex e9bcdeb3c..addfe3add 100644--- a/skyvern-frontend/src/routes/workflows/components/WorkflowFolderSelector.tsx+++ b/skyvern-frontend/src/routes/workflows/components/WorkflowFolderSelector.tsx@@ -62,8 +62,8 @@ function WorkflowFolderSelector({variant="ghost"size="icon"className={cn(- "h-8 w-8",- currentFolderId ? "text-blue-400" : "text-slate-400",+ "text-muted-foreground hover:text-foreground",+ currentFolderId && "text-blue-400 hover:text-blue-400",)}><FolderIcon className="h-4 w-4" />diff --git a/skyvern-frontend/src/routes/workflows/components/WorkflowsTable.tsx b/skyvern-frontend/src/routes/workflows/components/WorkflowsTable.tsxindex a3e1ba17d..039be0b78 100644--- a/skyvern-frontend/src/routes/workflows/components/WorkflowsTable.tsx+++ b/skyvern-frontend/src/routes/workflows/components/WorkflowsTable.tsx@@ -61,15 +61,11 @@ function WorkflowsTable() {return (<div className="space-y-4"><Table>- <TableHeader className="bg-slate-elevation2 text-slate-400 [&_tr]:border-b-0">+ <TableHeader className="[&_tr]:border-b-0"><TableRow className="rounded-lg px-6 [&_th:first-child]:pl-6 [&_th]:py-4">- <TableHead className="text-sm text-slate-400">Title</TableHead>- <TableHead className="text-sm text-slate-400">- Last Run Status- </TableHead>- <TableHead className="text-sm text-slate-400">- Last Run Time- </TableHead>+ <TableHead>Title</TableHead>+ <TableHead>Last Run Status</TableHead>+ <TableHead>Last Run Time</TableHead></TableRow></TableHeader><TableBody>diff --git a/skyvern-frontend/src/util/timeFormat.ts b/skyvern-frontend/src/util/timeFormat.tsindex c1fde5367..4eb0f1dbb 100644--- a/skyvern-frontend/src/util/timeFormat.ts+++ b/skyvern-frontend/src/util/timeFormat.ts@@ -31,6 +31,37 @@ function basicLocalTimeFormat(time: string): string {return `${dateString} at ${timeString}`;}+const compactDateFormat = new Intl.DateTimeFormat(undefined, {+ month: "short",+ day: "numeric",+});+const compactDateWithYearFormat = new Intl.DateTimeFormat(undefined, {+ month: "short",+ day: "numeric",+ year: "numeric",+});+const compactTimeFormat = new Intl.DateTimeFormat(undefined, {+ hour: "numeric",+ minute: "2-digit",+});++function compactLocalDateTime(time: string): string {+ time = normalizeUtcTimestamp(time);++ const date = new Date(time);+ if (isNaN(date.getTime())) {+ return "";+ }+ const sameYear = date.getFullYear() === new Date().getFullYear();++ const dateString = (+ sameYear ? compactDateFormat : compactDateWithYearFormat+ ).format(date);+ const timeString = compactTimeFormat.format(date);++ return `${dateString}, ${timeString}`;+}+function basicTimeFormat(time: string): string {const date = new Date(time);const dateString = date.toLocaleDateString("en-US", {@@ -104,6 +135,7 @@ function formatExecutionTime(export {basicLocalTimeFormat,+ compactLocalDateTime,basicTimeFormat,timeFormatWithShortDate,localTimeFormatWithShortDate,