Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(desktop): add a canvas copy link button (#96236)

Peter Kirkham2cbbb8b50294
diff --git a/products/desktop/docs/DEEP-LINKS.md b/products/desktop/docs/DEEP-LINKS.md
index 5a2d6e87ff1a..3721e6b3808b 100644
--- a/products/desktop/docs/DEEP-LINKS.md
+++ b/products/desktop/docs/DEEP-LINKS.md
@@ -152,6 +152,10 @@ that resolves to a web interstitial in PostHog Cloud, which fires this scheme
(or offers the desktop-app download). That way the link works for anyone,
whether or not they have the app.
+Use the link button in the canvas toolbar to copy this link without opening a
+menu. The button has a "Copy link to canvas" tooltip, like the session link
+button. "Copy link" also remains in the canvas options menu.
+
| Segment | Required | Description |
|---|---|---|
| `<channelId>` | Yes | Channel (folder) row id the canvas lives under. |
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ShellLayout.tsx b/products/desktop/packages/ui/src/features/canvas/components/ShellLayout.tsx
index 553c9d0c0f2e..b4fd1dafeb0b 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ShellLayout.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ShellLayout.tsx
@@ -22,6 +22,9 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
} from "@posthog/quill";
import { ANALYTICS_EVENTS } from "@posthog/shared/analytics-events";
import { ChannelBreadcrumb } from "@posthog/ui/features/canvas/components/ChannelBreadcrumb";
@@ -170,7 +173,23 @@ function FreeformEditControls({
};
return (
- <Flex align="center" gap="2" className="no-drag">
+ <div className="no-drag flex items-center gap-2">
+ <Tooltip>
+ <TooltipTrigger
+ render={
+ <Button
+ size="icon-sm"
+ aria-label="Copy link to canvas"
+ onClick={() =>
+ void copyCanvasLink(channelId, dashboardId, "canvas")
+ }
+ >
+ <LinkIcon size={14} />
+ </Button>
+ }
+ />
+ <TooltipContent side="bottom">Copy link to canvas</TooltipContent>
+ </Tooltip>
{editing && (
// Autosave status — a non-interactive button showing a spinner while a
// context save is in flight, "Saved" otherwise.
@@ -275,7 +294,7 @@ function FreeformEditControls({
)}
{editing ? "Done" : "Edit"}
</Button>
- </Flex>
+ </div>
);
}