|
2 | 2 | ArrowSquareOutIcon, |
3 | 3 | ChatCircleIcon, |
4 | 4 | GitBranchIcon, |
| 5 | + LinkIcon, |
5 | 6 | RobotIcon, |
6 | 7 | } from "@phosphor-icons/react"; |
7 | 8 | import { taskFeedRunStatus } from "@posthog/core/canvas/channelFeed"; |
@@ -49,6 +50,7 @@ import type { ChannelFeedSystemMessage } from "@posthog/ui/features/canvas/hooks |
49 | 50 | import { useChannelTaskData } from "@posthog/ui/features/canvas/hooks/useChannelTaskData"; |
50 | 51 | import { useTaskThread } from "@posthog/ui/features/canvas/hooks/useTaskThread"; |
51 | 52 | import { taskCardNavigation } from "@posthog/ui/features/canvas/taskCardNavigation"; |
| 53 | +import { copyChannelLink } from "@posthog/ui/features/canvas/utils/copyChannelLink"; |
52 | 54 | import { userDisplayName } from "@posthog/ui/features/canvas/utils/userDisplay"; |
53 | 55 | import { |
54 | 56 | type SidebarPrState, |
@@ -534,11 +536,19 @@ const FeedItem = memo(function FeedItem({ |
534 | 536 | task={task} |
535 | 537 | actions={ |
536 | 538 | // Replying now lives in the always-visible ReplyFooter, so the hover |
537 | | - // toolbar only carries the distinct "Open task" action. Actions anchor |
538 | | - // to the row's top-right corner; a top tooltip there overhangs the panel |
539 | | - // edge and gets clipped by the scroll container, so open tooltips toward |
540 | | - // the content instead. |
| 539 | + // toolbar only carries per-row actions (copy link, open task). Actions |
| 540 | + // anchor to the row's top-right corner; a top tooltip there overhangs |
| 541 | + // the panel edge and gets clipped by the scroll container, so open |
| 542 | + // tooltips toward the content instead. |
541 | 543 | <ThreadItemActions aria-label="Message actions" className="inset-bs-2"> |
| 544 | + <ThreadItemAction |
| 545 | + label="Copy link to task" |
| 546 | + onClick={() => |
| 547 | + void copyChannelLink(channelId, "thread_panel", task.id) |
| 548 | + } |
| 549 | + > |
| 550 | + <LinkIcon size={15} /> |
| 551 | + </ThreadItemAction> |
542 | 552 | <ThreadItemAction label="Open task" onClick={() => onOpenTask(task)}> |
543 | 553 | <ArrowSquareOutIcon size={15} /> |
544 | 554 | </ThreadItemAction> |
|
0 commit comments