Skip to content

Commit 50f3931

Browse files
replicas-connector[bot]H2Shamiclaude
committed
feat: add copy path button to session trace rows
Adds a copy-to-clipboard button for the trace path in the session timeline table. The button appears on row hover in the path column and copies the complete trace path (e.g. /agent/step1/llm_call). Co-Authored-By: Hammad Shami <H2Shami@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 33d945e commit 50f3931

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

web/components/templates/sessions/sessionId/Timeline/SessionTimelineTable.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ import {
2525
Row,
2626
useReactTable,
2727
} from "@tanstack/react-table";
28-
import { ChevronDown, ChevronRight, ChevronsUpDown } from "lucide-react";
28+
import { ChevronDown, ChevronRight, ChevronsUpDown, CopyIcon } from "lucide-react";
2929
import Link from "next/link";
30+
import useNotification from "@/components/shared/notification/useNotification";
3031
import React, { useEffect, useMemo } from "react";
3132
import { TimeInterval } from "../../../../../lib/timeCalculations/time";
3233
import { Result } from "@/packages/common/result";
@@ -210,6 +211,7 @@ export default function SessionTimelineTable(
210211
};
211212

212213
const { getColor } = useColorMapStore();
214+
const { setNotification } = useNotification();
213215

214216
return (
215217
<ScrollArea className="sentry-mask-me h-full w-full" orientation="both">
@@ -511,6 +513,27 @@ export default function SessionTimelineTable(
511513
className="ml-2 h-2 w-2 shrink-0 rounded-full bg-red-600"
512514
/>
513515
)}
516+
{cell.column.id === "path" &&
517+
row.original.completePath && (
518+
<Button
519+
variant="ghost"
520+
size="icon"
521+
className="ml-auto h-6 w-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100"
522+
onClick={(e) => {
523+
e.stopPropagation();
524+
navigator.clipboard.writeText(
525+
row.original.completePath,
526+
);
527+
setNotification(
528+
"Path copied to clipboard",
529+
"success",
530+
);
531+
}}
532+
title="Copy path"
533+
>
534+
<CopyIcon className="h-3 w-3" />
535+
</Button>
536+
)}
514537
</div>
515538
</td>
516539
);

0 commit comments

Comments
 (0)