Merge dev to main: friction follow-ups + PM wizard refactor batch#1329
Merged
Conversation
* fix(web): guard PM wizard hook architecture
* fix(web): widen providerId to string in shared mutation config types
LabelCreationConfig, CustomFieldCreationConfig, and runPerLabelCreations
previously typed providerId as a literal union of the current production
providers ('trello' | 'linear' / 'trello' | 'jira'). A new PM provider
declaring createLabel or createCustomField would need to edit pm-wizard-hooks.ts
to add its id to those unions, breaking the new-provider/no-shared-hook-edit
guarantee. Changed all three to string so the backend manifest capability
check is the sole gate. Added an architecture-guard test assertion to pin
this invariant.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(web): add frontend provider barrel for pm-wizard registration
Create web/src/components/projects/pm-providers/index.ts as the
symmetric counterpart of the backend barrel at src/integrations/pm/index.ts.
This gives new PM providers a concrete registration path — add one import
to this barrel — without ever editing pm-wizard.tsx.
Updates pm-wizard.tsx to import the barrel instead of three individual
provider modules, and updates README, CLAUDE.md, and the new-provider-surface
guard test to accurately document the two-barrel (backend + frontend) pattern.
Closes the docs/reality gap flagged in review: the guide now says new
providers add to the frontend barrel, not that pm-wizard.tsx gets zero
edits via some non-existent auto-discovery mechanism.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(web): make PM wizard provider picker registry-driven
The provider picker was still hardcoded to ['trello', 'jira', 'linear']
with a static PROVIDER_LABELS map, meaning a new provider added to the
frontend barrel (web/src/components/projects/pm-providers/index.ts) would
register successfully but never appear as a selectable option in the dashboard
wizard picker.
Replace the hardcoded array with listProviderWizards() from the registry and
drive labels from each wizard definition's .label field. confirmProviderSwitch
now accepts plain strings instead of the literal union so it's fully generic.
This closes the gap flagged by the reviewer: the picker now automatically
includes any provider registered via the barrel, making the "zero pm-wizard.tsx
edits for a new provider" guarantee actually hold.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(web): make PM wizard credential-readiness and auth paths metadata-driven
- Widen `Provider` type from closed union to `string` so new providers
registered via the frontend barrel don't need a hack `as Provider` cast
- Add `areCredentialsReadyFromMetadata` to pm-wizard-hooks.ts driven by
the provider's `auth.rawCredentials` spec; replaces the Trello/JIRA/Linear
switch-fallthrough in `areCredentialsReady`
- Replace `shouldUseStoredCredentials(state)` call in
`buildProviderAuthArgFromMetadata` with a provider-agnostic inline check
(`state.isEditing && state.hasStoredCredentials`) so mutation auth works
for any registered provider without shared-file edits
- Update CLAUDE.md, AGENTS.md, and src/integrations/README.md to honestly
document that `pm-wizard-state.ts` still requires credential-field additions
for new providers, while the readiness and auth paths are now metadata-driven
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: make pm-wizard-state.ts exception explicit in new-provider docs
The frontend barrel comment and README step-by-step guide both claimed
that the barrel import was the only shared frontend edit needed for a
new PM provider. This was misleading because pm-wizard-state.ts still
requires manual edits (credential fields in WizardState, action types
in WizardAction, and a buildEditState branch).
Changes:
- Narrow the barrel comment: replace "No other shared file needs to
change" with an explicit callout of pm-wizard-state.ts and what
each new provider must add there.
- Add step 4 in README "Adding a new PM provider" that spells out the
three pm-wizard-state.ts edits, with a note that areCredentialsReady
FromMetadata and buildProviderAuthArgFromMetadata are metadata-driven
and require no changes there.
- Renumber steps 4→5, 5→6, 6→7, 7→8.
- Update the intro paragraph and closing summary to acknowledge
pm-wizard-state.ts as the deliberate shared-dashboard exception while
keeping the no-pm-wizard.tsx / no-pm-wizard-hooks.ts guarantee clear.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
* refactor(web): delegate PM wizard provider actions * fix(web): remove duplicate credential cases from wizardReducer Remove the six provider-prefixed credential action cases (SET_TRELLO_API_KEY, SET_TRELLO_TOKEN, SET_JIRA_EMAIL, SET_JIRA_API_TOKEN, SET_JIRA_BASE_URL, SET_LINEAR_API_KEY) from the shared wizardReducer switch so they fall through to the default delegation path and are handled exclusively by the provider-owned reducers added in this PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Cascade Bot <bot@cascade.dev> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(pm): document frontend provider boundary * fix(test): add SHA-256 hash guard for shared PM wizard orchestration files The existence-only check in new-provider-surface.test.ts was not enough to enforce the invariant documented in the README and architecture docs — a future provider PR could edit pm-wizard.tsx/pm-wizard-hooks.ts/ pm-wizard-common-steps.tsx and CI would still pass as long as those files remained non-empty. Add GUARDED_WIZARD_FILE_HASHES with pinned SHA-256 hashes for the three shared wizard orchestration files. The new it.each assertion computes the actual hash at test time and fails with a diagnostic message when a file is modified, matching the "guarded shared surface" claim in the docs. Legitimate infrastructure edits to those files (e.g. adding a new StandardStepKind) must update the corresponding hash and include a commit justification. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Cascade Bot <bot@cascade.dev> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
Co-authored-by: Cascade Bot <bot@cascade.dev>
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
Notable in this batch (15 commits):
'abc123'which became literal-quoted in URL paths.{success:true, data:'Error posting comment: ...'}).CASCADE_ORG_IDfriction (MNG-616) by making the test environment-independent.Test plan
🤖 Generated with Claude Code