: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
chore(frontend): update stale source paths in sync comments (#115082)
Paul D'Ambraf0f8ac62ed92
diff --git a/common/replay-shared/src/segmenter.ts b/common/replay-shared/src/segmenter.tsindex 5f185f1ed517..6284ce0422eb 100644--- a/common/replay-shared/src/segmenter.ts+++ b/common/replay-shared/src/segmenter.ts@@ -2,7 +2,7 @@ import { EventType, IncrementalSource, eventWithTime } from 'posthog-js/rrweb-tyimport { RecordingSegment, RecordingSnapshot } from './types'-// nodejs/src/session-recording/segmentation.ts has a cut-down version of this+// nodejs/src/ingestion/pipelines/sessionreplay/segmentation.ts has a cut-down version of this// for computing activeMilliseconds during ingestion. It intentionally differs:// no window tracking, no gap filling, different isActiveEvent rules.diff --git a/frontend/src/lib/components/AgentObjectTags/rewriteAgentObjectTags.ts b/frontend/src/lib/components/AgentObjectTags/rewriteAgentObjectTags.tsindex 86e8a7fd09b2..c0ffffb6b1c6 100644--- a/frontend/src/lib/components/AgentObjectTags/rewriteAgentObjectTags.ts+++ b/frontend/src/lib/components/AgentObjectTags/rewriteAgentObjectTags.ts@@ -11,7 +11,7 @@** The kind registry is generated from `posthog/object_tags/kinds.py`, and the* transform mirrors the Slack renderer- * (`products/tasks/backend/temporal/slack_relay/object_tags.py`) minus its+ * (`posthog/object_tags/slack.py`) minus its* Slack-specific escaping, so a reply reads the same on both surfaces. Tags* inside fenced code blocks and inline code spans stay literal. A trailing* tag or fence that is still streaming in is held back from the rendereddiff --git a/frontend/src/lib/utils/botDetection.ts b/frontend/src/lib/utils/botDetection.tsindex 1d5facbb91f8..f04424c3f6ed 100644--- a/frontend/src/lib/utils/botDetection.ts+++ b/frontend/src/lib/utils/botDetection.ts@@ -1,10 +1,10 @@/**- * Client-side bot detection — mirrors `posthog.hogql_queries.web_analytics.bot_definitions`+ * Client-side bot detection — mirrors `products.web_analytics.backend.hogql_queries.bot_definitions`* and the `getBotName` / `isLikelyBot` / `getTrafficCategory`* HogQL functions. Used by real-time dashboards where events arrive via the* livestream SSE feed and therefore cannot be classified server-side.*- * Keep this file in sync with `posthog/hogql_queries/web_analytics/bot_definitions.py`.+ * Keep this file in sync with `products/web_analytics/backend/hogql_queries/bot_definitions.py`.*/export type BotTrafficType = 'AI Agent' | 'Bot' | 'Automation' | 'Regular'diff --git a/frontend/src/lib/utils/elements-chain.ts b/frontend/src/lib/utils/elements-chain.tsindex fc354b1206e1..278f41c26a91 100644--- a/frontend/src/lib/utils/elements-chain.ts+++ b/frontend/src/lib/utils/elements-chain.ts@@ -1,6 +1,6 @@import { ElementType } from '~/types'-// NOTE: This function should not be edited directly but rather copied from nodejs/src/utils/db/elements-chain.ts+// NOTE: This function should not be edited directly but rather copied from nodejs/src/common/utils/elements-chain.tsexport function chainToElements(chain: string, options: { throwOnError?: boolean } = {}): ElementType[] {const elements: ElementType[] = []diff --git a/frontend/src/lib/utils/liquid.ts b/frontend/src/lib/utils/liquid.tsindex 984ed5ce8430..95323b0674e0 100644--- a/frontend/src/lib/utils/liquid.ts+++ b/frontend/src/lib/utils/liquid.ts@@ -3,7 +3,7 @@ import { Liquid, Output, Template } from 'liquidjs'const LIQUID_REGEX = /\{\{(.*?)\}\}|{%(.*?)%}/g-// NOTE: This should be moved to common package but currently is a copy of plugin-server/src/cdp/utils/liquid.ts+// NOTE: This should be moved to common package but currently is a copy of nodejs/src/cdp/utils/liquid.tsexport class LiquidRenderer {private static _liquid: Liquid | null = nulldiff --git a/frontend/src/scenes/data-pipelines/legacy-plugins/PipelineNodeMetrics.tsx b/frontend/src/scenes/data-pipelines/legacy-plugins/PipelineNodeMetrics.tsxindex 03ff7d188c54..1267da7f9ec0 100644--- a/frontend/src/scenes/data-pipelines/legacy-plugins/PipelineNodeMetrics.tsx+++ b/frontend/src/scenes/data-pipelines/legacy-plugins/PipelineNodeMetrics.tsx@@ -7,7 +7,7 @@ import { AppMetricsTrends } from 'lib/components/AppMetrics/AppMetricsTrends'import { AppMetricSummary } from 'lib/components/AppMetrics/AppMetricSummary'// app_source value the Node.js legacy-plugin producer writes into clickhouse_app_metrics2.-// Keep in sync with nodejs/src/cdp/legacy-plugins/app-metrics.ts.+// Keep in sync with nodejs/src/cdp/consumers/cdp-legacy-event.consumer.ts.const LEGACY_PLUGIN_APP_SOURCE = 'legacy_plugin'const LEGACY_PLUGIN_METRIC_KEYS = ['succeeded', 'succeeded_on_retry', 'failed'] as constdiff --git a/frontend/src/scenes/data-pipelines/legacy-plugins/configUtils.ts b/frontend/src/scenes/data-pipelines/legacy-plugins/configUtils.tsindex f890e5d6bbe1..8e7bc07e98ac 100644--- a/frontend/src/scenes/data-pipelines/legacy-plugins/configUtils.ts+++ b/frontend/src/scenes/data-pipelines/legacy-plugins/configUtils.ts@@ -1,7 +1,7 @@import { PluginConfigChoice, PluginConfigSchema } from '~/legacy-plugin-scaffold'import { PluginType } from '~/types'-// Keep this in sync with: posthog/api/plugin.py+// Keep this in sync with: products/cdp/backend/api/plugin.pyexport const SECRET_FIELD_VALUE = '**************** POSTHOG SECRET FIELD ****************'export function getConfigSchemaArray(diff --git a/frontend/src/scenes/experiments/utils.ts b/frontend/src/scenes/experiments/utils.tsindex 63b16b133f87..13abe6e3b9af 100644--- a/frontend/src/scenes/experiments/utils.ts+++ b/frontend/src/scenes/experiments/utils.ts@@ -75,7 +75,7 @@ export function filterLowMultipleVariant<T extends { variant: string; percentage/*** Resolves the effective multi-variant handling, applying the backend default when unset.- * See posthog/hogql_queries/experiments/exposure_query_logic.py (default = `EXCLUDE`).+ * See products/experiments/backend/hogql_queries/exposure_query_logic.py (default = `EXCLUDE`).*/export function resolveMultipleVariantHandling(handling: 'exclude' | 'first_seen' | undefineddiff --git a/frontend/src/scenes/web-analytics/common.ts b/frontend/src/scenes/web-analytics/common.tsindex 0e42bab99671..62e05328c437 100644--- a/frontend/src/scenes/web-analytics/common.ts+++ b/frontend/src/scenes/web-analytics/common.ts@@ -22,9 +22,9 @@ import {import { hogql } from '~/queries/utils'import { InsightLogicProps, PropertyFilterType, PropertyMathType, PropertyOperator } from '~/types'-/** Matches BREAKDOWN_NULL_DISPLAY in posthog/hogql_queries/web_analytics/stats_table.py */+/** Matches BREAKDOWN_NULL_DISPLAY in products/web_analytics/backend/hogql_queries/stats_table.py */export const BREAKDOWN_NULL_DISPLAY = '(none)'-/** Matches BREAKDOWN_REFERRER_PREFIX in posthog/hogql_queries/web_analytics/stats_table.py */+/** Matches BREAKDOWN_REFERRER_PREFIX in products/web_analytics/backend/hogql_queries/stats_table.py */export const BREAKDOWN_REFERRER_PREFIX = 'referrer:'export interface WebTileLayout {diff --git a/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/logic/setupPlanLogic.ts b/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/logic/setupPlanLogic.tsindex 36f7732d6f5d..4ddd8b2b63b3 100644--- a/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/logic/setupPlanLogic.ts+++ b/frontend/src/scenes/web-analytics/tabs/marketing-analytics/frontend/logic/setupPlanLogic.ts@@ -42,7 +42,7 @@ export type Capability = 'cost' | 'attribution' | 'roas' | 'cac'/** Recorded server-side against the change, so it must describe the real origin. */export type ApplySource = 'setup_tab' | 'apply_all_safe'-/** Mirrors the `ApplyOp` union in `services/setup_types.py`. Passed back to+/** Mirrors the `ApplyOp` union in `products/marketing_analytics/backend/services/setup_types.py`. Passed back to* apply_setup_ops verbatim — never construct one client-side. */export interface ApplyOp {op: stringdiff --git a/frontend/src/types.ts b/frontend/src/types.tsindex ca46e11c3c63..873cb6a0ada6 100644--- a/frontend/src/types.ts+++ b/frontend/src/types.ts@@ -1891,7 +1891,7 @@ export interface CohortGroupType {name?: string}-// Synced with `posthog/models/property.py`+// Synced with `posthog/models/property/property.py`export interface CohortCriteriaType {id: string // Criteria filter idkey: string@@ -4756,7 +4756,7 @@ export enum ScheduledChangeOperationType {UpdateVariants = 'update_variants',}-// Keep in sync with posthog/models/scheduled_change.py RecurrenceInterval+// Keep in sync with products/feature_flags/backend/models/scheduled_change.py RecurrenceIntervalexport enum RecurrenceInterval {Daily = 'daily',Weekly = 'weekly',@@ -5769,7 +5769,7 @@ export type IntegrationKind = (typeof INTEGRATION_KINDS)[number]// Canonical bot scopes PostHog requests during the Slack OAuth install flow. Single source of// truth for both the frontend (app-manifest snippet + IntegrationView scope-mismatch banner)-// and the backend (`POSTHOG_SLACK_SCOPE` in posthog/models/integration.py, via posthog/schema.py).+// and the backend (`POSTHOG_SLACK_SCOPE` in posthog/models/integration/oauth.py, via posthog/schema.py).// Widening this list will surface the "Required scopes are missing" banner for any workspace// authorized before the change.//@@ -5808,7 +5808,7 @@ export const SLACK_INTEGRATION_SCOPES = Object.values(SlackIntegrationScope)// Nothing is pending Slack app-directory review right now, so there is no in-review list.// To stage a scope that Slack hasn't approved yet, reintroduce a `SlackIntegrationScopeInReview`// enum here holding only the pending entries, re-export it from schema-general.ts, and have-// `POSTHOG_SLACK_SCOPE` (posthog/models/integration.py) and `useSlackRequiredScopes` append it on+// `POSTHOG_SLACK_SCOPE` (posthog/models/integration/oauth.py) and `useSlackRequiredScopes` append it on// DEV/local only — requesting an unapproved scope anywhere else fails with `invalid_scope`.// The enum cannot be left empty between rounds: JSON Schema rejects a zero-length `enum`, so// `hogli build:schema` fails on it.diff --git a/products/data_warehouse/frontend/scenes/DataOpsScene/tabs/warehouseProvisioningLogic.ts b/products/data_warehouse/frontend/scenes/DataOpsScene/tabs/warehouseProvisioningLogic.tsindex 182a5be3cf3a..a5e5b3d0f1ad 100644--- a/products/data_warehouse/frontend/scenes/DataOpsScene/tabs/warehouseProvisioningLogic.ts+++ b/products/data_warehouse/frontend/scenes/DataOpsScene/tabs/warehouseProvisioningLogic.ts@@ -26,12 +26,12 @@ import type { WarehouseStatusResponseApi } from 'products/data_warehouse/frontenimport type { WarehouseStatusResponseStateEnumApi } from '../../../generated/api.schemas'// The warehouse name becomes the connection's SNI subdomain (a DNS-1123 label), so it-// mirrors the backend validator in products/data_warehouse/backend/api/managed_warehouse.py:+// mirrors the backend validator in products/managed_warehouse/backend/presentation/views.py:// 3-63 chars, lowercase alphanumerics and hyphens, starting/ending alphanumeric (no underscores).const WAREHOUSE_NAME_REGEX = /^[a-z][a-z0-9-]{1,61}[a-z0-9]$/// DNS zone the connection host lives under, selected by deployment region. Mirrors-// _MANAGED_WAREHOUSE_DOMAINS in products/data_warehouse/backend/api/managed_warehouse.py.+// _MANAGED_WAREHOUSE_DOMAINS in products/managed_warehouse/backend/presentation/views.py.const MANAGED_WAREHOUSE_DOMAINS: Partial<Record<Region, string>> = {[Region.US]: 'us.postwh.com',[Region.EU]: 'eu.postwh.com',diff --git a/products/endpoints/frontend/common.ts b/products/endpoints/frontend/common.tsindex 4fca6ecc0e13..84a056664b0b 100644--- a/products/endpoints/frontend/common.ts+++ b/products/endpoints/frontend/common.ts@@ -2,7 +2,7 @@ import { PostHogComDocsURL } from 'lib/lemon-ui/Link/Link'import { NodeKind } from '~/queries/schema/schema-general'-/** Must match ENDPOINT_NAME_REGEX in products/endpoints/backend/api.py */+/** Must match ENDPOINT_NAME_REGEX in products/endpoints/backend/constants.py */const ENDPOINT_NAME_REGEX = /^[a-zA-Z][a-zA-Z0-9_-]{0,127}$/export function validateEndpointName(name: string): string | undefined {diff --git a/services/mcp/src/tools/links/generate-app-url.ts b/services/mcp/src/tools/links/generate-app-url.tsindex 98111188c549..3e6843e80c58 100644--- a/services/mcp/src/tools/links/generate-app-url.ts+++ b/services/mcp/src/tools/links/generate-app-url.ts@@ -6,7 +6,7 @@ import appUrlManifest from './app-url-manifest.json'import type { AppUrlManifest } from './types'// Canonical route table generated from the frontend's `urls` registry (see-// frontend/src/scenes/appUrlManifest.ts). The model must never hand-build entity links — slugs and+// frontend/bin/build-app-url-manifest.mjs). The model must never hand-build entity links — slugs and// project/host prefixes are easy to get wrong (a person UUID lives at `/persons/<uuid>`, a distinct// id at `/person/<id>`) — so this tool resolves them from the same definitions the app ships.const MANIFEST = appUrlManifest as AppUrlManifestdiff --git a/services/mcp/src/tools/links/types.ts b/services/mcp/src/tools/links/types.tsindex e0cb035813a2..837642e6e4ed 100644--- a/services/mcp/src/tools/links/types.ts+++ b/services/mcp/src/tools/links/types.ts@@ -1,5 +1,6 @@// Shape of app-url-manifest.json, generated from the frontend's `urls` registry by-// frontend/src/scenes/appUrlManifest.ts. Kept in sync by a drift test in that same dir.+// frontend/bin/build-app-url-manifest.mjs. Kept in sync by the `build:app-urls:check` step+// in .github/workflows/ci-frontend.yml.export type AppUrlScope = 'project' | 'global'export interface AppUrlEntry {