feat(006/2): trello migrated onto PM provider manifest#1126
Merged
zbigniewsobiecki merged 4 commits intodevfrom Apr 16, 2026
Merged
feat(006/2): trello migrated onto PM provider manifest#1126zbigniewsobiecki merged 4 commits intodevfrom
zbigniewsobiecki merged 4 commits intodevfrom
Conversation
Adds src/integrations/pm/trello/ with: - manifest.ts: PMProviderManifest wiring TrelloIntegration, TrelloRouterAdapter, all 7 Trello trigger handlers, and TrelloPlatformClient. verifyWebhookSignature wraps the existing verifyTrelloSignature (HMAC-SHA1 of body+callbackUrl) with Host/X-Forwarded-Proto header reconstruction — no shared factory because Trello's signing scheme is unique among providers. - index.ts: side-effect module that calls registerPMProvider(trelloManifest). src/integrations/pm/index.ts: new barrel importing ./trello/index.js for the side effect. Plans 006/3 and 006/4 append jira + linear. Contract adjustments surfaced during TDD: - Dropped parseWebhookPayload field from PMProviderManifest (redundant with routerAdapter.parseWebhook; had wrong return type in 006/1). Each caller uses the appropriate one: router uses routerAdapter, PM-domain code uses pmIntegration.parseWebhookPayload. - Relaxed conformance harness's platform-client assertion from 3 methods to 2 (postComment + deleteComment). updateComment/postReaction are provider extensions, not contract. - registerTestProvider is now additive (no longer resets the registry), so the conformance harness iterates TestProvider AND every real provider side-by-side — validating AC #2 of the spec. Tests: 15 new Trello manifest tests + conformance now 22 (11 per provider x 2). Trello's legacy registrations (bootstrap.ts, builtins.ts, worker-env extractor branch, pm-wizard.tsx branch) still fire — removed in task 3 of this plan. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Completes plan 006/2. Trello is the first real provider on the manifest
pattern landed in 006/1.
Backend:
- src/integrations/pm/trello/manifest.ts — wires TrelloIntegration,
TrelloRouterAdapter, all 7 Trello trigger handlers, TrelloPlatformClient.
verifyWebhookSignature wraps the existing verifyTrelloSignature helper
(HMAC-SHA1 of body+callbackUrl) with header-based URL reconstruction.
- src/integrations/pm/trello/index.ts + src/integrations/pm/index.ts —
side-effect registration barrel imported by router and worker entries.
- src/triggers/builtins.ts — iterates listPMProviders() to register
Trello triggers via the manifest; removed registerTrelloTriggers call.
- src/router/worker-env.ts — Trello branch of extractProjectIdFromJob
deleted; registry path handles it via the manifest's extractor hook.
Frontend:
- web/src/components/projects/pm-providers/types.ts — extended
ProviderWizardDefinition with optional useProviderHooks field. Context
(state, dispatch, projectId, advanceToStep) flows into the provider
hook composer.
- web/src/components/projects/pm-providers/manifest-section.tsx — new
ManifestProviderWizardSection shell component. Only mounted when a
manifest is registered, so the unconditional useProviderHooks call
inside satisfies React's rules-of-hooks.
- web/src/components/projects/pm-providers/trello/wizard.ts —
trelloProviderWizard composes useTrelloDiscovery +
useTrelloLabelCreation + useTrelloCustomFieldCreation inside
useProviderHooks. Three step adapters in adapters.tsx destructure
providerHooks into the existing TrelloCredentialsStep /
TrelloBoardStep / TrelloFieldMappingStep prop shape — step
implementations stay unchanged.
- web/src/components/projects/pm-wizard.tsx — removed Trello-specific
hook instantiations and three per-step `provider === 'trello'`
branches. The top of the component looks up manifestDef = getProviderWizard(state.provider);
when truthy it renders <ManifestProviderWizardSection .../>, else falls
through to the legacy JIRA/Linear branches (they migrate in 006/3/4).
Contract adjustments surfaced during TDD:
- Dropped the redundant parseWebhookPayload field from PMProviderManifest
(had wrong return type in 006/1; duplicated routerAdapter.parseWebhook).
- Relaxed conformance harness's platform-client assertion to the actual
PlatformCommentClient contract (postComment + deleteComment only;
updateComment / postReaction are provider extensions).
- registerTestProvider is additive (no longer resets), so the conformance
harness iterates TestProvider AND every real provider side-by-side.
- Six existing test files gain a side-effect import of
src/integrations/pm/trello/index.js so the Trello manifest is
registered before they exercise Trello-dependent code.
Deferred to plan 006/5 (all documented in the .done plan):
- Removing Trello's registration from src/integrations/bootstrap.ts —
nine-plus call sites of pmRegistry.get('trello') still rely on the
legacy registration.
- Consolidating createTrelloLabel/createTrelloLabels tRPC endpoints into
pm.discovery.createLabel — additive cleanup, not behavior-changing.
Tests: 7755/7755 pass. 15 new Trello manifest tests; conformance harness
now runs 22 assertions (11 × TestProvider + Trello).
Docs: src/integrations/README.md's migration status note updated.
CHANGELOG entry added.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…fig export CI's build:web step failed because web/tsconfig's stricter resolution caught an import of a function that doesn't exist. The legacy path at `useSaveMutation` builds Trello's integration config inline (unlike the already-extracted `buildLinearIntegrationConfig`). Mirroring that inline shape inside `trelloProviderWizard.buildIntegrationConfig` keeps plan 006/2 compatible with the existing save path; plan 006/5 will consolidate `saveMutation` onto `def.buildIntegrationConfig` and extract one shared builder. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Plan 006/2 of spec 006: Trello is the first real provider migrated onto the manifest pattern landed in #1125.
No operator-visible changes. Trello wizard UX, webhook flow, trigger dispatch, and ack-comment behavior are byte-for-byte identical to
dev.Mechanics
Backend
src/integrations/pm/trello/manifest.ts— wiresTrelloIntegration,TrelloRouterAdapter, all 7 Trello trigger handlers,TrelloPlatformClient.verifyWebhookSignaturewraps the existingverifyTrelloSignaturehelper (HMAC-SHA1 of body + callbackUrl) with header-based URL reconstruction — Trello's signing scheme is distinct from the shared HMAC-SHA256 factory.src/integrations/pm/index.ts+trello/index.ts— side-effect registration barrels imported from router + worker entries.src/triggers/builtins.ts— iterateslistPMProviders()to register Trello triggers via the manifest; the legacyregisterTrelloTriggerscall is removed.src/router/worker-env.ts::extractProjectIdFromJob— Trello branch removed; the registry path handles it viamanifest.extractProjectIdFromJob.Frontend
web/src/components/projects/pm-providers/types.ts— extendedProviderWizardDefinitionwith an optionaluseProviderHooksfield. The context (state,dispatch,projectId,advanceToStep) flows into the provider's hook composer so provider-specific React hooks (useTrelloDiscovery,useTrelloLabelCreation,useTrelloCustomFieldCreation) run inside the provider module, not at the wizard root.web/src/components/projects/pm-providers/manifest-section.tsx— newManifestProviderWizardSectionshell component. Only mounted when a manifest is registered for the active provider, so the unconditionaluseProviderHookscall inside the shell satisfies React's rules-of-hooks.web/src/components/projects/pm-providers/trello/wizard.ts—trelloProviderWizardcomposes the three existing hooks and exposes combinedproviderHooks(onBoardSelect, boardsMutation, boardDetailsMutation, onCreateLabel, onCreateAllMissingLabels, onCreateCostField, creatingSlot, creatingCostField).web/src/components/projects/pm-providers/trello/adapters.tsx— three thin adapters that destructureproviderHooksinto the existingTrelloCredentialsStep/TrelloBoardStep/TrelloFieldMappingStepprop shape. The existing step implementations stay unchanged.web/src/components/projects/pm-wizard.tsx— removed Trello-specific hook instantiations and three per-stepstate.provider === 'trello'branches. Top of the component:manifestDef = getProviderWizard(state.provider). When truthy,<ManifestProviderWizardSection />renders; otherwise the legacy JIRA/Linear branches fire.Contract adjustments surfaced during TDD
parseWebhookPayloadfield fromPMProviderManifest(had the wrong return type in 006/1; duplicatedrouterAdapter.parseWebhook).PlatformCommentClientcontract —postComment+deleteCommentonly;updateComment/postReactionare provider extensions.registerTestProvideris additive now (no longer resets the registry), so the conformance harness runs against bothTestProviderand every real provider side-by-side — satisfying spec AC chore: add .nvmrc for Node.js 22 #2.import '../../../src/integrations/pm/trello/index.js'so the Trello manifest is registered before they exercise Trello-dependent code.Deferred to plan 006/5 (documented in the .done plan)
src/integrations/bootstrap.ts. Nine-plus call sites ofpmRegistry.get('trello')still rely on the legacy registration (webhook-handlers, manual runners, lifecycle, credential scoping, github adapter). Plan 006/5 migrates those callers and deletes both registrations together.createTrelloLabel/createTrelloLabelstRPC endpoints intopm.discovery.createLabel. Additive cleanup only —useTrelloLabelCreationstill works via the legacy endpoints.Tests
Lint + typecheck + build clean.
Post-merge verification
npm testgreen (7755/7755); lint + typecheck + build clean🤖 Generated with Claude Code