Skip to content

Merge dev to main: friction follow-ups + PM wizard refactor batch#1329

Merged
zbigniewsobiecki merged 15 commits into
mainfrom
dev
May 11, 2026
Merged

Merge dev to main: friction follow-ups + PM wizard refactor batch#1329
zbigniewsobiecki merged 15 commits into
mainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

Notable in this batch (15 commits):

Test plan

  • dev branch CI green for each PR in the batch
  • Watch main CI + Build and Deploy after merge
  • Post-deploy: cascade-tools example quoting and trello-414 fixes verifiable on next runs that hit those code paths

🤖 Generated with Claude Code

aaight and others added 15 commits May 10, 2026 12:35
* 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>
@zbigniewsobiecki zbigniewsobiecki merged commit 1dedff9 into main May 11, 2026
15 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

❌ Patch coverage is 91.02564% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/backends/shared/nativeToolPrompts.ts 81.81% 4 Missing ⚠️
src/gadgets/shared/cli/shellValues.ts 83.33% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

2 participants