You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cast: Opus 5.5, high
Repository: PostHog/posthog (frontend)
Question
Can a person open one fixed link and land on their project's API sends?
Delivers end to end. A frontend route /project/{id}/workflows/api-sends, registered in the Workflows manifest. It lists flows with ?type=api_send and replaces the URL with that flow's Invocations tab. With no flow it shows "No emails sent through the API yet" and a link to the docs page; it never creates the flow. No other Workflows UI change. Spec section: "API sends redirect route".
Test seams. A kea logic test for the route's logic: with a flow it redirects to the Invocations URL; without one it reports the empty state and makes no write request.
Write scope.products/workflows/manifest.tsx, a small new scene and logic under products/workflows/frontend/, their test. Copy through /writing-user-facing-copy; components per /writing-ui-components.
Proof.
Red: the logic test for the redirect fails (no route).
Green: both cases pass.
Local: open the link on a dev team before and after creating the flow from a Django shell; screenshots of the empty state and the landed Invocations tab go in the PR.
Acceptance criteria
With a flow, the link lands on its Invocations tab and the back button does not loop.
Without a flow, the empty state shows and no flow is created.
/tdd red-green-refactor, outside-in, at the seams named above. Real Postgres, Valkey and ClickHouse; mock only what the seam section allows.
Repo skills apply where the diff touches their area: /writing-tests, /improving-drf-endpoints, /django-migrations, /adding-api-scopes, /writing-ui-components, /writing-kea-logics, /writing-user-facing-copy, /writing-code-comments.
Public repo: no usage numbers, customer names, internal metrics, Slack content or security reasoning in code, commits or the PR. Fixture addresses use example.com. The private note the map points at is background only; never quote it.
Shipped means a draft PR handed off for review (see the map's Notes for remotes and branches). Never mark ready, enqueue or merge.
Runtime: Claude Code background Agent
Worker: implement-473-api-sends-redirect
Cast: Opus 5.5, high. Wall-time cap: 120 minutes.
Lands on integration branch spec/email-send-api, in parallel with the other open ticket on it (scopes do not overlap).
Landed on spec/email-send-api as a fast-forward from 38d8566764f.
Landed commit:64ab79c5a68 (feat(workflows): open api sends from a fixed link)
What landed
products/workflows/manifest.tsx: the scene WorkflowsApiSends, the route /workflows/api-sends and urls.workflowsApiSends(). The route sits before /workflows/:tab, because the scene router takes the first match. Without that order the link opens as a Workflows tab. frontend/src/products.tsx and productScenes.tsx are regenerated.
products/workflows/frontend/ApiSends/apiSendsSceneLogic.ts: on mount it calls the generated hogFlowsList with type: 'api_send', limit: 1. With a flow, it calls router.actions.replace(urls.workflow(id, 'invocations')). The link leaves no history entry, so the back button does not loop. A resolution reducer holds loading | redirecting | empty | error. The logic only reads.
products/workflows/frontend/ApiSends/ApiSendsScene.tsx: a spinner while loading or redirecting. EmptyMessage shows "No emails sent through the API yet" with a "Read the docs" button to https://posthog.com/docs/workflows/email-api. An error banner has a "Try again" action.
Green on the landed tree:green.log. Both cases pass.
Gate: the pre-push hogli ci:preflight --strict passed with 0 failures on the push to spec/email-send-api. The frontend tsgo --noEmit reported no errors (typecheck.log). oxlint and oxfmt are clean on the new files.
Rendered: the full App ran in Storybook with MSW mocks, from a scratch story that is not in the commit. All data is mock data.
With a flow, the link lands on the Invocations tab of "API sends": redirect-invocations.png. The two error toasts come from endpoints the scratch story did not mock.
Test seam
apiSendsSceneLogic, mounted after a push to /workflows/api-sends, with the hog flows list mocked through MSW. The mock answers ?type=api_send with the API sends flow or nothing. It answers every other query with an ordinary workflow, so a missing filter fails the test.
With a flow: the pathname becomes /workflows/<id>/invocations and router.lastMethod is REPLACE.
Without a flow: resolution is empty, the URL stays, and the POST and PATCH hog flow handlers get no calls.
Calls I made
Storybook, not the live app. The running dev stack on this box serves another checkout, so I could not load this branch's frontend into it. Storybook rendered the real scene and the real Workflow scene with mocked API responses. The ticket asked for a Django shell flow on a dev team. The mocked list response takes its place.
No feature flag on the route. The flow exists only after a send behind workflows-email-api. Without the flag a person sees the empty state.
Reused EmptyMessage, not ProductEmptyState. This is a single-link landing page, not a product's first-run gate.
No breadcrumbs. The page shows a spinner or the empty state, and then the Workflow scene sets its own.
Follow-ups
The docs link targets /docs/workflows/email-api, which the docs ticket ships.
On this box, the full typescript:check with default checkers reaches the heavy slice's memory limit and stalls. tsgo --noEmit --checkers 1 finishes in about 90 seconds.
Activity
Silthus commentedon Oct 14, 2026
Runtime: Claude Code background Agent
Worker: implement-473-api-sends-redirect
Cast: Opus 5.5, high. Wall-time cap: 120 minutes.
Lands on integration branch
spec/email-send-api, in parallel with the other open ticket on it (scopes do not overlap).Silthus commentedon Oct 14, 2026
Claimed by conductor dispatch. Runtime: Claude Code background Agent, worker implement-473-api-sends-redirect, Opus 5.5 high. Integration branch: spec/email-send-api.
Silthus commentedon Oct 14, 2026
Landed on
spec/email-send-apias a fast-forward from38d8566764f.Landed commit:
64ab79c5a68(feat(workflows): open api sends from a fixed link)What landed
products/workflows/manifest.tsx: the sceneWorkflowsApiSends, the route/workflows/api-sendsandurls.workflowsApiSends(). The route sits before/workflows/:tab, because the scene router takes the first match. Without that order the link opens as a Workflows tab.frontend/src/products.tsxandproductScenes.tsxare regenerated.products/workflows/frontend/ApiSends/apiSendsSceneLogic.ts: on mount it calls the generatedhogFlowsListwithtype: 'api_send', limit: 1. With a flow, it callsrouter.actions.replace(urls.workflow(id, 'invocations')). The link leaves no history entry, so the back button does not loop. Aresolutionreducer holdsloading | redirecting | empty | error. The logic only reads.products/workflows/frontend/ApiSends/ApiSendsScene.tsx: a spinner while loading or redirecting.EmptyMessageshows "No emails sent through the API yet" with a "Read the docs" button tohttps://posthog.com/docs/workflows/email-api. An error banner has a "Try again" action.Proof
Artifacts are on branch
assets/email-api-473.PUSH, notREPLACE, so a back-button loop fails the test. red-wrong-type-filter.log lands on an ordinary workflow and skips the empty state.hogli ci:preflight --strictpassed with 0 failures on the push tospec/email-send-api. The frontendtsgo --noEmitreported no errors (typecheck.log). oxlint and oxfmt are clean on the new files.Appran in Storybook with MSW mocks, from a scratch story that is not in the commit. All data is mock data.Test seam
apiSendsSceneLogic, mounted after a push to/workflows/api-sends, with the hog flows list mocked through MSW. The mock answers?type=api_sendwith the API sends flow or nothing. It answers every other query with an ordinary workflow, so a missing filter fails the test./workflows/<id>/invocationsandrouter.lastMethodisREPLACE.resolutionisempty, the URL stays, and the POST and PATCH hog flow handlers get no calls.Calls I made
workflows-email-api. Without the flag a person sees the empty state.EmptyMessage, notProductEmptyState. This is a single-link landing page, not a product's first-run gate.Follow-ups
/docs/workflows/email-api, which the docs ticket ships.typescript:checkwith default checkers reaches the heavy slice's memory limit and stalls.tsgo --noEmit --checkers 1finishes in about 90 seconds.