fix: Sidebar: Copy Payload - tooltip is wrong#3460
Conversation
The tooltip on Copy Payload buttons in the sidebar and chain item incorrectly said 'Copy Link' instead of 'Copy'. Fixed in: - SidebarEventItem payload tab copy button - SidebarEventItem payload modal copy button - ChainItem payload tab copy button The actual 'Copy Link' tooltip for copying execution links remains unchanged. Closes #1285
|
👋 Commands for maintainers:
|
|
@cursoragent If this button is the same for all, with same style too. Please put this in a separate component |
|
Done. Here's a summary of the changes made in response to the review feedback:
|
Extract the repeated copy-payload button pattern into a reusable CopyPayloadButton component in componentSidebar/CopyPayloadButton.tsx. The component: - Manages its own copied/timeout state internally - Supports 'icon' (default) and 'labeled' variants - Accepts payload, iconSize, and className props Replaces duplicated button+tooltip+state code in: - SidebarEventItem.tsx (payload tab + payload modal) - ChainItem.tsx (payload tab + payload modal) Removes now-unused payloadCopied state and copyPayloadToClipboard callbacks from both files.


Summary
Fixes the incorrect "Copy Link" tooltip on Copy Payload buttons. The tooltip now correctly shows "Copy" instead of "Copy Link" when hovering over the copy-payload button.
Changes
SidebarEventItem.tsx: Changed tooltip from "Copy Link" to "Copy" on the payload tab copy button and the payload modal copy button.ChainItem.tsx: Changed tooltip from "Copy Link" to "Copy" on the payload tab copy button.The actual "Copy Link" tooltip on the execution link copy button in
SidebarEventItem.tsxremains unchanged, as that correctly copies a link.Closes #1285