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(data-warehouse): put the sources table loading state on the table (#113184)

Tom Owers5ee97c5436ac
diff --git a/products/data_warehouse/frontend/shared/components/ManagedSourcesTable.tsx b/products/data_warehouse/frontend/shared/components/ManagedSourcesTable.tsx
index ae1c33c3c421..645e61383b6a 100644
--- a/products/data_warehouse/frontend/shared/components/ManagedSourcesTable.tsx
+++ b/products/data_warehouse/frontend/shared/components/ManagedSourcesTable.tsx
@@ -2,16 +2,7 @@ import { useActions, useValues } from 'kea'
import { router } from 'kea-router'
import { IconPlusSmall } from '@posthog/icons'
-import {
- LemonButton,
- LemonDialog,
- LemonInput,
- LemonSkeleton,
- LemonTable,
- LemonTag,
- Spinner,
- Tooltip,
-} from '@posthog/lemon-ui'
+import { LemonButton, LemonDialog, LemonInput, LemonTable, LemonTag, Spinner, Tooltip } from '@posthog/lemon-ui'
import { AccessControlAction } from 'lib/components/AccessControlAction'
import { AppMetricsSparkline } from 'lib/components/AppMetrics/AppMetricsSparkline'
@@ -49,10 +40,6 @@ export function ManagedSourcesTable(): JSX.Element {
const { featureFlags } = useValues(featureFlagLogic)
const showMetrics = !!featureFlags[FEATURE_FLAGS.DWH_SOURCE_METRICS]
- if (availableSourcesLoading) {
- return <LemonSkeleton />
- }
-
return (
<div>
<div className="flex gap-2 justify-between items-center mb-4">
@@ -65,8 +52,10 @@ export function ManagedSourcesTable(): JSX.Element {
</div>
<LemonTable
id="managed-sources"
- dataSource={filteredManagedSources}
- loading={dataWarehouseSourcesLoading}
+ // Labels and icons come from `availableSources`, so rows shown before it answers
+ // would render raw source types and then swap under the reader.
+ dataSource={availableSourcesLoading ? [] : filteredManagedSources}
+ loading={dataWarehouseSourcesLoading || availableSourcesLoading}
disableTableWhileLoading={false}
pagination={{ pageSize: 10 }}
scrollToTopOnPageChange={false}