diff --git a/ui/src/components/IssueChatThread.tsx b/ui/src/components/IssueChatThread.tsx index 620f5d479fc..843f8e59376 100644 --- a/ui/src/components/IssueChatThread.tsx +++ b/ui/src/components/IssueChatThread.tsx @@ -1983,6 +1983,7 @@ function SystemNoticeCommentRow({ .map((p) => p.text) .join("\n\n"); const [copied, setCopied] = useState(false); + const [copiedLink, setCopiedLink] = useState(false); const source = (() => { const runAgentName = runAgentId ? agentMap?.get(runAgentId)?.name ?? null : null; @@ -2022,8 +2023,8 @@ function SystemNoticeCommentRow({ if (!anchorId || typeof window === "undefined") return; const url = `${window.location.origin}${window.location.pathname}#${anchorId}`; void navigator.clipboard.writeText(url).then(() => { - setCopied(true); - setTimeout(() => setCopied(false), 2000); + setCopiedLink(true); + setTimeout(() => setCopiedLink(false), 2000); }); }; @@ -2053,7 +2054,7 @@ function SystemNoticeCommentRow({ aria-label="Copy link to system notice" onClick={handleCopyLink} > - + {copiedLink ? : } ) : null}