Skip to content

fix(wizard): gate optional PM wizard steps on required steps being complete#1172

Merged
aaight merged 1 commit intodevfrom
fix/pm-wizard-optional-step-isComplete-gating
Apr 23, 2026
Merged

fix(wizard): gate optional PM wizard steps on required steps being complete#1172
aaight merged 1 commit intodevfrom
fix/pm-wizard-optional-step-isComplete-gating

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Apr 23, 2026

Summary

  • Root cause: All optional wizard steps (Labels, Custom Fields, Webhook, Issue Types, Project Scope) used isComplete: () => true, which caused green checkmarks to appear on brand-new unconfigured integrations
  • Fix: Added areTrelloRequiredStepsDone, areJiraRequiredStepsDone, areLinearRequiredStepsDone helper functions that gate on credentials + container + status mapping all being complete; optional steps delegate to these helpers
  • Scope: Visual-only fix — no change to Save button behavior (isSetupComplete already gates correctly)

Changes

Provider wizard definitions (3 files)

  • web/src/components/projects/pm-providers/trello/wizard.ts — Added areTrelloRequiredStepsDone() helper; changed trello-labels, trello-custom-fields, trello-webhook from () => true to gated predicate
  • web/src/components/projects/pm-providers/jira/wizard.ts — Added areJiraRequiredStepsDone() helper; changed jira-labels, jira-custom-fields, jira-issue-types, jira-webhook from () => true to gated predicate
  • web/src/components/projects/pm-providers/linear/wizard.ts — Added areLinearRequiredStepsDone() helper; changed linear-labels, linear-project-scope, linear-webhook from () => true to gated predicate

Unit tests (3 new files)

  • tests/unit/web/trello-wizard-isComplete.test.ts — 14 tests covering fresh state, partial config, full config, and edit mode
  • tests/unit/web/jira-wizard-isComplete.test.ts — 18 tests covering fresh state, partial config, full config, and edit mode
  • tests/unit/web/linear-wizard-isComplete.test.ts — 15 tests covering fresh state, partial config, full config, and edit mode

Test plan

  • 47 new unit tests pass (fresh state → false, fully configured → true, edit mode → true)
  • All existing web wizard tests continue to pass (25 tests)
  • Lint passes (biome check)
  • Type check passes (tsc --noEmit)

Card

https://trello.com/c/69ea6fa377589654451ee944

🤖 Generated with Claude Code

🕵️ claude-code · claude-sonnet-4-6 · run details

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

LGTM! The fix perfectly addresses the UI bug by correctly gating the checkmarks of optional steps on the completion of the required setup stages. The implementation is clean, the type-safety is well maintained, and the newly added unit tests thoroughly cover all states (fresh, partial, complete, and edit mode).

No issues found.

🕵️ opencode · google/gemini-3.1-pro-preview · run details

@aaight aaight merged commit f694284 into dev Apr 23, 2026
9 checks passed
Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

LGTM! The fix successfully resolves the UI bug by correctly gating the completion of optional wizard steps behind the required configurations, and the test coverage is thorough.

Nitpicks

  • The new are[Provider]RequiredStepsDone helpers replicate the exact same logic currently found in each provider's isSetupComplete predicate (e.g. isSetupComplete: (state) => { if (!state.jiraProjectKey) return false; ... return isCredentialsComplete(state); }). You could replace the body of isSetupComplete with return are[Provider]RequiredStepsDone(state) to DRY this up.

🕵️ opencode · google/gemini-3.1-pro-preview · run details

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