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.

fix(cohorts): stop the new cohort page throwing a reducer error (#117058)

posthog[bot]79d67da12677
diff --git a/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts b/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts
index ac64a6c6ccc0..ac615422b98e 100644
--- a/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts
+++ b/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts
@@ -448,8 +448,7 @@ export interface dataNodeLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
- | null
- | undefined,
+ | null,
payload?: {
overrideQuery: DataNode<Record<string, any>> | undefined
pollOnly: boolean
@@ -473,7 +472,6 @@ export interface dataNodeLogicActions {
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
| null
- | undefined
payload?: {
overrideQuery: DataNode<Record<string, any>> | undefined
pollOnly: boolean
@@ -1103,7 +1101,7 @@ export const dataNodeLogic = kea<dataNodeLogicType>([
}
if (props.doNotLoad) {
- return props.cachedResults
+ return props.cachedResults ?? null
}
const queryStatus = (props.cachedResults?.query_status || null) as QueryStatus | null
diff --git a/frontend/src/scenes/cohorts/cohortCountWarningLogic.test.ts b/frontend/src/scenes/cohorts/cohortCountWarningLogic.test.ts
index 2f2ec73528cc..cc5759604160 100644
--- a/frontend/src/scenes/cohorts/cohortCountWarningLogic.test.ts
+++ b/frontend/src/scenes/cohorts/cohortCountWarningLogic.test.ts
@@ -376,7 +376,9 @@ describe('cohortCountWarningLogic', () => {
dataNodeLogicKey,
})
logic.mount()
- await expectLogic(dataNodeLogic.findMounted({ key: dataNodeLogicKey })!).toFinishAllListeners()
+ await expectLogic(dataNodeLogic.findMounted({ key: dataNodeLogicKey })!)
+ .toFinishAllListeners()
+ .toNotHaveDispatchedActions(['loadDataFailure'])
expect(logic.values.response).toEqual(expectedResponse)
})
diff --git a/frontend/src/scenes/insights/insightDataLogic.tsx b/frontend/src/scenes/insights/insightDataLogic.tsx
index 280d69a0f8dc..1f426129f50b 100644
--- a/frontend/src/scenes/insights/insightDataLogic.tsx
+++ b/frontend/src/scenes/insights/insightDataLogic.tsx
@@ -220,8 +220,7 @@ export interface insightDataLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
- | null
- | undefined,
+ | null,
payload?:
| {
overrideQuery: DataNode<Record<string, any>> | undefined
@@ -253,7 +252,6 @@ export interface insightDataLogicActions {
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
| null
- | undefined
} // dataNodeLogic
setInsightData: (
response:
diff --git a/frontend/src/scenes/insights/insightDataTimingLogic.ts b/frontend/src/scenes/insights/insightDataTimingLogic.ts
index 39b2d264c516..9f02a7ddc688 100644
--- a/frontend/src/scenes/insights/insightDataTimingLogic.ts
+++ b/frontend/src/scenes/insights/insightDataTimingLogic.ts
@@ -87,8 +87,7 @@ export interface insightDataTimingLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
- | null
- | undefined,
+ | null,
payload?:
| {
overrideQuery: DataNode<Record<string, any>> | undefined
@@ -120,7 +119,6 @@ export interface insightDataTimingLogicActions {
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
| null
- | undefined
} // dataNodeLogic
removeQuery: (queryId: string) => {
queryId: string
diff --git a/frontend/src/scenes/insights/insightVizDataLogic.ts b/frontend/src/scenes/insights/insightVizDataLogic.ts
index 271bfafe6a7e..72178df5aff6 100644
--- a/frontend/src/scenes/insights/insightVizDataLogic.ts
+++ b/frontend/src/scenes/insights/insightVizDataLogic.ts
@@ -365,8 +365,7 @@ export interface insightVizDataLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
- | null
- | undefined,
+ | null,
payload?:
| {
overrideQuery: DataNode<Record<string, any>> | undefined
@@ -398,7 +397,6 @@ export interface insightVizDataLogicActions {
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
| null
- | undefined
} // insightDataLogic
setInsightData: (
response:
diff --git a/products/customer_analytics/frontend/components/Accounts/accountsLogic.ts b/products/customer_analytics/frontend/components/Accounts/accountsLogic.ts
index 3d964784e627..b582acf6ad2d 100644
--- a/products/customer_analytics/frontend/components/Accounts/accountsLogic.ts
+++ b/products/customer_analytics/frontend/components/Accounts/accountsLogic.ts
@@ -385,8 +385,7 @@ export interface accountsLogicActions {
| import('~/queries/schema').TraceSpansAggregationQueryResponse
| import('~/queries/schema').TraceSpansAttributeBreakdownQueryResponse
| import('~/queries/schema').TraceSpansQueryResponse
- | import('~/queries/schema').TraceSpansTreeQueryResponse
- | undefined,
+ | import('~/queries/schema').TraceSpansTreeQueryResponse,
payload?:
| {
overrideQuery: DataNode<Record<string, any>> | undefined
@@ -418,7 +417,6 @@ export interface accountsLogicActions {
| import('~/queries/schema').TraceSpansAttributeBreakdownQueryResponse
| import('~/queries/schema').TraceSpansQueryResponse
| import('~/queries/schema').TraceSpansTreeQueryResponse
- | undefined
} // dataNodeLogic
ensureAllMembersLoaded: () => {
value: true
diff --git a/products/data_warehouse/frontend/sql_editor/aiChartRecommendationLogic.ts b/products/data_warehouse/frontend/sql_editor/aiChartRecommendationLogic.ts
index 7c554b464997..15d3fb0cd2da 100644
--- a/products/data_warehouse/frontend/sql_editor/aiChartRecommendationLogic.ts
+++ b/products/data_warehouse/frontend/sql_editor/aiChartRecommendationLogic.ts
@@ -199,8 +199,7 @@ export interface aiChartRecommendationLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
- | null
- | undefined,
+ | null,
payload?:
| {
overrideQuery: import('~/queries/schema').DataNode<Record<string, any>> | undefined
@@ -232,7 +231,6 @@ export interface aiChartRecommendationLogicActions {
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
| null
- | undefined
} // dataNodeLogic
_setQuery: (node: VisualizationNode) => {
node: VisualizationNode
diff --git a/products/error_tracking/frontend/logics/issuesDataNodeLogic.tsx b/products/error_tracking/frontend/logics/issuesDataNodeLogic.tsx
index 08e3cd044cd5..60b9d3fa9da8 100644
--- a/products/error_tracking/frontend/logics/issuesDataNodeLogic.tsx
+++ b/products/error_tracking/frontend/logics/issuesDataNodeLogic.tsx
@@ -174,8 +174,7 @@ export interface issuesDataNodeLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
- | null
- | undefined,
+ | null,
payload?:
| {
overrideQuery: DataNode<Record<string, any>> | undefined
@@ -207,7 +206,6 @@ export interface issuesDataNodeLogicActions {
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
| null
- | undefined
} // nodeLogic
setResponse: (
response:
diff --git a/products/product_analytics/frontend/insights/chartAlternatives/chartPreviewsLogic.ts b/products/product_analytics/frontend/insights/chartAlternatives/chartPreviewsLogic.ts
index 790c24846ca3..cbd8613f7c5b 100644
--- a/products/product_analytics/frontend/insights/chartAlternatives/chartPreviewsLogic.ts
+++ b/products/product_analytics/frontend/insights/chartAlternatives/chartPreviewsLogic.ts
@@ -92,8 +92,7 @@ export interface chartPreviewsLogicActions {
| import('~/queries/schema').TraceSpansAggregationQueryResponse
| import('~/queries/schema').TraceSpansAttributeBreakdownQueryResponse
| import('~/queries/schema').TraceSpansQueryResponse
- | import('~/queries/schema').TraceSpansTreeQueryResponse
- | undefined,
+ | import('~/queries/schema').TraceSpansTreeQueryResponse,
payload?:
| {
overrideQuery: import('~/queries/schema').DataNode<Record<string, any>> | undefined
@@ -125,7 +124,6 @@ export interface chartPreviewsLogicActions {
| import('~/queries/schema').TraceSpansAttributeBreakdownQueryResponse
| import('~/queries/schema').TraceSpansQueryResponse
| import('~/queries/schema').TraceSpansTreeQueryResponse
- | undefined
} // insightVizDataLogic
setInsightData: (
response:
diff --git a/products/product_analytics/frontend/insights/funnels/FunnelCorrelation/funnelCorrelationUsageLogic.ts b/products/product_analytics/frontend/insights/funnels/FunnelCorrelation/funnelCorrelationUsageLogic.ts
index 785e2ff57328..8e062e0c660c 100644
--- a/products/product_analytics/frontend/insights/funnels/FunnelCorrelation/funnelCorrelationUsageLogic.ts
+++ b/products/product_analytics/frontend/insights/funnels/FunnelCorrelation/funnelCorrelationUsageLogic.ts
@@ -129,8 +129,7 @@ export interface funnelCorrelationUsageLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| null
- | import('~/queries/schema').TraceSpansTreeQueryResponse
- | undefined,
+ | import('~/queries/schema').TraceSpansTreeQueryResponse,
payload?:
| {
overrideQuery: DataNode<Record<string, any>> | undefined
@@ -162,7 +161,6 @@ export interface funnelCorrelationUsageLogicActions {
| TraceSpansQueryResponse
| null
| import('~/queries/schema').TraceSpansTreeQueryResponse
- | undefined
} // insightVizDataLogic
}
diff --git a/products/product_analytics/frontend/insights/retention/retentionPeopleLogic.ts b/products/product_analytics/frontend/insights/retention/retentionPeopleLogic.ts
index 555551323860..a80452a31578 100644
--- a/products/product_analytics/frontend/insights/retention/retentionPeopleLogic.ts
+++ b/products/product_analytics/frontend/insights/retention/retentionPeopleLogic.ts
@@ -73,8 +73,7 @@ export interface retentionPeopleLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| null
- | import('~/queries/schema').TraceSpansTreeQueryResponse
- | undefined,
+ | import('~/queries/schema').TraceSpansTreeQueryResponse,
payload?:
| {
overrideQuery: DataNode<Record<string, any>> | undefined
@@ -106,7 +105,6 @@ export interface retentionPeopleLogicActions {
| TraceSpansQueryResponse
| null
| import('~/queries/schema').TraceSpansTreeQueryResponse
- | undefined
} // insightVizDataLogic
clearPeople: () => {
value: true
diff --git a/products/web_analytics/frontend/marketing/marketingAnalyticsCrossSellLogic.ts b/products/web_analytics/frontend/marketing/marketingAnalyticsCrossSellLogic.ts
index 1d73d2e8a4d3..03c12818a244 100644
--- a/products/web_analytics/frontend/marketing/marketingAnalyticsCrossSellLogic.ts
+++ b/products/web_analytics/frontend/marketing/marketingAnalyticsCrossSellLogic.ts
@@ -94,8 +94,7 @@ export interface marketingAnalyticsCrossSellLogicActions {
| TraceSpansAttributeBreakdownQueryResponse
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
- | null
- | undefined,
+ | null,
payload?:
| {
overrideQuery: import('~/queries/schema').DataNode<Record<string, any>> | undefined
@@ -127,7 +126,6 @@ export interface marketingAnalyticsCrossSellLogicActions {
| TraceSpansQueryResponse
| TraceSpansTreeQueryResponse
| null
- | undefined
} // dataNodeLogic
loadConnectionState: (_: void) => void
loadConnectionStateFailure: (