import { Link } from "react-router-dom";
import { Activity, Brain, GitBranch } from "lucide-react";
export default function StepList({ runId, steps = [], n_steps, activeStep, onSelect, status, progress }) {
const placeholder = Array.from({ length: n_steps || 3 });
const rows = steps.length
? steps
: placeholder.map((_, i) => ({ step_n: i + 1, _placeholder: true }));
return (
trajectory
{steps.length}/{n_steps} steps
{rows.map((s) => {
const isActive = activeStep === s.step_n;
const done = !s._placeholder;
return (
- onSelect && onSelect(s.step_n)}
data-testid={`step-list-row-${s.step_n}`}
>
s{s.step_n}
{done ? s.output : "…"}
{done && (
risk{" "}
{s.hallucination.composite.toFixed(2)}
{" "}
{s.tool_called || "—"}
{runId && (
e.stopPropagation()}
data-testid={`step-list-detail-${s.step_n}`}
>
detail →
)}
)}
);
})}
);
}