: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(error-tracking): recurse into nested groups in the eval-mode indicator (#75986)
Aleksander Błaszkiewiczf381e583e16d
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 36c41ae71102..0a2039417507 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -145,9 +145,9 @@ snapshots:components-cards-insight-card--access-control-viewer-access--light:hash: v1.k794b7964.bf2be6132e7d881f5648da794c30b861a8970b30aad98024e1470afa20fb1184.QjEzM0TKMP1UfPhiAgRyZW3hsOIKbNn5o8Un7s1Yswccomponents-cards-insight-card--insight-card--dark:- hash: v1.k794b7964.cf96222fc255d95aabfdacded279a5a956137ecc837686d5a5a1ffac238b3aa1.CHawJz0YmnigXNjoCjjX3AU9q7gxjCwYioh0R-ZlL6k+ hash: v1.k794b7964.5d882ea13f1124c1b72f3b2984771d975f08fd7a56f188a74ffc3a4d4924b44f.dcyABXlgAlX_q28LSWghLYQ3Z7rstaSJUIIxlm4ETcwcomponents-cards-insight-card--insight-card--light:- hash: v1.k794b7964.bbb3f9393068a2bfbe6e68235d521be001c99d791d3e580b91be9040c2806a97.7eFGp37eVD9-ZlHTtMIrzcxhQQzWnhpNrnxKZ2OQiYw+ hash: v1.k794b7964.623afbadbac0c53b481d42f50439e0fdc6353f01a3779b2d3d829b0247300d18.J36MTIFPey57K8AJiKNlIl8uivEtrCDx_29HJqocehAcomponents-cards-insight-details--dashboard-filter-overrides--dark:hash: v1.k794b7964.a329bf8c33e5ba0f777352aedd989c5c6cdc9a052c5ff20941331ee8ad004e93.sVMhyuYiG4BcFfCwwkJG9Vbr6QsQx5bOawB9bbVAQ44components-cards-insight-details--dashboard-filter-overrides--light:diff --git a/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/suppression_rules/EvaluationIndicator.tsx b/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/suppression_rules/EvaluationIndicator.tsxindex d8b86ac42438..0110106db2e1 100644--- a/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/suppression_rules/EvaluationIndicator.tsx+++ b/products/error_tracking/frontend/scenes/ErrorTrackingConfigurationScene/suppression_rules/EvaluationIndicator.tsx@@ -1,7 +1,7 @@import { IconLaptop, IconServer } from '@posthog/icons'import { Tooltip } from '@posthog/lemon-ui'-import { AnyPropertyFilter, FilterLogicalOperator, UniversalFiltersGroup } from '~/types'+import { FilterLogicalOperator, UniversalFiltersGroup, UniversalFiltersGroupValue } from '~/types'// Kept in sync with SERVER_ONLY_PROPERTIES and CLIENT_EVALUABLE_OPERATORS in// products/error_tracking/backend/logic/__init__.py, which decides what actually reaches the SDK.@@ -19,7 +19,12 @@ const CLIENT_EVALUABLE_OPERATORS = new Set(['lt',])-function isFilterClientSafe(f: AnyPropertyFilter): boolean {+function isFilterClientSafe(f: UniversalFiltersGroupValue): boolean {+ // A rule can nest groups, and the backend recurses into them, so a group is safe when its+ // leaves are. Treating one as a leaf here reads its missing operator as unevaluable.+ if ('values' in f) {+ return (f.values ?? []).every(isFilterClientSafe)+ }if ('key' in f && f.key && SERVER_ONLY_PROPERTIES.has(f.key)) {return false}@@ -30,7 +35,7 @@ function isFilterClientSafe(f: AnyPropertyFilter): boolean {export type EvalMode = 'client' | 'partial' | 'server'export function getEvalMode(filters: UniversalFiltersGroup): EvalMode {- const values = (filters.values ?? []) as AnyPropertyFilter[]+ const values = filters.values ?? []if (values.length === 0) {return 'client'}