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(onboarding): show mcp and slack quick start tasks only where they fit (#119857)

Rafael Audibertedc1585d12ee
diff --git a/frontend/src/generated/core/api.schemas.ts b/frontend/src/generated/core/api.schemas.ts
index e0a887b51820..bedd7ec749fd 100644
--- a/frontend/src/generated/core/api.schemas.ts
+++ b/frontend/src/generated/core/api.schemas.ts
@@ -2715,7 +2715,6 @@ export type ProjectBackwardCompatApiManagedViewsets = { [key: string]: boolean }
* * `create_early_access_feature` - create_early_access_feature
* * `update_feature_stage` - update_feature_stage
* * `use_posthog_ai` - use_posthog_ai
- * * `use_posthog_code` - use_posthog_code
* * `use_posthog_mcp` - use_posthog_mcp
* * `use_posthog_in_slack` - use_posthog_in_slack
*/
@@ -2786,7 +2785,6 @@ export const AvailableSetupTaskIdsEnumApi = {
CreateEarlyAccessFeature: 'create_early_access_feature',
UpdateFeatureStage: 'update_feature_stage',
UsePosthogAi: 'use_posthog_ai',
- UsePosthogCode: 'use_posthog_code',
UsePosthogMcp: 'use_posthog_mcp',
UsePosthogInSlack: 'use_posthog_in_slack',
} as const
diff --git a/frontend/src/lib/components/ProductSetup/ProductSetupPopover.tsx b/frontend/src/lib/components/ProductSetup/ProductSetupPopover.tsx
index 229934b0353e..e6393535615b 100644
--- a/frontend/src/lib/components/ProductSetup/ProductSetupPopover.tsx
+++ b/frontend/src/lib/components/ProductSetup/ProductSetupPopover.tsx
@@ -3,14 +3,13 @@ import { useActions, useValues } from 'kea'
import { router } from 'kea-router'
import { useEffect, useMemo, useRef, useState } from 'react'
-import { IconCheck, IconExternal, IconLock, IconSparkles, IconTarget } from '@posthog/icons'
+import { IconCheck, IconExternal, IconLock, IconTarget } from '@posthog/icons'
import { LemonButton, LemonSelect, Link } from '@posthog/lemon-ui'
import { useHogfetti } from 'lib/components/Hogfetti/Hogfetti'
import { SetupTaskId } from 'lib/components/ProductSetup'
import { Popover } from 'lib/lemon-ui/Popover'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
-import { inStorybook, inStorybookTestRunner } from 'lib/utils/dom'
import { addProductIntent } from 'lib/utils/product-intents'
import { teamLogic } from 'scenes/teamLogic'
@@ -136,9 +135,6 @@ export function ProductSetupPopover({
const exploreTasks = (tasksWithState as SetupTaskWithState[]).filter((t) => t.taskType === 'explore')
const aiTasks = (tasksWithState as SetupTaskWithState[]).filter((t) => t.taskType === 'ai')
- // Skip the rainbow animation in Storybook so visual-regression snapshots don't flake on the moving gradient.
- const aiTitleClassName = `rainbow-text${inStorybook() || inStorybookTestRunner() ? '' : ' rainbow-text-animating'}`
-
const productName = config?.title.replace('Get started with ', '') || ''
const handleTaskClick = (task: SetupTaskWithState): void => {
@@ -306,8 +302,6 @@ export function ProductSetupPopover({
onMarkComplete={handleMarkComplete}
onUnmarkComplete={handleUnmarkComplete}
onHover={handleTaskHover}
- titleClassName={aiTitleClassName}
- titleIcon={<IconSparkles className="size-3 shrink-0 text-warning" />}
/>
)}
</>
@@ -570,8 +564,6 @@ interface TaskSectionProps {
onUnmarkComplete?: (e: React.MouseEvent, taskId: SetupTaskId) => void
onHover?: (task: SetupTaskWithState | null, element?: HTMLElement) => void
actionButton?: React.ReactNode
- titleClassName?: string
- titleIcon?: React.ReactNode
}
function TaskSection({
@@ -584,18 +576,13 @@ function TaskSection({
onUnmarkComplete,
onHover,
actionButton,
- titleClassName,
- titleIcon,
}: TaskSectionProps): JSX.Element {
const completedCount = tasks.filter((t) => t.completed || t.skipped).length
return (
<div className="py-1" role="group" aria-label={`${title} (${completedCount} of ${tasks.length} complete)`}>
<div className="px-3 py-1 flex items-center justify-between">
- <span className="inline-flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider">
- {titleIcon}
- <span className={titleClassName ?? 'text-muted'}>{title}</span>
- </span>
+ <span className="text-[10px] font-bold uppercase tracking-wider text-muted">{title}</span>
{actionButton}
</div>
<div role="list">
diff --git a/frontend/src/lib/components/ProductSetup/productSetupRegistry.ts b/frontend/src/lib/components/ProductSetup/productSetupRegistry.ts
index 61a6e7b75b9f..cf5ac42cc23e 100644
--- a/frontend/src/lib/components/ProductSetup/productSetupRegistry.ts
+++ b/frontend/src/lib/components/ProductSetup/productSetupRegistry.ts
@@ -46,35 +46,29 @@ export const AI_TASKS: SetupTask[] = [
requiresManualCompletion: true,
getUrl: () => urls.ai(),
},
- {
- id: SetupTaskId.UsePosthogCode,
- title: 'Try PostHog Desktop',
- description:
- 'An AI devtool that understands your product, not just your codebase — it triages bugs and opens pull requests from your product data.',
- taskType: 'ai',
- requiresManualCompletion: true,
- docsUrl: 'https://posthog.com/desktop',
- },
- {
- id: SetupTaskId.UsePosthogMcp,
- title: 'Try PostHog MCP',
- description:
- 'Query your PostHog data in plain English from your coding agent — run funnels, check errors, and toggle flags without leaving your editor.',
- taskType: 'ai',
- requiresManualCompletion: true,
- docsUrl: 'https://posthog.com/mcp',
- },
- {
- id: SetupTaskId.UsePosthogInSlack,
- title: 'Try PostHog in Slack',
- description:
- 'Tag @PostHog in any Slack thread to ask data questions, run SQL, and draft pull requests — plus get insights and alerts delivered to your channels.',
- taskType: 'ai',
- requiresManualCompletion: true,
- getUrl: () => urls.integration('slack'),
- },
]
+/** MCP and Slack tasks - add only to products where an agent or a Slack thread is a natural way to use them */
+export const USE_POSTHOG_MCP: SetupTask = {
+ id: SetupTaskId.UsePosthogMcp,
+ title: 'Try PostHog MCP',
+ description:
+ 'Query your PostHog data in plain English from your coding agent — run funnels, check errors, and toggle flags without leaving your editor.',
+ taskType: 'ai',
+ requiresManualCompletion: true,
+ docsUrl: 'https://posthog.com/mcp',
+}
+
+export const USE_POSTHOG_IN_SLACK: SetupTask = {
+ id: SetupTaskId.UsePosthogInSlack,
+ title: 'Try PostHog in Slack',
+ description:
+ 'Tag @PostHog in any Slack thread to ask data questions, run SQL, and draft pull requests — plus get insights and alerts delivered to your channels.',
+ taskType: 'ai',
+ requiresManualCompletion: true,
+ getUrl: () => urls.integration('slack'),
+}
+
// ============================================================================
// Product Setup Registry
// ============================================================================
@@ -186,6 +180,8 @@ export const PRODUCT_SETUP_REGISTRY: Partial<Record<ProductKey, ProductSetupConf
getUrl: () => urls.cohorts(),
targetSelector: '[data-attr="new-cohort"]',
},
+ USE_POSTHOG_MCP,
+ USE_POSTHOG_IN_SLACK,
],
},
@@ -245,6 +241,7 @@ export const PRODUCT_SETUP_REGISTRY: Partial<Record<ProductKey, ProductSetupConf
taskType: 'explore',
getUrl: () => urls.webAnalyticsWebVitals(),
},
+ USE_POSTHOG_IN_SLACK,
],
},
@@ -358,6 +355,7 @@ export const PRODUCT_SETUP_REGISTRY: Partial<Record<ProductKey, ProductSetupConf
docsUrl:
'https://posthog.com/docs/feature-flags/creating-feature-flags#step-5-configure-evaluation-runtime-and-contexts-optional',
},
+ USE_POSTHOG_MCP,
],
},
@@ -400,6 +398,7 @@ export const PRODUCT_SETUP_REGISTRY: Partial<Record<ProductKey, ProductSetupConf
taskType: 'explore',
dependsOn: [SetupTaskId.LaunchExperiment],
},
+ USE_POSTHOG_MCP,
],
},
@@ -517,6 +516,7 @@ export const PRODUCT_SETUP_REGISTRY: Partial<Record<ProductKey, ProductSetupConf
getUrl: () => urls.errorTracking(),
targetSelector: '[data-attr="error-tracking-resolve"]', // Will be highlighted once they click on an error
},
+ USE_POSTHOG_MCP,
],
},
@@ -710,7 +710,7 @@ export function getProductSetupConfig(productKey: ProductKey): ProductSetupConfi
return PRODUCT_SETUP_REGISTRY[productKey] ?? null
}
-/** Get all tasks for a product, optionally filtered by type. AI tasks are appended to every product. */
+/** Get all tasks for a product, optionally filtered by type. AI_TASKS are appended to every product, ahead of the product's own AI tasks. */
export function getTasksForProduct(
productKey: ProductKey,
taskType?: 'setup' | 'onboarding' | 'explore' | 'ai' | 'all'
@@ -720,7 +720,11 @@ export function getTasksForProduct(
return []
}
- const tasks = [...config.tasks, ...AI_TASKS]
+ const tasks = [
+ ...config.tasks.filter((t) => t.taskType !== 'ai'),
+ ...AI_TASKS,
+ ...config.tasks.filter((t) => t.taskType === 'ai'),
+ ]
if (!taskType || taskType === 'all') {
return tasks
}
diff --git a/frontend/src/lib/components/ProductSetup/types.ts b/frontend/src/lib/components/ProductSetup/types.ts
index ecfc42f82f14..d42860ebd4b7 100644
--- a/frontend/src/lib/components/ProductSetup/types.ts
+++ b/frontend/src/lib/components/ProductSetup/types.ts
@@ -13,8 +13,8 @@ export type SetupTaskId = AvailableSetupTaskIdsEnumApi
* Examples: Create first insight, watch first recording, create first survey
* - explore: Advanced/optional features to try after getting started
* Examples: Create funnel, set up cohorts, create multivariate flag
- * - ai: PostHog's AI surfaces, shown for every product
- * Examples: PostHog AI, PostHog Desktop, PostHog MCP, PostHog in Slack
+ * - ai: PostHog's AI surfaces. PostHog AI shows for every product;
+ * PostHog MCP and PostHog in Slack show only for the products that list them
*/
export type TaskType = 'setup' | 'onboarding' | 'explore' | 'ai'
diff --git a/posthog/models/team/setup_tasks.py b/posthog/models/team/setup_tasks.py
index df61551494ba..4813dc3a1262 100644
--- a/posthog/models/team/setup_tasks.py
+++ b/posthog/models/team/setup_tasks.py
@@ -92,8 +92,7 @@ class SetupTaskId(StrEnum):
CreateEarlyAccessFeature = "create_early_access_feature"
UpdateFeatureStage = "update_feature_stage"
- # AI (shown for every product)
+ # AI. The quick start lists PostHog AI for every product and MCP and Slack for some.
UsePostHogAi = "use_posthog_ai"
- UsePostHogCode = "use_posthog_code"
UsePostHogMcp = "use_posthog_mcp"
UsePostHogInSlack = "use_posthog_in_slack"
diff --git a/products/desktop/packages/api-client/src/generated.ts b/products/desktop/packages/api-client/src/generated.ts
index f98598528f66..9ebac0ac4c5d 100644
--- a/products/desktop/packages/api-client/src/generated.ts
+++ b/products/desktop/packages/api-client/src/generated.ts
@@ -4521,7 +4521,6 @@ export namespace Schemas {
* * `create_early_access_feature` - create_early_access_feature
* * `update_feature_stage` - update_feature_stage
* * `use_posthog_ai` - use_posthog_ai
- * * `use_posthog_code` - use_posthog_code
* * `use_posthog_mcp` - use_posthog_mcp
* * `use_posthog_in_slack` - use_posthog_in_slack
*/
@@ -4589,7 +4588,6 @@ export namespace Schemas {
| "create_early_access_feature"
| "update_feature_stage"
| "use_posthog_ai"
- | "use_posthog_code"
| "use_posthog_mcp"
| "use_posthog_in_slack";
export type BIAggregation =
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 471720f87f93..642cf6066b4c 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -14973,7 +14973,6 @@ export namespace Schemas {
* * `create_early_access_feature` - create_early_access_feature
* * `update_feature_stage` - update_feature_stage
* * `use_posthog_ai` - use_posthog_ai
- * * `use_posthog_code` - use_posthog_code
* * `use_posthog_mcp` - use_posthog_mcp
* * `use_posthog_in_slack` - use_posthog_in_slack
*/
@@ -15044,7 +15043,6 @@ export namespace Schemas {
CreateEarlyAccessFeature: 'create_early_access_feature',
UpdateFeatureStage: 'update_feature_stage',
UsePosthogAi: 'use_posthog_ai',
- UsePosthogCode: 'use_posthog_code',
UsePosthogMcp: 'use_posthog_mcp',
UsePosthogInSlack: 'use_posthog_in_slack',
} as const;