Skip to content

fix: Sidebar: Copy Payload - tooltip is wrong#3460

Open
cursor[bot] wants to merge 2 commits intomainfrom
cursor/sidebar-copy-payload-tooltip-82f5
Open

fix: Sidebar: Copy Payload - tooltip is wrong#3460
cursor[bot] wants to merge 2 commits intomainfrom
cursor/sidebar-copy-payload-tooltip-82f5

Conversation

@cursor
Copy link
Contributor

@cursor cursor bot commented Mar 14, 2026

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.tsx remains unchanged, as that correctly copies a link.

Closes #1285

Open in Web Open in Cursor 

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
@superplanehq-integration
Copy link

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

@forestileao
Copy link
Collaborator

@cursoragent If this button is the same for all, with same style too. Please put this in a separate component

@cursor
Copy link
Contributor Author

cursor bot commented Mar 16, 2026

Done. Here's a summary of the changes made in response to the review feedback:

  • Created a new CopyPayloadButton component (web_src/src/ui/componentSidebar/CopyPayloadButton.tsx) that encapsulates the copy-to-clipboard logic, the "Copied!" tooltip feedback with timeout, and the button rendering. It supports two variants: icon (icon-only, default) and labeled (icon + "Copy" text), with configurable iconSize and className props.

  • Replaced all 4 duplicated instances across SidebarEventItem.tsx (2 instances) and ChainItem.tsx (2 instances) with the new shared component. Cleaned up the now-unused payloadCopied state, copyPayloadToClipboard callback, and in ChainItem also copyToClipboard and the useCallback import.

  • TypeScript compilation and Vite build both pass cleanly. Changes are committed and pushed to the PR branch.

Open in Web Open in Cursor 

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.
@shiroyasha shiroyasha requested review from AleksandarCole and forestileao and removed request for AleksandarCole March 17, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar: Copy Payload - tooltip is wrong

2 participants