Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ui/src/components/IssueWorkspaceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ function BreakablePath({ text }: { text: string }) {
function CopyableInline({ value, label, mono }: { value: string; label?: string; mono?: boolean }) {
const [copied, setCopied] = useState(false);
const timerRef = useRef<ReturnType<typeof setTimeout>>(undefined);

useEffect(() => () => clearTimeout(timerRef.current), []);

const handleCopy = useCallback(async () => {
try {
await navigator.clipboard.writeText(value);
Expand All @@ -81,6 +84,7 @@ function CopyableInline({ value, label, mono }: { value: string; label?: string;
className="shrink-0 p-0.5 rounded hover:bg-accent/50 transition-colors text-muted-foreground hover:text-foreground opacity-0 group-hover/copy:opacity-100 focus:opacity-100"
onClick={handleCopy}
title={copied ? "Copied!" : "Copy"}
aria-label={copied ? "Copied to clipboard" : `Copy ${label ?? "value"}`}
>
{copied ? <Check className="h-3 w-3 text-green-500" /> : <Copy className="h-3 w-3" />}
</button>
Expand Down
Loading