: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(workflows): hide quick start in the workflow editor header (#127223)
Michael Reichenbach693b7465aec4
diff --git a/products/workflows/frontend/Workflows/WorkflowSceneHeader.test.tsx b/products/workflows/frontend/Workflows/WorkflowSceneHeader.test.tsxindex 9cb81ab26eff..17ff497fba06 100644--- a/products/workflows/frontend/Workflows/WorkflowSceneHeader.test.tsx+++ b/products/workflows/frontend/Workflows/WorkflowSceneHeader.test.tsx@@ -1,8 +1,13 @@+import { MOCK_DEFAULT_ORGANIZATION } from 'lib/api.mock'+import '@testing-library/jest-dom'import { act, cleanup, render } from '@testing-library/react'import { BindLogic, Provider } from 'kea'+import { dayjs } from 'lib/dayjs'+import { organizationLogic } from 'scenes/organizationLogic'+import { useMocks } from '~/mocks/jest'import { initKeaTests } from '~/test/init'import { AccessControlLevel } from '~/types'@@ -80,7 +85,7 @@ describe('WorkflowSceneHeader', () => {logic?.unmount()})- it('keeps the same buttons in the same order when edits make the form dirty', () => {+ const renderHeader = (): void => {render(<Provider><BindLogic logic={workflowLogic} props={{ id: WORKFLOW_ID }}>@@ -88,6 +93,10 @@ describe('WorkflowSceneHeader', () => {</BindLogic></Provider>)+ }++ it('keeps the same buttons in the same order when edits make the form dirty', () => {+ renderHeader()// Auto-save has just landed: a draft is staged and the form is clean.const clean = toolbar()@@ -101,14 +110,21 @@ describe('WorkflowSceneHeader', () => {expect(toolbar()).toEqual(clean)})+ it('leaves Quick start out of the header even for a new organization with setup tasks left', () => {+ act(() => {+ organizationLogic.actions.loadCurrentOrganizationSuccess({+ ...MOCK_DEFAULT_ORGANIZATION,+ created_at: dayjs().subtract(1, 'day').toISOString(),+ })+ })++ renderHeader()++ expect(document.querySelector('[data-attr^="global-product-setup-button"]')).toBeNull()+ })+it('keeps Disable clickable on an active workflow while the form is dirty', () => {- render(- <Provider>- <BindLogic logic={workflowLogic} props={{ id: WORKFLOW_ID }}>- <WorkflowSceneHeader id={WORKFLOW_ID} />- </BindLogic>- </Provider>- )+ renderHeader()act(() => {logic.actions.setWorkflowValue('name', 'Still typing')diff --git a/products/workflows/frontend/Workflows/WorkflowSceneHeader.tsx b/products/workflows/frontend/Workflows/WorkflowSceneHeader.tsxindex 4f4e6f05abe7..1483eabee913 100644--- a/products/workflows/frontend/Workflows/WorkflowSceneHeader.tsx+++ b/products/workflows/frontend/Workflows/WorkflowSceneHeader.tsx@@ -175,6 +175,7 @@ export const WorkflowSceneHeader = (props: WorkflowSceneLogicProps = {}): JSX.ElonDescriptionChange={(description) => setWorkflowValue('description', description)}isLoading={workflowLoading && !workflow}renameDebounceMs={200}+ hideProductSetupButtonforceBackTo={workflowBackTo(workflow, props.id)}actions={<>