From a5dc0724d791e5ec9c9ad1dc5c8d1bfd3cde3d4e Mon Sep 17 00:00:00 2001 From: Adam Bowker Date: Wed, 22 Jul 2026 17:57:46 -0400 Subject: [PATCH] Add share button to channel feed task messages Add a "copy link to task" share button to the hover toolbar of each task message in the channel feed, next to the existing "Open task" button. Uses the same copyChannelLink util as the share button on the task page, so the copied link is identical and routes back into the same thread. Generated-By: PostHog Code Task-Id: 0013aa5d-874c-4e54-974e-19daf1b75009 --- .../canvas/components/ChannelFeedView.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/features/canvas/components/ChannelFeedView.tsx b/packages/ui/src/features/canvas/components/ChannelFeedView.tsx index 0acad53649..026026b0a9 100644 --- a/packages/ui/src/features/canvas/components/ChannelFeedView.tsx +++ b/packages/ui/src/features/canvas/components/ChannelFeedView.tsx @@ -2,6 +2,7 @@ import { ArrowSquareOutIcon, ChatCircleIcon, GitBranchIcon, + LinkIcon, RobotIcon, } from "@phosphor-icons/react"; import { taskFeedRunStatus } from "@posthog/core/canvas/channelFeed"; @@ -49,6 +50,7 @@ import type { ChannelFeedSystemMessage } from "@posthog/ui/features/canvas/hooks import { useChannelTaskData } from "@posthog/ui/features/canvas/hooks/useChannelTaskData"; import { useTaskThread } from "@posthog/ui/features/canvas/hooks/useTaskThread"; import { taskCardNavigation } from "@posthog/ui/features/canvas/taskCardNavigation"; +import { copyChannelLink } from "@posthog/ui/features/canvas/utils/copyChannelLink"; import { userDisplayName } from "@posthog/ui/features/canvas/utils/userDisplay"; import { type SidebarPrState, @@ -534,11 +536,19 @@ const FeedItem = memo(function FeedItem({ task={task} actions={ // Replying now lives in the always-visible ReplyFooter, so the hover - // toolbar only carries the distinct "Open task" action. Actions anchor - // to the row's top-right corner; a top tooltip there overhangs the panel - // edge and gets clipped by the scroll container, so open tooltips toward - // the content instead. + // toolbar only carries per-row actions (copy link, open task). Actions + // anchor to the row's top-right corner; a top tooltip there overhangs + // the panel edge and gets clipped by the scroll container, so open + // tooltips toward the content instead. + + void copyChannelLink(channelId, "thread_panel", task.id) + } + > + + onOpenTask(task)}>