Skip to content

feat: open PostHog dashboard after signup#398

Merged
MattBro merged 5 commits into
mainfrom
matt/open-dashboard-after-signup
May 7, 2026
Merged

feat: open PostHog dashboard after signup#398
MattBro merged 5 commits into
mainfrom
matt/open-dashboard-after-signup

Conversation

@MattBro

@MattBro MattBro commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

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.

@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
@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

@gewenyu99 gewenyu99 left a comment

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.

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

Comment thread src/lib/agent/agent-runner.ts Outdated
MattBro and others added 3 commits May 6, 2026 13:10
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>
- 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>
…kflow

Keep the agent runner generic by moving the deep-link request and
browser-open behavior out of the unified runner and into the
posthog-integration workflow's postRun and buildOutroData hooks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MattBro MattBro force-pushed the matt/open-dashboard-after-signup branch from 442ce3d to 1abf377 Compare May 6, 2026 17:13

@gewenyu99 gewenyu99 left a comment

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.

Noice

@MattBro MattBro merged commit b9a1888 into main May 7, 2026
17 checks passed
@MattBro MattBro deleted the matt/open-dashboard-after-signup branch May 7, 2026 15:45
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