import { Route } from "lucide-react";
import { Badge, StatusBadge } from "@/components/ui/badge";
import { EmptyState } from "@/components/ui/empty-state";
import { formatBytes, formatMs } from "@/lib/format";
import type { RequestAttemptView } from "@/lib/queries/dashboard";
import { HttpCode } from "./requests-table";
function outcomeStatus(outcome: string): string {
if (outcome === "success") return "success";
if (outcome === "blocked") return "blocked";
if (outcome === "timeout") return "pending";
return "failed";
}
/**
* Vertical timeline of routing attempts. `provider` is only present when the organization has
* provider visibility enabled; it is then labelled as debug output.
*/
export function AttemptsTimeline({ attempts, providerVisibility }: { attempts: RequestAttemptView[]; providerVisibility: boolean }) {
if (!attempts.length) {
return