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(customer-analytics): prevent overlapping warehouse tooltips (#121770)

Jovan Sakovicba68a5893928
diff --git a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/WarehousePersonPropertiesSetting.test.tsx b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/WarehousePersonPropertiesSetting.test.tsx
index 2eda1b68c95d..e4d0c8d6c6c4 100644
--- a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/WarehousePersonPropertiesSetting.test.tsx
+++ b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/WarehousePersonPropertiesSetting.test.tsx
@@ -1,6 +1,6 @@
import '@testing-library/jest-dom'
-import { cleanup, render } from '@testing-library/react'
+import { cleanup, render, screen } from '@testing-library/react'
import { useActions, useValues } from 'kea'
import { useRestrictedArea } from 'lib/components/RestrictedArea'
@@ -21,6 +21,13 @@ jest.mock('lib/components/RestrictedArea', () => ({
RestrictionScope: { Project: 'project' },
useRestrictedArea: jest.fn(),
}))
+jest.mock('lib/components/TZLabel', () => ({
+ TZLabel: ({ time, className }: { time: string; className?: string }) => (
+ <span data-attr={`tz-label-${time}`} className={className}>
+ {time}
+ </span>
+ ),
+}))
jest.mock('./CustomPropertyModal', () => ({ CustomPropertyModal: () => null }))
describe('WarehousePersonPropertiesSetting', () => {
@@ -50,7 +57,27 @@ describe('WarehousePersonPropertiesSetting', () => {
updated_at: null,
sync_frequency_interval_seconds: 3600,
next_sync_at: '2026-01-01T01:00:00Z',
- latest_run: null,
+ latest_run: {
+ id: 'run-1',
+ job_id: 'job-1',
+ account_segment: null,
+ sync_phase: null,
+ attempt: null,
+ workflow_id: null,
+ workflow_run_id: null,
+ temporal_url: null,
+ trigger: 'scheduled',
+ status: 'completed',
+ started_at: '2026-01-01T00:00:00Z',
+ finished_at: '2026-01-01T00:01:00Z',
+ rows_read: 1,
+ changed: 0,
+ existing: 0,
+ produced: 0,
+ skipped_missing_person: 0,
+ error: null,
+ created_at: '2026-01-01T00:00:00Z',
+ },
external_data_source: 'warehouse-source-1',
table_name: 'stripe_customers',
saved_query_name: null,
@@ -107,6 +134,13 @@ describe('WarehousePersonPropertiesSetting', () => {
window.POSTHOG_APP_CONTEXT = previousAppContext
})
+ it('keeps the sync status tooltip separate from the time-zone popover', () => {
+ render(<WarehousePersonPropertiesSetting />)
+
+ expect(screen.getByText('Synced')).toHaveAttribute('data-base-ui-tooltip-trigger')
+ expect(screen.getByTestId('tz-label-2026-01-01T00:00:00Z').closest('[data-base-ui-tooltip-trigger]')).toBeNull()
+ })
+
test.each([
{
caller: 'project member with Customer analytics editor access',
diff --git a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/WarehousePersonPropertiesSetting.tsx b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/WarehousePersonPropertiesSetting.tsx
index 985e3f33f7d5..e4fc6c4d89c9 100644
--- a/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/WarehousePersonPropertiesSetting.tsx
+++ b/products/customer_analytics/frontend/scenes/CustomerAnalyticsConfigurationScene/account/WarehousePersonPropertiesSetting.tsx
@@ -189,14 +189,14 @@ function WarehouseProfilePropertiesSetting({ targetType }: { targetType: 'person
.filter(Boolean)
.join(' — ') || undefined
return (
- <Tooltip title={tooltipTitle}>
- <span className="flex items-center gap-2">
+ <span className="flex items-center gap-2">
+ <Tooltip title={tooltipTitle}>
<LemonTag type={TAG_TYPE_BY_SYNC_LEVEL[status.level]}>{status.label}</LemonTag>
- {status.level === 'synced' && definition.source.last_synced_at && (
- <TZLabel time={definition.source.last_synced_at} className="text-secondary" />
- )}
- </span>
- </Tooltip>
+ </Tooltip>
+ {status.level === 'synced' && definition.source.last_synced_at && (
+ <TZLabel time={definition.source.last_synced_at} className="text-secondary" />
+ )}
+ </span>
)
},
},