Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

1.6 KB
Raw Blame
"use client";
import type { WorkflowGraphRun } from "@/lib/contracts/workflow-graph";
import { Badge } from "@/components/ui/badge";
import { ScrollArea } from "@/components/ui/scroll-area";
export function WorkflowRunPanel({run}:{run:WorkflowGraphRun|null}){if(!run)return <div className="p-4 text-xs text-muted-foreground">Run a workflow or select execution history to inspect node-by-node receipts.</div>;return <ScrollArea className="h-full"><div className="space-y-2 p-3"><div className="rounded-lg border p-3 text-xs"><div className="flex items-center justify-between gap-2"><div className="font-semibold">{run.graphName}</div><Badge variant="outline">{run.state}</Badge></div><div className="mt-1 text-muted-foreground">{run.trigger?.type??"manual"}{run.failedNodeName?` · failed at ${run.failedNodeName}`:""}</div></div>{run.nodes.map((node)=><details key={node.id} className="rounded-lg border p-2" open={node.state==="failed"||node.state==="running"}><summary className="cursor-pointer text-xs font-medium">{node.name} <span className="text-muted-foreground">· {node.state}{node.attempts&&node.attempts>1?` · ${node.attempts} attempts`:""}{node.durationMs!=null?` · ${node.durationMs}ms`:""}</span></summary><div className="mt-2 space-y-1 font-mono text-[10px] text-muted-foreground">{node.logs.map((log,i)=><div key={i}>{log}</div>)}{node.error&&<div className="text-destructive">{node.error}</div>}{node.output!==undefined&&<pre className="mt-2 max-h-48 overflow-auto whitespace-pre-wrap rounded bg-muted p-2">{JSON.stringify(node.output,null,2)}</pre>}</div></details>)}</div></ScrollArea>;}