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.

chore: frontend improvements to source setup (#57709)

Daniel RC5cf49b7fa0b1
diff --git a/products/data_warehouse/frontend/shared/components/forms/SourceForm.tsx b/products/data_warehouse/frontend/shared/components/forms/SourceForm.tsx
index 926a4a216069..b5132e9d46cc 100644
--- a/products/data_warehouse/frontend/shared/components/forms/SourceForm.tsx
+++ b/products/data_warehouse/frontend/shared/components/forms/SourceForm.tsx
@@ -779,10 +779,9 @@ export function SourceFormComponent({
: 'Prefix cannot consist of only underscores'
}
- const displayValue = value ? value.trim().replace(/^_+|_+$/g, '') : ''
- const tableName = displayValue
- ? `${sourceConfig.name.toLowerCase()}.${displayValue}.table_name`
- : `${sourceConfig.name.toLowerCase()}.table_name`
+ const cleanedPrefix = value ? value.trim() : ''
+ const sourceType = sourceConfig.name.toLowerCase()
+ const tableName = `${cleanedPrefix}${sourceType}_table_name`.toLowerCase()
return (
<>
<LemonInput
diff --git a/products/data_warehouse/frontend/shared/components/forms/SyncProgressStep.tsx b/products/data_warehouse/frontend/shared/components/forms/SyncProgressStep.tsx
index 12942f5cb7c8..54349b27d1f2 100644
--- a/products/data_warehouse/frontend/shared/components/forms/SyncProgressStep.tsx
+++ b/products/data_warehouse/frontend/shared/components/forms/SyncProgressStep.tsx
@@ -37,8 +37,8 @@ export function getPreviewQueryUrl(
}
export const SyncProgressStep = (): JSX.Element => {
- const { sourceId, isWrapped, source: wizardSource } = useValues(sourceWizardLogic)
- const { cancelWizard } = useActions(sourceWizardLogic)
+ const { sourceId, isWrapped, source: wizardSource, nextButtonText } = useValues(sourceWizardLogic)
+ const { cancelWizard, closeWizard } = useActions(sourceWizardLogic)
const { dataWarehouseSources, dataWarehouseSourcesLoading } = useValues(sourceManagementLogic)
const source = dataWarehouseSources?.results.find((n) => n.id === sourceId)
const schemas = source?.schemas ?? []
@@ -176,6 +176,13 @@ export const SyncProgressStep = (): JSX.Element => {
? "You're all set! Your enabled tables are now available in the SQL editor."
: "You're all set! We'll import the data in the background, and after it's done, you will be able to query it in PostHog."
}
+ actions={
+ !isWrapped && (
+ <LemonButton type="primary" onClick={closeWizard} data-attr="sync-progress-return">
+ {nextButtonText}
+ </LemonButton>
+ )
+ }
>
{schemasWithErrors.length > 0 && (
<LemonBanner type="warning" className="mb-4">