Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/code/src/renderer/api/posthogClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export interface SignalSourceConfig {
| "github"
| "linear"
| "zendesk"
| "conversations"
| "error_tracking";
source_type:
| "session_analysis_cluster"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
ArrowSquareOutIcon,
BrainIcon,
BugIcon,
ChatsIcon,
CircleNotchIcon,
GithubLogoIcon,
KanbanIcon,
Expand Down Expand Up @@ -31,6 +32,7 @@ export interface SignalSourceValues {
github: boolean;
linear: boolean;
zendesk: boolean;
conversations: boolean;
}

interface SignalSourceToggleCardProps {
Expand Down Expand Up @@ -315,6 +317,10 @@ export function SignalSourceToggles({
(checked: boolean) => onToggle("zendesk", checked),
[onToggle],
);
const toggleConversations = useCallback(
(checked: boolean) => onToggle("conversations", checked),
[onToggle],
);
const setupGithub = useCallback(() => onSetup?.("github"), [onSetup]);
const setupLinear = useCallback(() => onSetup?.("linear"), [onSetup]);
const setupZendesk = useCallback(() => onSetup?.("zendesk"), [onSetup]);
Expand All @@ -329,6 +335,14 @@ export function SignalSourceToggles({
onCheckedChange={toggleErrorTracking}
disabled={disabled}
/>
<SignalSourceToggleCard
icon={<ChatsIcon size={20} />}
label="PostHog Conversations"
description="Turn support conversations into signals for the inbox"
checked={value.conversations}
onCheckedChange={toggleConversations}
disabled={disabled}
/>
<SignalSourceToggleCard
icon={<VideoIcon size={20} />}
label="PostHog Session Replay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const SOURCE_TYPE_MAP: Record<
github: "issue",
linear: "issue",
zendesk: "ticket",
conversations: "ticket",
};

const ERROR_TRACKING_SOURCE_TYPES: SourceType[] = [
Expand All @@ -38,6 +39,7 @@ const SOURCE_LABELS: Record<keyof SignalSourceValues, string> = {
github: "GitHub Issues",
linear: "Linear Issues",
zendesk: "Zendesk Tickets",
conversations: "PostHog Conversations",
};

const DATA_WAREHOUSE_SOURCES: Record<
Expand All @@ -55,6 +57,7 @@ const ALL_SOURCE_PRODUCTS: (keyof SignalSourceValues)[] = [
"github",
"linear",
"zendesk",
"conversations",
];

function computeValues(
Expand All @@ -66,6 +69,7 @@ function computeValues(
github: false,
linear: false,
zendesk: false,
conversations: false,
};
if (!configs?.length) return result;
for (const product of ALL_SOURCE_PRODUCTS) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ export function useTutorialTour() {
zendesk:
configs?.some((c) => c.source_product === "zendesk" && c.enabled) ??
false,
conversations:
configs?.some(
(c) => c.source_product === "conversations" && c.enabled,
) ?? false,
error_tracking:
configs?.some(
(c) => c.source_product === "error_tracking" && c.enabled,
Expand Down
Loading