Skip to content

feat(pm): webhook UX manifest migration + legacy WebhookStep retirement (spec 012)#1149

Merged
zbigniewsobiecki merged 10 commits intodevfrom
feat/pm-webhook-manifest-migration
Apr 18, 2026
Merged

feat(pm): webhook UX manifest migration + legacy WebhookStep retirement (spec 012)#1149
zbigniewsobiecki merged 10 commits intodevfrom
feat/pm-webhook-manifest-migration

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

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):

  • 012/1 — trello-webhook: TrelloWebhookAdapter (Fragment composing shared WebhookUrlDisplayStep + active-webhooks list + "Create Webhook" button + delete + curl fallback). Trello's wizardSpec trello-webhook step now renders via the manifest path; -webhook id-skip filter adjusted to exclude Trello.
  • 012/2 — jira-webhook: JiraWebhookAdapter mirrors the Trello pattern. JIRA's jiraEnsureLabels side-effect preserved server-side (adapter calls unchanged webhooks.create({jiraOnly:true}) endpoint).
  • 012/3 — linear-webhook: LinearWebhookAdapter (Fragment composing shared WebhookUrlDisplayStep + info banner + ProjectSecretField bound to LINEAR_WEBHOOK_SECRET + 5-step manual-setup instructions). Linear has no programmatic registration — no Create/delete/curl. -webhook filter removed entirely from pm-wizard.tsx.
  • 012/4 — cleanup: WebhookStep + LinearWebhookInfoPanel + useWebhookManagement + useLinearWebhookInfo deleted. pm-wizard-common-steps.tsx now only exports SaveStep. Legacy pm-wizard-webhooks-step.test.ts deleted (−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:

  • Parent wizard (pm-wizard.tsx) owns only the Provider picker (step 1) and the Save step. Every other step comes from manifestDef.steps.
  • Adding a new PM provider touches zero shared orchestration files (pm-wizard.tsx, pm-wizard-common-steps.tsx, pm-wizard-hooks.ts).
  • Provider-specific webhook UX (programmatic create, signing-secret persistence, setup instructions) ships as Fragment composition in each provider's 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 — clean
  • npm run typecheck — green
  • npm run build — green
  • pm-conformance.test.ts — all three providers pass the behavioral harness
  • regression-2026-04.test.ts — Linear adapter untouched, regression tests pass
  • new-provider-surface.test.ts — 7 shared step files pinned; new-provider invariant enforceable
  • Dead-code grep for retired symbols (WebhookStep, LinearWebhookInfoPanel, useWebhookManagement, useLinearWebhookInfo) — only doc-comment references remain
  • Browser smoke test — exercise all three wizards on the deploy: Trello programmatic Create + active-list + delete + curl; JIRA same + jiraEnsureLabels side-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

  • Nothing in this spec's lineage — specs 006/009/010/011/012 now form a complete arc from plug-and-play manifest pattern to fully-migrated wizard UX.
  • Future scope (explicit non-goals of spec 012): generalizing webhooks.create/list/delete tRPC endpoints beyond flag-based {trelloOnly, jiraOnly} discriminator; extending manifest pattern to SCM (GitHub) or alerting (Sentry).

🤖 Generated with Claude Code

zbigniewsobiecki and others added 10 commits April 18, 2026 17:40
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>
@zbigniewsobiecki zbigniewsobiecki merged commit 3b374ee into dev Apr 18, 2026
6 of 7 checks passed
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.

1 participant