Repository navigation
Description
Map: Map: build the Workflows first run, from template gallery to first send
Spec: Spec: Workflows first run
Cast: Opus 5.5 (UI)
Question
Does the first run tell people who its first emails reach, and how to send from their own domain?
Delivers end to end. Spec section "Who the first sends reach (waits on #254)". Builds on Make it yours and the draft and sending banners. Implements the answer on Shared sender or members-only (option C).
Answer on #254 (Michael, 2026-10-05): C, members-only now. First sends reach verified members of the team's organization only, until the team sends from its own domain.
- Show the numbers. The helper under "Enable workflow" and both banners name the sender address and say, as numbers, who the workflow reaches and who it does not:
- reaches: the organization's verified members, as a count;
- does not reach yet: the people in this project who have an email address, as a count.
- Both counts come from the shared workflow email reach endpoint that the Workflows AI links and reach effort builds (agreed 2026-10-05). Do not add count queries here. The endpoint is feat(workflows): use site links and report email eligibility PostHog/posthog#111750:
GET /api/projects/:team_id/hog_flows/email_reach/returnsverified_member_count,project_email_countandemail_senders, with the generatedEmailReachtype. Stack on that PR, or build onmasteronce it has merged. - Example shape, not final copy: "Sends to your 3 teammates. 1,240 people in this project get it once you send from your own domain."
- One clear call to action. "Send from your own domain" is the main next step in both banners and under the switch, not a quiet line. It opens the email domain wizard (feat(workflows): open the email domain wizard from channels, configure and broadcasts PostHog/posthog#110088 and its stack) when that is on master. Until then it opens Channels. Keep the target in one place so switching to the wizard is a one-line change, and record the follow-up on this ticket.
- Own-domain states: none, the call to action above; verifying, says it is verifying; verified, nothing, because the switch banner from #238 takes over.
- Copy does not promise opens and clicks from the sandbox sender.
- Copy through
/writing-user-facing-copy. State the sender rule as a product rule.
Test seams. A kea logic test with the API mocked at the HTTP layer: both counts from the shared reach endpoint, the line for each own-domain state, and nothing while the workflow is already on an own sender. Stories for each state at full width and 520px.
Write scope. The first-run folder under products/workflows/frontend/, and tests and stories.
Overlap: #238 owns the switch banner; do not duplicate its switch. The email domain wizard (PostHog#110088 and its stack) owns domain setup; link to it, do not change it.
Acceptance criteria
- The helper and the banners name the sender and show how many people the workflow reaches and how many it does not reach yet.
- "Send from your own domain" is the main call to action and opens the email domain wizard, or Channels until the wizard is on master.
- Each own-domain state shows its line, and a verified domain shows none beside the switch banner.
- Screenshots on this ticket.
How to build (map #253)
/implement+/tddred-green-refactor, outside-in, at the seams named above. The frontend mocks the API at the HTTP layer. Mock only what is external: the LLM and the PostHog analytics client.- Repo skills apply where the diff touches their area:
/writing-tests,/improving-drf-endpoints,/writing-ui-components,/writing-kea-logics,/adopting-generated-api-types,/placing-product-frontend-code,/writing-user-facing-copy,/writing-code-comments. - Branch from
upstream/master, push to the fork, open a draft PR onPostHog/posthogagainstmaster. A stacked PR carries its parent's commits and a "Stacked on" note. - Then
/qa-swarm. Shipped means a draft PR it handed off. Never mark ready, enqueue or merge. - Public repo: state sender rules as product rules. Fixture addresses use
example.com. The prototype is throwaway: read it for behavior, never copy or cherry-pick it.
Activity
Silthus commentedon Oct 5, 2026
Amended by the conductor after #254 resolved as option C (Michael, 2026-10-05, origin https://posthog.slack.com/archives/C06GG249PR6/p1791188180453239): reach shown as numbers, and the own-domain line becomes the main call to action through the email domain wizard.
Silthus commentedon Oct 5, 2026
Seam agreed with the Workflows AI links and reach effort (thread on devbox-michaelr-2): it owns a shared read-only workflow email reach endpoint and MCP tool. Reachable = active, email-verified members of the organization (the sandbox sender's rule). Not reached yet = persons in the project with an email, counted through HogQL. This ticket consumes it and adds no queries of its own. Waiting on its draft PR link here before dispatch.
Silthus commentedon Oct 5, 2026
Shared reach endpoint is in draft PostHog#111750 (
GET /api/projects/:team_id/hog_flows/email_reach/, fieldsverified_member_count,project_email_count,email_senders, generated typeEmailReach). Counts are eligibility totals, not a forecast of trigger events. This ticket builds on it.Silthus commentedon Oct 5, 2026
Runtime: Claude Code background agent in conductor thread
mcp:53aaf922-c8de-490b-8df2-687a523ef55f(devbox-michaelr-3)Worker:
impl-264, Claude Opus 5.5Worktree:
/home/coder/.t3/worktrees/posthog/fr-264, branchfeat/workflows-first-run-reachfromfeat/workflows-first-run-bannersatc90a96ea6a3plus a merge offeat/workflows-ai-email-context(stacked on PostHog#112076 and PostHog#111750)Review: one cross-family review (Codex adversarial-review), per the map's updated rule; this replaces the body's qa-swarm line
Cap: 4 hours from 18:31 UTC (deadline 22:35 UTC)
CodeRabbit slot: 3 of 3 (the CLI is signed out, so expect a skip)
Silthus commentedon Oct 5, 2026
Resolution
Draft PR: PostHog#112095, stacked on PostHog#112076 and PostHog#111750.
Reviewed head:
f1d6bfa2894b115190e9f3ebde86b0fe4c5dbbaf. Review base:62f5c9a(the merge offeat/workflows-ai-email-contextinto the banners branch).What ships
GET /api/projects/:team_id/hog_flows/email_reach/. No new count queries.ownDomainSetupUrlinFirstRunReachLine.tsx.Proof
firstRunReachLogic.test.ts(kea logic, API mocked at the HTTP layer) andfirstRunReachCopy.test.ts. The red output is in the PR's "How did you test this code?" section.products/workflows/frontend/firstRun/pass with none skipped,typescript:checkclean,oxlintandoxfmt --checkclean on the touched files. The merge-touchedemail.service.test.tsandutm.test.tspass under flox.Review
fr-264-base): one finding, fixed inf1d6bfa. Zero counts fell back to the copy for missing counts. They now show as numbers, and an empty project says no one has an email address yet./merge-risk: low. No danger area, so noqa-swarm.Decisions within scope
nodejs/.../email.service.ts, its test, andbroadcastTestSendLogic.ts. The resolution tags UTMs on the delivered params, so sandbox sends keep both the tags and the identification footer.constants.tsx; master carries them unsorted.Follow-ups for the conductor
ownDomainSetupUrlinFirstRunReachLine.tsxto open it.hogli pr:upload-imagerefused this account, so the screenshots live on the fork branchassets/feat/workflows-first-run-reach. The PR could not set an assignee for the same reason.