Skip to content

feat(wizard): add Linear as PM provider option in dashboard wizard#1107

Merged
aaight merged 1 commit intodevfrom
feature/linear-pm-wizard
Apr 14, 2026
Merged

feat(wizard): add Linear as PM provider option in dashboard wizard#1107
aaight merged 1 commit intodevfrom
feature/linear-pm-wizard

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Apr 14, 2026

Summary

  • Adds Linear as a third PM provider option in the PM Wizard alongside Trello and JIRA
  • Implements Linear-specific credential input (single API key), team selector, workflow state mapping, and label mapping
  • Webhook step shows an informational display-only panel (Linear webhooks must be configured manually)

Changes

New file

  • web/src/components/projects/pm-wizard-linear-steps.tsx — Three Linear step components:
    • LinearCredentialsStep: Single API key input with link to Linear settings
    • LinearTeamStep: Team selector dropdown using SearchableSelect
    • LinearFieldMappingStep: Status mapping dropdowns + label name inputs

Modified files

  • pm-wizard-state.ts: Extended Provider type to include 'linear', added Linear state fields (linearApiKey, linearTeamId, linearTeams, linearTeamDetails, linearStatusMappings, linearLabels), new reducer actions (SET_LINEAR_API_KEY, SET_LINEAR_TEAMS, SET_LINEAR_TEAM_ID, SET_LINEAR_TEAM_DETAILS, SET_LINEAR_STATUS_MAPPING, SET_LINEAR_LABEL), updated buildEditState() for linear, updated all step-completion helpers
  • pm-wizard-hooks.ts: Added useLinearDiscovery hook (teams + team details mutation, auto-fetch effects), updated useVerification for linear branch (calls verifyLinear endpoint), updated useSaveMutation to persist LINEAR_API_KEY credential and linear config (teamId, statuses, labels), added useLinearWebhookInfo helper
  • pm-wizard-common-steps.tsx: Added LinearWebhookInfoPanel component (display-only with URL + manual setup instructions), updated WebhookStep to detect provider === 'linear' and render the info panel instead of create/delete buttons
  • pm-wizard.tsx: Added Linear provider button, imports for all new hooks/components, renders Linear-specific steps conditionally in steps 2–4, passes linearWebhookUrl to WebhookStep

Testing

  • All 7479 unit tests pass
  • TypeScript type check clean (root + web workspaces)
  • Lint clean (3 pre-existing complexity warnings only)

Notes

  • Linear API doesn't support programmatic webhook management, so the Webhook step shows instructions for manual setup in Linear team settings
  • The useLinearDiscovery hook follows the same edit-mode auto-fetch pattern as useTrelloDiscovery and useJiraDiscovery
  • Save behavior: persists project_integrations with provider: 'linear', config: { teamId, statuses, labels } and project_credentials with LINEAR_API_KEY

Trello card: https://trello.com/c/QFAXmhfZ/603-as-an-admin-i-want-linear-as-a-pm-provider-option-in-the-dashboard-wizard-so-that-i-can-configure-linear-projects

🤖 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 — Clean, pattern-consistent addition of Linear as a PM provider in the wizard. All five modified files follow the exact same conventions established by Trello and JIRA, CI is green, and backend endpoints are properly defined.

Notes

  • Minor: duplicated callbackBaseUrl computation (pm-wizard-hooks.ts:419) — useLinearWebhookInfo re-derives callbackBaseUrl using the same API_URL || window.location.origin.replace(...) logic already in useWebhookManagement (line 373). Not a defect, but could be extracted into a shared helper (e.g. getCallbackBaseUrl()) if this pattern grows — especially since adding a fourth provider would create a third copy.
  • Test coverage gap — The existing pm-wizard-state.test.ts does not exercise any of the new Linear state paths (SET_LINEAR_API_KEY, SET_LINEAR_TEAM_ID, isStep2Complete for linear, isStep3Complete for linear, isStep4Complete for linear, buildEditState for linear, areCredentialsReady for linear). Since these all follow the identical patterns as Trello/JIRA and CI passes, this is not blocking, but adding Linear test cases would strengthen the test suite.

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

@aaight aaight merged commit 946fc5e into dev Apr 14, 2026
9 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.

2 participants