From eca4c578ca971ebf19bed4f5563fc958c8c5c59f Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 5 May 2026 12:11:52 -0500 Subject: [PATCH] Fix system notice review feedback --- ui/src/components/IssueChatThread.tsx | 7 +-- .../IssueChatThreadSystemNotice.test.tsx | 46 +++++++++++++++++-- ui/src/lib/issue-chat-messages.ts | 3 +- 3 files changed, 46 insertions(+), 10 deletions(-) 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}