feat(pm): webhook UX manifest migration + legacy WebhookStep retirement (spec 012)#1149
Merged
zbigniewsobiecki merged 10 commits intodevfrom Apr 18, 2026
Merged
Conversation
Spec 012 (PM Webhook Manifest Migration) and its 4-plan decomposition. Closes the final gap from spec 011 — moves each provider's webhook- creation UX from the legacy WebhookStep + LinearWebhookInfoPanel into manifest-path webhook adapters in each provider's folder. Plans: 1-trello-webhook (programmatic create + active list + delete + curl fallback composed with shared WebhookUrlDisplayStep), 2-jira-webhook (JIRA equivalent + jiraEnsureLabels preserved), 3-linear-webhook (signing-secret via ProjectSecretField + 5-step instructions; removes the -webhook filter from pm-wizard.tsx), 4-cleanup (delete legacy WebhookStep + LinearWebhookInfoPanel + 2 hooks + legacy test file + empty legacy slot; rewrite docs + close spec 011 coverage-map). Strategic decisions (composition over widening; keep flag-based webhooks.* tRPC endpoints as-is; linear migration sequence) documented in spec. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
…est path
First of three per-provider webhook migrations. Moves Trello's
webhook-creation UX from the legacy `WebhookStep` into a new manifest-
path adapter `TrelloWebhookAdapter`. All `webhooks.*` tRPC endpoints
reused verbatim (no backend change); only the render path moves.
- web/src/components/projects/pm-providers/trello/webhook-step.tsx:
new file. Fragment composing the shared `WebhookUrlDisplayStep` (URL
+ copy) with Trello-specific UX — active-webhooks list with status
dots + delete buttons, "Create Webhook" button wired to
`webhooks.create({ trelloOnly: true })`, curl fallback template with
`trelloBoardId` interpolated.
- trello/wizard.ts: extend `TrelloProviderHooks` with webhook
plumbing (callbackBaseUrl, activeTrelloWebhooks, createTrelloWebhook,
deleteTrelloWebhook, loading/error states). Inline the
`useWebhookManagement` formula in `useProviderHooks` (legacy hook
gets deleted in plan 012/4). Replace old `TrelloWebhookDisplayAdapter`
(URL-only) with `TrelloWebhookAdapter`.
- pm-wizard.tsx: adjust filter from `.endsWith('-webhook')` to
`id !== 'jira-webhook' && id !== 'linear-webhook'`. Trello's webhook
step now passes through the manifest iteration; JIRA + Linear still
route through legacy `WebhookStep` until plans 012/2-3.
10 new tests in `tests/unit/web/trello-webhook-step.test.ts` covering
URL display, active-list rendering, Create button disabled/enabled
states, curl interpolation, delete button count, Linear-secret
regression guard.
Full suite 8177/8177, lint + typecheck + build all green.
Closes plan 012/1 of spec 012.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
…path
Second of three per-provider webhook migrations. Same Fragment-
composition pattern as plan 012/1's Trello adapter.
- web/src/components/projects/pm-providers/jira/webhook-step.tsx:
new file. Fragment composing shared `WebhookUrlDisplayStep` + active
list + Create button + curl fallback (JIRA REST API v1 endpoint
preserved verbatim — legacy used `/rest/webhooks/1.0/webhook`; v3
migration is out of scope) + per-webhook delete buttons.
- jira/wizard.ts: extend `JiraProviderHooks` with webhook plumbing;
inline `webhooks.list/create/delete({jiraOnly:true})` in
`useProviderHooks`. Replace old `JiraWebhookDisplayAdapter`
(URL-only) with `JiraWebhookAdapter`. jiraEnsureLabels side-effect
runs server-side inside webhooks.create — no frontend change needed
to preserve it.
- pm-wizard.tsx: adjust filter to `id !== 'linear-webhook'`. JIRA's
webhook step now passes through manifest iteration; only Linear
still routes through legacy `WebhookStep`.
10 new tests in `tests/unit/web/jira-webhook-step.test.ts`.
Full suite 8187/8187, lint + typecheck + build all green.
Closes plan 012/2 of spec 012.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
…est path Third and final per-provider webhook migration. Linear has no programmatic registration (Linear's API forbids it), so the adapter is a Fragment of shared WebhookUrlDisplayStep + info banner + ProjectSecretField + 5-step setup instructions. No Create/delete/curl. - web/src/components/projects/pm-providers/linear/webhook-step.tsx: new file. Extracts the inlined `LinearWebhookDisplayAdapter` from `linear/wizard.ts` and extends it with the 5-step setup instructions that previously lived in the retiring `LinearWebhookInfoPanel` (plan 012/4 deletes the panel). Fragment composition; the secret field is NOT a controlled input — `ProjectSecretField` self-manages its server round-trip via project-credentials tRPC endpoints. - linear/wizard.ts: delete the inlined `LinearWebhookDisplayAdapter`, import + use the new component. No `useProviderHooks` changes — plan 011/4 already exposed `projectIdForSecret` + `webhookSecretCredential`. - pm-wizard.tsx: remove the `-webhook` id-skip filter entirely. `renderedManifestSteps = manifestDef.steps.map(...)` with no filter. All three providers now route through the manifest path. The legacy `WebhookStep` slot still renders but no provider's state matches its Trello/JIRA/Linear branch conditions — it's a no-op until plan 012/4 deletes the slot entirely. 7 new tests in `tests/unit/web/linear-webhook-step.test.ts`. Same `ProjectSecretField` mock pattern as plan 011/1 (React-instance mismatch from web/node_modules). Full suite 8194/8194, lint + typecheck + build all green; `regression-2026-04.test.ts` still passes (adapter untouched). Closes plan 012/3 of spec 012. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
…acy test + docs close Closes spec 012 and the final gap from spec 011. Every PM wizard step, without exception, now renders via the manifest path. Deletions: - `WebhookStep` export from pm-wizard-common-steps.tsx (file kept — `SaveStep` still live; the provider-agnostic step patterns going forward live inside each provider's folder). - `LinearWebhookInfoPanel` export from the same file. - `useWebhookManagement` + `useLinearWebhookInfo` from pm-wizard-hooks.ts (each provider's `useProviderHooks` now inlines the `webhooks.*` tRPC + callbackBaseUrl formula). - pm-wizard.tsx: legacy webhook `<WizardStep>` slot + the `webhookStepNumber` / `activeWebhooks` / `linearWebhookUrl` / `linearWebhookSecretCredential` / `webhooksQuery` / `webhookManagement` derivations; imports of deleted symbols. Parent wizard now owns only the provider picker (step 1) and the Save step. - tests/unit/web/pm-wizard-webhooks-step.test.ts (-181 lines, 8 tests — assertions now live in the three per-provider adapter tests). Docs: - src/integrations/README.md — five-specs preamble; Post-spec-012 additions section; step-3 guidance updated (Fragment composition pattern for webhook-step extension, alongside `kind: 'custom'` for fully provider-specific steps). - CLAUDE.md (project root) — PM-integration summary references spec 012. - CHANGELOG.md — Internal entry summarizing spec 012 alongside 009/ 010/011. - docs/specs/011-pm-wizard-shared-migration.md.done — forward- reference blockquote to spec 012. - docs/plans/011-pm-wizard-shared-migration/_coverage.md — spec 011 AC #3 marked "closed by spec 012" downstream. - docs/plans/011-pm-wizard-shared-migration/4-linear.md.done — plan 011/4 ACs #3 + #6 marked closed downstream (originally partial). Dead-code grep: only doc-comment references to the retired symbols remain; no live imports. Full suite 8186/8186, lint + typecheck + build all green. Closes plan 012/4 of spec 012. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Four plans of spec 012 (PM Webhook Manifest Migration) shipped. Trello + JIRA + Linear webhook steps migrated to manifest path (plans 1-3); legacy WebhookStep + LinearWebhookInfoPanel + supporting hooks + legacy test file deleted, docs closed (plan 4). Spec marked .done. Every PM wizard step, without exception, renders via the manifest path. Plan 011/4 ACs #3 + #6 fully close. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
3 tasks
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
Closes spec 012 and the final gap from spec 011. Every PM wizard step — without exception — now renders via the manifest path.
Plans shipped (4):
TrelloWebhookAdapter(Fragment composing sharedWebhookUrlDisplayStep+ active-webhooks list + "Create Webhook" button + delete + curl fallback). Trello's wizardSpectrello-webhookstep now renders via the manifest path;-webhookid-skip filter adjusted to exclude Trello.JiraWebhookAdaptermirrors the Trello pattern. JIRA'sjiraEnsureLabelsside-effect preserved server-side (adapter calls unchangedwebhooks.create({jiraOnly:true})endpoint).LinearWebhookAdapter(Fragment composing sharedWebhookUrlDisplayStep+ info banner +ProjectSecretFieldbound toLINEAR_WEBHOOK_SECRET+ 5-step manual-setup instructions). Linear has no programmatic registration — no Create/delete/curl.-webhookfilter removed entirely frompm-wizard.tsx.WebhookStep+LinearWebhookInfoPanel+useWebhookManagement+useLinearWebhookInfodeleted.pm-wizard-common-steps.tsxnow only exportsSaveStep. Legacypm-wizard-webhooks-step.test.tsdeleted (−181 lines). Docs rewritten (five-specs preamble, Post-spec-012 additions section, updated step-3 webhook guidance). Plan 011/4 ACs chore: update llmist and zangief dependencies #3 + chore: sync dev to main #6 closed downstream.Outcome:
pm-wizard.tsx) owns only the Provider picker (step 1) and the Save step. Every other step comes frommanifestDef.steps.pm-wizard.tsx,pm-wizard-common-steps.tsx,pm-wizard-hooks.ts).webhook-step.tsx.Test plan
npm test— 8186 passed / 23 skipped (net +11 tests vs pre-spec: +10 each for Trello + JIRA + 7 for Linear, −8 legacy)npm run lint— cleannpm run typecheck— greennpm run build— greenpm-conformance.test.ts— all three providers pass the behavioral harnessregression-2026-04.test.ts— Linear adapter untouched, regression tests passnew-provider-surface.test.ts— 7 shared step files pinned; new-provider invariant enforceableWebhookStep,LinearWebhookInfoPanel,useWebhookManagement,useLinearWebhookInfo) — only doc-comment references remainjiraEnsureLabelsside-effect; Linear signing-secret save/load/clear + 5-step instructions. Per-plan AC fix: improve PostgreSQL startup reliability and agent documentation #9 in plans 1-3 is marked deferred pending this check — that's why this PR exists.Follow-ups
webhooks.create/list/deletetRPC endpoints beyond flag-based{trelloOnly, jiraOnly}discriminator; extending manifest pattern to SCM (GitHub) or alerting (Sentry).🤖 Generated with Claude Code