Skip to content

feat(analytics): ask about the email provider after install - #1508

Merged
Silthus merged 42 commits into
mainfrom
feat/email-provider-offer
Nov 20, 2026
Merged

Silthus merged 42 commits into
mainfrom
feat/email-provider-offer

Conversation

@Silthus

@Silthus Silthus commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Wizard's scan finds the email service a developer's app sends with, such as Resend. Nothing asks them whether they would send that email from PostHog instead, so we can't tell how many would, or point the ones who would at a way to start.

With this PR, an interactive install that found an email provider can ask one question as the run's last step, after the MCP step: "PostHog can send this app's transactional emails directly from code, with delivery and engagement events next to your product analytics. Want to try it?" "Yes" points at the Wizard's new email command (#1507), which sets up that first send. The answer goes on an analytics event, and nothing is set on the person. The question only shows while the flag wizard-email-provider-offer is on for the run, and the flag is at 0%.

Impact

  • Moves: how many developers who already send email from code ask for PostHog email, and how many of those go on to run the email command.
  • Read it from: wizard: email provider offer answered by answer, joined on the person to a transactional-email run within 7 days. The insight is owed at rollout, once the flag is widened.

Merge risk

Note

🔵 Merge risk: low · two-way door (merge-risk rubric)

  • Released Wizards send two new events once the flag is on, and set nothing on the person.
  • A new flow step is the last step of every interactive run, after the MCP step. It shows only when the flag is on, the run succeeded, sharing is on, the user is identified, and the scan found an email provider. The flag is at 0%, so merging changes nothing a user sees.
  • Widen wizard-email-provider-offer only when both hold: workflows-email-from-code is at 100% (it is, as of 18 Nov), and the npm latest Wizard runs email (2.97.0 or later). Before that, "Yes" names a command the published package doesn't have.
  • Ctrl-C and process signals, on every interactive run: on main they wait for the run stream and analytics.shutdown('cancelled'), then unmount the TUI and exit. Here they unmount first, then also flush the events captured after the run report, for at most 2 seconds, before they exit.
  • Once a release with this PR is published, every Wizard run sends the flag's value even at 0%: $feature/wizard-email-provider-offer: false on each wizard event, plus a $feature_flag_called event, the same as every other Wizard flag. It is additive analytics and stops when the key is removed.
  • The fallback "Run this in your app" names no directory, so someone can paste the command from the wrong checkout. --project-id still keeps it on the same project.
  • Switch-off: set wizard-email-provider-offer to off; the step and its events stop on the next run. The signal-order change has no switch; fix forward.

Tier: non-critical

