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(navigation): redirect /project/new to the create-project flow (#86743)

posthog[bot]b48ca706d031
diff --git a/frontend/src/scenes/sceneLogic.test.tsx b/frontend/src/scenes/sceneLogic.test.tsx
index 41447ed0796e..fcd42565afd8 100644
--- a/frontend/src/scenes/sceneLogic.test.tsx
+++ b/frontend/src/scenes/sceneLogic.test.tsx
@@ -81,6 +81,12 @@ describe('sceneLogic', () => {
expect(removeProjectIdIfPresent(router.values.location.pathname)).toEqual(urls.featureFlag('123'))
})
+ it('redirects /project/new to the create-project flow instead of a 404', async () => {
+ router.actions.push('/project/new')
+ await expectLogic(logic).delay(1)
+ expect(removeProjectIdIfPresent(router.values.location.pathname)).toEqual(urls.projectCreateFirst())
+ })
+
it('redirects the old /code_review path to /code-review, preserving the ?review= deep link and hash', async () => {
router.actions.push('/code_review', { review: 'r-9' }, { panel: 'max:inspect' })
await expectLogic(logic).delay(1)
diff --git a/frontend/src/scenes/scenes.ts b/frontend/src/scenes/scenes.ts
index 3ba698bdbf31..d5a559eb1461 100644
--- a/frontend/src/scenes/scenes.ts
+++ b/frontend/src/scenes/scenes.ts
@@ -705,6 +705,8 @@ export const redirects: Record<
'/pipeline/sources': urls.sources(),
'/pipeline/transformations': urls.transformations(),
'/pipeline/data-import': urls.sources(),
+ // There is no /project/new scene; send typed URLs and old bookmarks to the create-project flow
+ '/project/new': urls.projectCreateFirst(),
'/project/settings': urls.settings('project'),
// The quickstart landing page is gone; keep old bookmarks and pinned tabs out of a 404
'/quickstart': urls.default(),