feat: promote programs via post-install "Recommended next" screen#668
Draft
sarahxsanders wants to merge 1 commit into
Draft
feat: promote programs via post-install "Recommended next" screen#668sarahxsanders wants to merge 1 commit into
sarahxsanders wants to merge 1 commit into
Conversation
Keeps the main wizard flow install-only and surfaces other programs (revenue analytics, and future data-warehouse/LLM-analytics) as discoverable follow-ups once install succeeds — no flow/UI overhaul. - `ProgramConfig.promotable` metadata: a program opts into promotion by declaring its detection `feature`, `label`, and `description`. The screen stays product-agnostic and just iterates the registry. - `promotable.ts` answers "given what `detect` found, which registered programs should we recommend?" — the producer side of discoverability. - New post-install `RecommendedNextScreen` (a `show`-gated step) renders detected candidates; the user's picks land in `session.recommendedFollowUps` — the modular seam a future orchestrator/queue consumes. - Interim, the seam renders as copy-paste `npx @posthog/wizard <cmd>` lines on exit (exit-line.ts). No queue/orchestration yet. - `DiscoveredFeature` extracted into a dependency-free leaf module so program configs can reference its values at module-init without a module-load cycle; re-exported from wizard-session for back-compat. Generated-By: PostHog Code Task-Id: 3fd67ecf-5927-4839-b042-38d1c2685925
🧙 Wizard CIRun 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:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keeps the main wizard flow install-only and surfaces other programs (revenue analytics today; data-warehouse / LLM-analytics next) as discoverable follow-ups once install succeeds. No flow or UI overhaul — this is the interim, modular discoverability layer agreed in Slack while the new TUI / orchestrator is sidelined for self-driving product.
Per Edwin's steer: keep programs separate, just add discoverability now; merge into the orchestrator later.
How it works
ProgramConfig.promotablemetadata — a program opts into promotion by declaring its detectionfeature,label, anddescriptionin one registry entry. The screen holds no product knowledge; it just iterates the registry.promotable.ts— the producer side: given what thedetectstep found, which registered programs should we recommend?RecommendedNextScreen— a new post-install,show-gated step. Renders detected candidates; when none are detected the router skips it entirely. The user's picks land insession.recommendedFollowUps— the modular seam a future orchestrator/queue consumes unchanged.npx @posthog/wizard <cmd>lines on exit (exit-line.ts). No queue/orchestration yet; that's a deliberate fast-follow.Notable
DiscoveredFeatureis extracted into a dependency-free leaf module (discovered-features.ts) so program configs can reference its enum values at module-init without a module-load cycle. It's re-exported fromwizard-sessionso every existing@lib/wizard-sessionconsumer is unaffected.Testing
pnpm build(incl. smoke test) ✓pnpm jest— newpromotable.test.ts+ extendedexit-line.test.tspass; only failure is the pre-existing order-dependentprovision-cliflake (fails on cleanmaintoo) ✓pnpm lint— 0 errors ✓🤖 Generated with Claude Code