Skip to content

feat: open PostHog dashboard after signup#398

Open
MattBro wants to merge 2 commits intomainfrom
matt/open-dashboard-after-signup
Open

feat: open PostHog dashboard after signup#398
MattBro wants to merge 2 commits intomainfrom
matt/open-dashboard-after-signup

Conversation

@MattBro
Copy link
Copy Markdown
Contributor

@MattBro MattBro commented Apr 17, 2026

Problem

After the wizard creates a new PostHog account via provisioning, the user has no way to get to their dashboard without manually navigating to posthog.com and resetting their password. The outro screen shows a static URL but doesn't open it.

Changes

  • Added requestDeepLink() to provisioning.ts - calls POST /api/agentic/provisioning/deep_links to get a one-time login URL
  • After signup, the wizard requests a deep link and auto-opens the user's browser to their PostHog project dashboard, already logged in
  • Falls back to the static /products?source=wizard URL if the deep link request fails
  • The deep link URL is also shown in the outro screen so the user can click it manually

The deep link infrastructure already exists on the PostHog server side (used by Stripe). The token is one-time use, expires in 10 minutes.

How did you test this code?

  • All 6 provisioning tests pass
  • Build + smoke test pass
  • Lint clean (0 errors, only pre-existing warnings)
  • Deep link API tested manually against US prod via curl (confirmed it returns valid URLs)

Publish to changelog?

No

🤖 LLM context

Co-authored with Claude Code.

After wizard signup provisioning completes, request a one-time deep link
from the provisioning API and auto-open it in the browser. The user
lands on their project dashboard, already logged in.

Falls back to the static /products URL if the deep link request fails.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci android
  • /wizard-ci angular
  • /wizard-ci astro
  • /wizard-ci django
  • /wizard-ci fastapi
  • /wizard-ci flask
  • /wizard-ci javascript-node
  • /wizard-ci javascript-web
  • /wizard-ci laravel
  • /wizard-ci next-js
  • /wizard-ci nuxt
  • /wizard-ci python
  • /wizard-ci rails
  • /wizard-ci react-native
  • /wizard-ci react-router
  • /wizard-ci stripe
  • /wizard-ci sveltekit
  • /wizard-ci swift
  • /wizard-ci tanstack-router
  • /wizard-ci tanstack-start
  • /wizard-ci vue

Test an individual app:

  • /wizard-ci android/Jetchat
  • /wizard-ci angular/angular-saas
  • /wizard-ci astro/astro-hybrid-marketing
Show more apps
  • /wizard-ci astro/astro-ssr-docs
  • /wizard-ci astro/astro-static-marketing
  • /wizard-ci astro/astro-view-transitions-marketing
  • /wizard-ci django/django3-saas
  • /wizard-ci fastapi/fastapi3-ai-saas
  • /wizard-ci flask/flask3-social-media
  • /wizard-ci javascript-node/express-todo
  • /wizard-ci javascript-node/fastify-blog
  • /wizard-ci javascript-node/hono-links
  • /wizard-ci javascript-node/koa-notes
  • /wizard-ci javascript-node/native-http-contacts
  • /wizard-ci javascript-web/saas-dashboard
  • /wizard-ci laravel/laravel12-saas
  • /wizard-ci next-js/15-app-router-saas
  • /wizard-ci next-js/15-app-router-todo
  • /wizard-ci next-js/15-pages-router-saas
  • /wizard-ci next-js/15-pages-router-todo
  • /wizard-ci nuxt/movies-nuxt-3-6
  • /wizard-ci nuxt/movies-nuxt-4
  • /wizard-ci python/meeting-summarizer
  • /wizard-ci rails/fizzy
  • /wizard-ci react-native/expo-react-native-hacker-news
  • /wizard-ci react-native/react-native-saas
  • /wizard-ci react-router/react-router-v7-project
  • /wizard-ci react-router/rrv7-starter
  • /wizard-ci react-router/saas-template
  • /wizard-ci react-router/shopper
  • /wizard-ci stripe/stripe-next-js-saas-starter
  • /wizard-ci stripe/stripe-saas-demo
  • /wizard-ci sveltekit/CMSaasStarter
  • /wizard-ci swift/hackers-ios
  • /wizard-ci tanstack-router/tanstack-router-code-based-saas
  • /wizard-ci tanstack-router/tanstack-router-file-based-saas
  • /wizard-ci tanstack-start/tanstack-start-saas
  • /wizard-ci vue/movies

Results will be posted here when complete.

@MattBro MattBro marked this pull request as draft April 17, 2026 18:43
- Top-level import instead of dynamic import
- Add NODE_ENV !== 'test' guard to prevent browser opens in tests
- Use .catch() pattern matching oauth.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MattBro MattBro marked this pull request as ready for review April 17, 2026 18:45
@MattBro MattBro requested review from a team, fercgomes and rafaeelaudibert April 20, 2026 13:40
Copy link
Copy Markdown
Collaborator

@gewenyu99 gewenyu99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did some refactoring, so 1 comment below you can throw to an agent :D


getUI().outro(config.successMessage);

if (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! we try to keep the agent runner generic to just running the agent.

I think we should add this to the last step of the workflow.

Your can point your agent to this skill to do the refactor :D

This way:

  • The wizard runner stays clean of UI/UX behaviors
  • We only add this to the workflow of the posthog integration (since the wizard is starting to do a bunch of other tasks!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants