Skip to content

feat(warehouse): hand over a pre-filled link per detected source - #1087

Open
Gilbert09 wants to merge 1 commit into
mainfrom
tom/wizard-warehouse-outro-links
Open

feat(warehouse): hand over a pre-filled link per detected source#1087
Gilbert09 wants to merge 1 commit into
mainfrom
tom/wizard-warehouse-outro-links

Conversation

@Gilbert09

Copy link
Copy Markdown
Member

Problem

A user finishes the install wizard, is told their project has a Postgres and a Stripe to connect, and the only route offered is starting a second CLI run. Most never do: of the people who saw that suggestion, 3.7% went on to run npx @posthog/wizard warehouse.

  • The outro names the detected sources, then prints Import it into the data warehouse with: npx @posthog/wizard warehouse.
  • Around 60% of install runs detect at least one connectable source, so this text is the only warehouse prompt most users ever see.
  • It is also the only route for the runs the orchestrator never reaches, for CI and signup runs, and for anyone who skips the in-run task.

Separately, the Stripe tip shown during the agent run links to a URL that 404s.

Changes

  • Give each detected source its own link to its form in the app: <appHost>/project/<id>/data-warehouse/new-source?kind=<kind>.
  • Cap the list at 3 links, then say how many more we found, so a 9-source project does not print 9 URLs.
  • Keep the npx @posthog/wizard warehouse line for connecting everything in one pass.
  • Render outro next steps through LinkText, so a URL becomes an OSC 8 hyperlink and its label is shortened rather than wrapped across lines.
  • Fix the Stripe tip URL. https://app.posthog.com/project/data-warehouse/new-source?kind=Stripe has a /project/ segment with no team id, which matches no route and renders the 404 scene.

kind is matched case-insensitively by the app, and a kind it cannot resolve falls back to the source catalog rather than erroring, so a source we detect before the app ships a connector still lands somewhere useful.

Test plan

  • Two new cases in warehouse-suggestion.test.ts: the link carries the project segment and the source kind, and a 5-source project yields 3 links plus a summary line. The existing test asserted the joined label list, which no longer describes the output.
  • Ran the full suite locally: 1845 pass.
  • Verified the rendering path by feeding a real outro item through splitPromptIntoSegments. It splits into Connect Postgres: plus the URL, which is what puts the address on its own line with the full target preserved.
  • Not tested: the outro rendered in a real terminal. This repo has no ink render test to extend, and I did not add one for this.

LLM context

I (actually Claude Opus 5) wrote this while looking for the reason the warehouse flow converts poorly. The in-run task reaches only the share of runs the orchestrator serves, so the outro is where the remaining runs can be reached.

The outro named the sources it found and told the user to start a second CLI
run to connect them. Every run with a detected source now gets a link straight
to that source's form in the app instead, so connecting one is a click.

This reaches every run that detects a source, not only the runs the
orchestrator offers the warehouse task to.

Also fix the Stripe tip's URL. A '/project/' segment with no team id matches no
route, so that link rendered the 404 scene.
@Gilbert09
Gilbert09 requested a review from a team as a code owner August 13, 2026 21:41
@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 ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue
  • /wizard-ci self-driving

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/groq
  • /wizard-ci ai-observability/manual-capture
Show more apps
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit

Results will be posted here when complete.

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.

1 participant