diff --git a/replay-ui/src/routes/RunDetail.tsx b/replay-ui/src/routes/RunDetail.tsx index 4028ee8..8063816 100644 --- a/replay-ui/src/routes/RunDetail.tsx +++ b/replay-ui/src/routes/RunDetail.tsx @@ -15,6 +15,11 @@ import { useStep } from "../hooks/useStep"; import { useKeyboardNav } from "../hooks/useKeyboardNav"; import { useTheme } from "../hooks/useTheme"; +function basename(specPath: string): string { + const index = specPath.lastIndexOf("/"); + return index >= 0 ? specPath.slice(index + 1) : specPath; +} + interface RunHistory { names: string[]; lanes: PropertyLane[]; @@ -242,7 +247,7 @@ export default function RunDetail() { runs {run.id} - {run.spec_path} seed={run.seed} + {basename(run.spec_path)} seed={run.seed} step {stepIndex} / {stepCount ?? 0} diff --git a/replay-ui/src/routes/RunList.tsx b/replay-ui/src/routes/RunList.tsx index 4b7e2d7..57f5670 100644 --- a/replay-ui/src/routes/RunList.tsx +++ b/replay-ui/src/routes/RunList.tsx @@ -28,6 +28,11 @@ function formatStartedAt(value: string): string { return date.toLocaleString(); } +function basename(specPath: string): string { + const index = specPath.lastIndexOf("/"); + return index >= 0 ? specPath.slice(index + 1) : specPath; +} + export default function RunList() { const [runs, setRuns] = useState(null); const [error, setError] = useState(null); @@ -76,7 +81,7 @@ export default function RunList() { {formatStartedAt(run.started_at)} - {run.spec_path} + {basename(run.spec_path)} {run.seed} {run.platform} {formatDuration(run.duration_millis)}