: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(desktop): show filing menu for owned canvases (#88797)
Peter Kirkham2ee16788039b
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.test.tsxindex 606610b95571..579c3eb2b8b3 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.test.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.test.tsx@@ -20,6 +20,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";const mocks = vi.hoisted(() => ({status: null as TaskStatusInput | null,currentUserId: 999 as number | undefined,+ currentUserUuid: "u-1" as string | undefined,analysis: {canAnalyze: false,isPending: false,@@ -27,7 +28,9 @@ const mocks = vi.hoisted(() => ({},}));vi.mock("@posthog/ui/features/auth/useCurrentUser", () => ({- useCurrentUser: () => ({ data: { id: mocks.currentUserId } }),+ useCurrentUser: () => ({+ data: { id: mocks.currentUserId, uuid: mocks.currentUserUuid },+ }),}));vi.mock("@posthog/ui/features/canvas/hooks/useChannelTaskStatus", () => ({useChannelTaskStatus: () => mocks.status,@@ -519,7 +522,7 @@ describe("ChannelItemRow", () => {kind: "canvas",id: "c1",title: "Web analytics overview",- authorUser: { id: 999, uuid: "u-1", email: "[email protected]" },+ authorUuid: "u-1",});renderInList(<ChannelItemRow@@ -549,7 +552,7 @@ describe("ChannelItemRow", () => {kind: "canvas",id: "c1",title: "Web analytics overview",- authorUser: { id: 7, uuid: "u-2", email: "[email protected]" },+ authorUuid: "u-2",});renderInList(<ChannelItemRow actions={actions} isActive={false} item={canvas} />,diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.tsxindex ee7651c39951..8ed1f5109253 100644--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.tsx+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelItemRow.tsx@@ -304,8 +304,8 @@ export function ChannelItemRow({currentUser.data?.id === item.authorUser.id;const canFileCanvas =item.kind === "canvas" &&- item.authorUser?.id != null &&- currentUser.data?.id === item.authorUser.id;+ item.authorUuid != null &&+ currentUser.data?.uuid === item.authorUuid;const handleDragStart = useCallback((event: DragEvent) => {if (item.kind === "canvas") {@@ -363,7 +363,7 @@ export function ChannelItemRow({onArchive: () => actions.archive(item),...(canHandoff ? { onHandoff: () => setHandoffOpen(true) } : {}),},- // canHandoff rides on the currentUser query, so it belongs in deps for a+ // Ownership rides on the currentUser query, so these belong in deps for a// sign-in refresh to re-evaluate.[item,