Changes

  • When it asks (emailProviderOffer in src/programs/posthog-integration/email-provider-offer.ts): the flag is 'true' in the run's cached flag snapshot, the run is interactive and not --ci, the run identified the user, scan results may be shared, the outro reports success, and the scan found an email provider (detectedEmailProviders from feat(analytics): report detected email providers and identify signup runs #1506). Otherwise the step never shows. A flag that is off, missing or failed to load means no question, and the run never waits on it.

  • The question (EmailProviderOfferScreen, a new email-provider-offer step, the run's last, after the MCP step): "Yes, show me how", "Not now", "No thanks". It asks once per run. Every answer ends the run, and after "Yes" the next key does.

    • Enter answers only after the question has been open for 1 second with no key in between, so an Enter held or repeated from the MCP step can't answer yes unread.
    • Esc skips at once, since it can only decline. Esc or Ctrl-C counts as skipped.
    • While a terminal too small for the Wizard hides the screen, the question counts as not shown and takes no key.
  • After "Yes":

    Let the setup agent add your first email send to your server code. Run this in apps/web:
    npx @posthog/wizard@latest email --project-id 42 --install-dir=.
    Or set up email in Workflows: https://us.posthog.com/project/42/workflows?source=wizard_cli
    
    • --project-id keeps the email run on the project this install used, and --install-dir=. outranks an exported POSTHOG_WIZARD_INSTALL_DIR. Neither comes from the user, so both stay on every run.
    • "Run this in …" names the install directory in text only when its name is plain: letters, accents and digits in any script, a plain space, and ._-/\:@+,~'(). A directory with any other character, or a run pinned with --base-url, gets "Run this in your app" (plus "adding the --base-url this run used"). Nothing the user typed is printed into the command.
    • The Workflows link is built by parsing the app host and clearing its credentials, so a pinned URL with a user, a password or a line break prints clean. A host that doesn't parse means no offer.
    • The same lines go to the exit summary in scrollback.
  • Events, through wizardCapture: wizard: email provider offer shown with providers (every detected kind), and wizard: email provider offer answered with providers and answer (yes, not_now, no, skipped). Neither sets anything on the person.

  • Ctrl-C and signals deliver the answer (src/tui/run.ts): after a successful run the run report has already gone out, so the process could exit before a skipped event left. The signal handler now unmounts first, then awaits the shutdown and a flush, within the 2-second report budget.

Test plan

  • Gates on 88b08b32: pnpm typecheck green, pnpm lint with no errors, and the full suite green (297 files, 4555 tests) apart from the known cold-import timeout in cli.test.ts "accepts us as a valid region", which passed on rerun (44 of 44).

  • New and changed tests, each red when its line is broken:

    • email-setup-command.test.ts: the full command on every branch; the directory named for a subdirectory, an outside path, decomposed accents and ..web; no directory for control, bidi, line-separator, $(…), backtick, no-break-space or emoji names; no URL and no directory for a pinned run.
    • email-provider-offer.test.ts: a blank --base-url pins nothing; the Workflows link on a pinned instance drops credentials and line breaks and keeps IPv6; an unparseable host means no offer.
    • EmailProviderOfferScreen.test.tsx: what the person sees after "Yes" and in the exit summary for a plain run, a pinned run with credentials, and a non-plain directory; Enter ignored for the first second; Esc at once; an Enter held from the previous screen with a first repeat at 700 ms never answers yes; Enter held through the real MCP step into the question never answers yes, and fails the test with the guard off; a hidden question counts and takes nothing.
    • run-offer-delivery.test.tsx: through runTui and the real Analytics with a recording transport, a Ctrl-C on the question delivers skipped, and a stalled ingestion still exits within the 2-second budget.
  • Wizard walk on d67e4faf, 19 Nov, with the question after the MCP step. The commits since change only tests. The real interactive Wizard ran in a PTY, launched from the parent of apps/web, with a real agent install into a Next.js app that sends with resend, in a sandbox project. The MCP step was answered with real Enter presses. One install per row:

    Run At the question What happened Events
    Yes Enter, then any key The setup lines, then the Wizard closed; scrollback holds "Run this in apps/web:", the command and the Workflows link; exit 0 shown, answered yes
    Not now Down, Enter The Wizard closed; no email lines in scrollback; exit 0 shown, answered not_now
    No thanks Down, Down, Enter The Wizard closed; exit 0 shown, answered no
    Esc Esc The Wizard closed; exit 0 shown, answered skipped
    Ctrl-C Ctrl-C Back at the shell; exit 130 shown, answered skipped
    Held Enter Enter held through both MCP screens (first repeat at 500 ms, then every 33 ms), then Down, Enter The held key reached the question and answered nothing; exit 0 shown, answered not_now

    Every event carried providers: ["Resend"] and nothing in $set beyond $app_name. The Enter that left the MCP step never answered the question.

    Two rows come from the 18 Nov walk on 4038df17, before the reorder. The screen code they exercise is unchanged since:

    Run At the question What happened Events
    Too-small terminal Resized to 70x24, Enter while hidden, back to 120x40, Not now Enter while hidden answered nothing shown only once visible, answered not_now
    Non-plain directory Install dir with a right-to-left override, Enter "Run this in your app:" and the full command, no directory; no override in scrollback shown, answered yes

    The question after the MCP step

    After Yes: run the email command in apps/web, or set up email in Workflows

    After Yes and any key: the Wizard closed and left the command and link in scrollback

    Enter held through the MCP step: the question stays open with nothing answered

    The other answers, and the 18 Nov rows

    The MCP step just before the question

    Not now highlighted

    No thanks highlighted

    After Esc: the Wizard closed

    After Ctrl-C on the question: exit 130, back at the shell

    18 Nov: install dir with a right-to-left override: "Run this in your app", the full command, no directory

    18 Nov: a 70x24 terminal hides the question; Enter here answered nothing

Known issues

Accepted under Michael's stop rule for this PR (2026-11-18, "Command only when plain (Recommended)"): after the last read, majors and below are listed here, not fixed.

  • src/tui/programs/posthog-integration/screens/EmailProviderOfferScreen.tsx:103: a held Enter whose first key repeat comes 1 second or more after the press can still answer yes. No terminal input reports a key release, so any guard has a threshold. Michael accepted this limit.
  • src/tui/programs/posthog-integration/email-setup-command.ts:48: when the directory can't be shown, or the run was pinned, "Run this in your app" doesn't name the directory. Someone who pastes from a monorepo root still has to change into the app first.
  • src/programs/posthog-integration/email-provider-offer.ts:46: a parseable non-web pinned URL, such as file:, passes the link check. A run only reaches the offer after its API calls to that host succeeded.
  • src/programs/posthog-integration/email-provider-offer.ts:44: the comment credits parsing for clearing credentials, which the two assignments below it do.
  • src/tui/programs/posthog-integration/screens/EmailProviderOfferScreen.tsx:150: while a too-small terminal hides the question, arrow keys still move the highlighted choice, so a different one can be highlighted after the resize. Answering still needs Enter on the visible question.
  • src/tui/programs/posthog-integration/screens/EmailProviderOfferScreen.tsx:170: the setup lines after "Yes" can be dismissed by any key while a too-small terminal hides them. They stay in the exit summary.
  • src/tui/programs/posthog-integration/screens/__tests__/EmailProviderOfferScreen.test.tsx:250: the pinned-run and non-plain cases check the exit summary through the formatter, not through the host's scrollback. The walk checked scrollback on a plain and a non-plain run, not a pinned one.
  • src/tui/__tests__/run-offer-delivery.test.tsx:136: the Ctrl-C test takes the interrupt from a mocked mount, not a real one.
  • src/tui/__tests__/run-offer-delivery.test.tsx:195: the stalled-ingestion test checks only that the exit comes within the budget, so it would also pass if the host exited before trying the flush.

LLM context

Agent context, decisions and involvement

Built by Claude Code, Claude Opus 5.5 (claude-opus-5-5), first as lane wiz-offer of the Wizard email map. The 18 Nov revision is a takeover by the same model.

Question Answer Who Where
Ask about the email provider in the Wizard? Yes, one question at the end of the install, measured; never in CI, headless, or with sharing off 👤 PR history
What does the question say? What PostHog does, with no provider names; "Yes, show me how", "Not now", "No thanks" 👤 PR history
What gates it? A dedicated flag at 0%, not the Workflows launch flag 👤 PR history
Do providers or the answer go on the person? No, events only 👤 #1493
Does the empty migrate command slot stay? Yes, as the seam for the migrate family 👤 PR history
Where does "Yes" lead? To the email command for this project, with Workflows as the other way in 🤖 lane ticket
When does "Yes" name the directory? Only for a run with no --base-url and a plain directory name, by a strict allowlist; otherwise "Run this in your app". Rejected: quoting the path or the URL per shell, which three review rounds kept breaking 👤 lane ticket
Does the fallback command drop its flags? No. Michael's design said "without flags"; his aim was that nothing user-supplied reaches the command. --project-id and --install-dir=. aren't user-supplied, and without them the run can land in another app or project 🤖 review round 4
How long does the question ignore Enter? 1 second of quiet, restarted by every key. A first key repeat at 1 second or later is a known issue 👤 lane ticket
Majors after the last read? Listed under Known issues, no further read 👤 lane ticket
Gate judge findings on the final head? Listed under Known issues and the risk callout under Michael's stop rule; fixes go to one follow-up PR after merge 🤖 lane ticket
Where does the question sit? Last, after the MCP step, so every answer ends the run. Edwin Lim's change in d67e4faf, kept as the reviewing team's choice; 88b08b32 adds a test that Enter held from the MCP step can't answer 👤 review, d67e4faf
Merge #1508 at 88b08b32? Yes, without a further review read; Edwin Lim (team-wizard-docs) approved, and the only runtime change since the last read is his reorder, which the walk covers 👤 lane ticket
Restore the branch's deadline on every user read? No, main's #1506 keeps it on signup only; a follow-up 🤖 lane ticket
Simplify Analytics.shutdown to always flush? Not in this PR; it changes every host's terminal path 🤖 PR history

Involvement: no grilling rounds, no prototypes. Reviews: two fleet panels and three full-diff reads on the fork (GPT-6.1 Sol and Claude Opus 5.5). On 18 Nov, five GPT-6.2 Sol rounds and one final read. Valid blockers and majors were fixed test-first through round 4. Two fix commits whose round-3 blockers came back were reverted, Michael chose the design, and round 5 closed under his stop rule. On 19 Nov, Edwin Lim (team-wizard-docs) moved the question after the MCP step and updated the tests to match.

Follow-ups:

  • One follow-up PR: take no picker input while the question is hidden, ignore dismissal while the setup lines are hidden, require an http(s) host for the link, fix the comment, say to change into the app first, and drive the cancellation tests through a real mount.
  • "Run this in your app" could tell the person to change into the app when the directory can't be shown.
  • The Workflows link check could require an http(s) host.
  • Analytics.shutdown could always flush, which would let the TUI host drop its extra flush.
  • A deadline on ordinary-login user reads, which main lacks.
  • After "Yes", the screen says "Press any key to continue", but the key now closes the Wizard. The lines stay in scrollback.
  • cli.test.ts "accepts us as a valid region" sits near its 5-second timeout on a cold import.

🤖 Generated with Claude Code

How did you test this code?

Proof What ran Result Commit
live-run Wizard walk on d67e4fa: 6 real agent installs in a PTY with the offer after the MCP step (yes, not now, no, Esc, Ctrl-C, Enter held from the MCP screen) Each sent shown and one answered with the typed answer (held Enter: not_now, no false yes), providers Resend, nothing on the person; exit 0 (130 for Ctrl-C); after Yes the exit summary printed the command and link 88b08b3 (reused from d67e4fa)
ui-walk Wizard walk on d67e4fa in a PTY: the MCP step, then the question, all five answers and a held Enter The question opens after MCP, ignores an Enter held from MCP, and every answer ends the run; Yes leaves the command and link in scrollback 88b08b3 (reused from d67e4fa)
prod-shape Grouped 30 days of prod wizard: email providers detected events by provider kinds and build, and counted prod sessions with an agent completion over the same window measured on production; details in the receipt 88b08b3 (reused from 4038df1)
Review 8-lens panel (claude-opus-5-5, gpt-6.2-sol), round 1, round 2, final read 1, round 3, round 4, round 5 87 findings: 49 fixed, 32 rejected, 6 other eecdaa8 to 4038df1
Proof judge an independent model reads the evidence against the diff not yet run at 88b08b3

Not checked: none recorded
Full receipt (PostHog team): https://artifacts.posthog.com/a/N1lGBCZjnxrHDDc0Y5dgsZ

Silthus and others added 16 commits October 31, 2026 09:54
The codebase scan already finds email-sending services such as Resend.
Set them on the person as wizard_detected_email_providers and
wizard_detected_email_provider_at, through $set on the
`warehouse sources detected` event. A $set captured before login is set
again at identify, so it reaches the person who uses the PostHog app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set the person properties when the scan is shared after login, so CI,
headless, warehouse and self-driving runs set them too, and drop the
pre-login replay in Analytics. Count Campaign Monitor, ConvertKit,
beehiiv and Drip as email providers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Read the new account's user after provisioning and identify it, as the
OAuth login does, so a signup run's events and the detected email
providers land on its person. A failed read keeps the signup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A login without a user, such as a signup whose user could not be read,
has no person to set them on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An interactive install run whose scan found an email provider now asks
one question after the outro: try sending email with PostHog Workflows?
The answer goes out as `wizard: email provider offer answered` and is
set on the person. Yes shows a link to Workflows in the project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entified

A signup whose user read failed logs in without identifying the user, so
the answer and its person properties would land on the anonymous person.
The offer now also needs the session's user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Ctrl-C or signal after a successful run now waits for its analytics
flush, so a slow network could hold the process after the terminal is
restored. The signal path races the report against the same budget as a
screen's exit request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l together

The offer held provider kinds and labels in two arrays that had to stay in
step. It now holds one non-empty list of kind and label pairs; the copy
reads the labels and the events send the kinds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 2, 2026

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 feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /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/flutter
  • /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 feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /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
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a Context Mill branch:

  • /wizard-ci all context-mill:my-branch

Add context-mill:<branch> to any command above to pin the Context Mill branch. It defaults to main.

Results will be posted here when complete.

@Silthus
Silthus added this pull request to stack #1509 November 2, 2026 07:04
Silthus and others added 4 commits November 2, 2026 14:48
…-offer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rson

Setting them on the person can track more than the user agreed to.
Send the kinds once per run on `wizard: email providers detected`
instead, after login and under the same sharing gates, and drop
setPersonProperties.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-offer

# Conflicts:
#	src/services/codebase-scan/email-providers.ts
The answer already rides on `wizard: email provider offer answered`.
Drop the $set of wizard_email_offer_answer and _answered_at, so the
offer writes nothing to the person.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus and others added 5 commits November 3, 2026 10:42
Each attempt had its own 10-second timeout, so a stalled remote read
ran about 32 seconds across its retries. Share one AbortSignal deadline
across the attempts, and don't retry a cancelled request. Drop a
duplicate assertion from the email provider event test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 10-second deadline cancelled each request but not the wait between
retries, so a late 503 plus 1.5 s of backoff ran past it. retryTransient
now takes the signal, cuts its backoff short when it aborts, and throws
the last failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The question opens with the cursor on "Yes, show me how", so a quick
second Enter meant for the outro answered yes before the question could
be read, inflating the yes share the offer measures. The picker now
ignores Enter for 500 ms after the question opens. Esc and arrow keys
still work at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The question named the providers the scan found and its decline choice
named the provider again. It now says what PostHog does, with no
provider names: PostHog can send this app's transactional emails
directly from code, with delivery and engagement events next to your
product analytics. The decline choice is "No thanks". Detection and the
analytics properties still carry the providers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from feat/detected-email-providers to main November 13, 2026 14:15
Silthus and others added 8 commits November 18, 2026 10:01
Quoting a path for every shell kept leaving cases cmd.exe or PowerShell
read differently. The screen now says where to run the email command,
and the command carries only --project-id, so no shell parses the path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An exported POSTHOG_WIZARD_INSTALL_DIR would point the command at
another directory. It now ends in --install-dir=., which outranks the
variable and needs no quoting, and the screen test builds its paths
with path.join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Count and take an answer only while the question is on screen, and only
  after a pause, so a held Enter or a too-small terminal can't answer it.
- Print the email command and Workflows link in the exit summary after yes.
- Carry the run's --base-url into the email command.
- Report a Ctrl-C's cancelled run without a time limit; give only the
  final flush the budget.
- Test delivery at the ingestion boundary instead of mocking the client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Wait a full second before the question takes an answer, longer than a
  held key's first repeat on default desktop settings.
- Pass --base-url unchanged, path included, and single-quote it when a
  shell could expand it.
- Show control characters in the directory name as "?".
- Check that a stalled Ctrl-C report exits within its budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Keep --base-url in the command only when no shell can expand it, and
  otherwise ask in text to add the one this run used. Trim it first, as
  host resolution does.
- Show a directory name with control characters escaped, so it can't
  read as a different directory.
- Let Esc skip at once; it can only decline, so it needs no read guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit 9bc725b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit b089312.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Yes" shows the full `email --project-id N --install-dir=.` command only
when the run had no --base-url and the install directory's name is
plain text: letters, accents and digits in any script, a plain space,
and the punctuation paths use. Otherwise it shows the Workflows link
and names the `email` command without flags, so nothing the user
supplied is printed into a command.

Brings back the 1 s read guard, Esc that skips at once, the visibility
checks, the exit summary, and the stalled Ctrl-C test's deadline from
the reverted fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus
Silthus force-pushed the feat/email-provider-offer branch 2 times, most recently from 314e18d to 8ee245c Compare November 18, 2026 19:47
The command keeps `--project-id` and `--install-dir=.` on every branch:
neither comes from the user, and without them an exported install dir
or a different project grant could send the email run elsewhere. Only
the line above it changes for a pinned or non-plain run.

The Workflows link is built by parsing the app host, which drops
credentials and line breaks from a pinned URL; a host that doesn't
parse means no offer. A blank --base-url pins nothing, as in host
resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus
Silthus force-pushed the feat/email-provider-offer branch from 8ee245c to 4038df1 Compare November 18, 2026 19:55
@Silthus
Silthus marked this pull request as ready for review November 19, 2026 03:50
@Silthus
Silthus requested a review from a team as a code owner November 19, 2026 03:50
@Silthus
Silthus requested a review from a team November 19, 2026 03:50
@veria-ai

veria-ai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@posthog-security-review-bot posthog-security-review-bot Bot added the security-review Request a security review label Nov 19, 2026
@posthog-security-review-bot

posthog-security-review-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

✅ Security review complete — 4038df1786d5

No findings above the confidence threshold, in 6 min.

Add the security-review label to run again on the latest commit.

@posthog-security-review-bot posthog-security-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Agent-driven security review - no findings.

@posthog-security-review-bot posthog-security-review-bot Bot removed the security-review Request a security review label Nov 19, 2026
@Silthus
Silthus removed the request for review from a team November 19, 2026 04:00
The email provider offer is now the last screen of the default flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@edwinyjlim edwinyjlim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good to go. i moved the email screen after the MCP install which takes priority rn

i think we can come up with a better email conversion flow, but let's get it in the wizard for v1

edwinyjlim and others added 2 commits November 19, 2026 11:55
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The quick-Enter test still passed with the read guard switched off: its one
press landed before the picker mounted. Hold Enter through the MCP-to-offer
transition instead, then show the picker takes a key after a pause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus
Silthus merged commit a695952 into main Nov 20, 2026
22 checks passed
@Silthus
Silthus deleted the feat/email-provider-offer branch November 20, 2026 04:52
@Silthus

Silthus commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Still owed after merge:

  • Release: this ships in 2.99.0, release PR chore(main): release 2.99.0 #1583. Nothing changes for users until that is published to npm.
  • Flag: wizard-email-provider-offer stays at 0% until it is widened on purpose. Both conditions from the risk note hold now: workflows-email-from-code is at 100%, and npm latest has the email command. Widening still waits for Michael's word.
  • Cross-version check: once 2.99.0 is published, run the command the Yes screen prints (npx @posthog/wizard@latest email --project-id … --install-dir=.) from the published package against a test project.
  • Post-deploy watch: after the flag widens, watch wizard: email provider offer shown and answered for the first runs.
  • One follow-up PR for the known issues: no picker input while the question is hidden, no dismissal while the setup lines are hidden, an http(s)-only Workflows link, the comment fix, "change into your app first" in the fallback, and cancellation tests through a real mount.
  • Copy: after "Yes", "Press any key to continue" now closes the Wizard. It should say so.

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