feat(dashboard): PM integration wizard with discovery API#508
feat(dashboard): PM integration wizard with discovery API#508zbigniewsobiecki merged 1 commit intodevfrom
Conversation
Replace the free-text PM integration form with a guided 6-step wizard that discovers Trello boards/JIRA projects via live API calls, letting users pick from dropdowns instead of manually entering IDs. Backend: - Add integrationsDiscovery tRPC router with 6 procedures (verify, boards/projects, board/project details) for both Trello and JIRA - Extract resolveTrelloCreds/resolveJiraCreds DRY helpers - Add input validation (boardId regex, projectKey regex) - Add new Trello client methods (getBoards, getBoardLists, getBoardLabels, getBoardCustomFields) - Add new JIRA client methods (searchProjects, getProjectStatuses, getFields) Frontend (pm-wizard.tsx): - 6-step wizard: Provider → Credentials → Board/Project → Field Mapping → Webhooks → Save - useReducer state management with verifyError in reducer (clears on credential change) - Fix verify race condition: capture provider at mutation start - Fix edit mode: auto-fetch board/project details when editing - Fix SearchableSelect: always include selected value in filter - Replace ?? 0 credential fallbacks with early throw - Fix InlineCredentialCreator: await cache invalidation before selecting new credential - Use isEditing flag: disable provider switch, show "Update" button Other: - Fix pre-existing progressMonitor.ts lint formatting - Add progress model timeout + state file cleared detection - Bump squint to 1.10.2 in Dockerfile.worker Tests: - Add integrationsDiscovery router tests (27 tests) - Add Trello client tests for new board discovery methods - Add JIRA client tests for searchProjects, getProjectStatuses, getFields - Update router.test.ts for integrationsDiscovery sub-router Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
✨ On it — checking the PM integration wizard |
|
🤔 Just a sec, looking into the PM integration wizard |
✅ Review Complete — All Checks PassingI've reviewed the PM integration wizard implementation and everything looks great! Here's the summary: 🎯 PR OverviewThis PR replaces the free-text PM integration form with a guided 6-step wizard that discovers Trello boards and JIRA projects via live API calls, letting users pick from dropdowns instead of manually entering IDs. ✨ Key Changes
✅ Verification ResultsType Safety: ✅ No TypeScript errors Linting: ✅ No Biome issues Tests: ✅ All 2786 tests passing (167 test files)
🎨 Code Quality Highlights
📋 Remaining Manual Testing (from PR description)
🚀 RecommendationReady to merge once manual testing is complete. All automated checks pass, code quality is excellent, and the implementation follows CASCADE's established patterns. 🤖 Generated with Claude Code |
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
Well-structured PR that replaces a manual-entry PM integration form with a guided wizard backed by live API discovery. The backend router, client methods, and frontend component are all cleanly implemented with proper authorization, input validation, and test coverage.
Notes
Security: Credential resolution (resolveCredentialValue) correctly verifies org ownership before decrypting, preventing cross-org access. The boardId and projectKey inputs are regex-validated at the tRPC layer before being interpolated into URLs in the Trello/JIRA clients, blocking path injection.
Architecture: Using .mutation() for all discovery endpoints is the right call — these make external API calls with credentials and shouldn't be cached/retried by tRPC's query layer. The DRY credential resolution helpers (resolveTrelloCreds/resolveJiraCreds) are well-factored.
Progress monitor changes: The 20s timeout with Promise.race and Sentry exception capture are sensible additions. The state-file-cleared detection prevents overwriting final agent comments.
Test coverage: 27 tests for the new router covering auth, credential resolution, all 6 procedures, and input validation. Client tests cover the new Trello and JIRA methods with edge cases. Good.
Minor observations (not blocking):
searchProjectshardcodesmaxResults: 100— organizations with >100 JIRA projects would see truncated results. Pagination could be added later if needed.- The
Promise.racetimeout timer inprogressMonitor.tsisn't cleared when the model call wins, but this is benign (the reject callback is a no-op on an already-settled promise). - The
InlineCredentialCreatorawaitsinvalidateQueriesbefore callingonCreated, butinvalidateQueriesresolves when the invalidation is queued, not when data is re-fetched. There's a brief window where the credential ID is set but the credential isn't in the dropdown options yet. This resolves itself on the next render cycle.
Summary
integrationsDiscoverytRPC router (6 endpoints) for credential verification, board/project listing, and detail fetching — with DRY credential helpers, input validation (boardId/projectKey regex), and debug logginggetBoards,getBoardLists,getBoardLabels,getBoardCustomFields) and 3 new JIRA client methods (searchProjects,getProjectStatuses,getFields)verifyErroron credential change, verify race condition on provider switch, edit mode not loading board details,SearchableSelecthiding selected value on filter,?? 0credential fallbacks sending bad IDs,InlineCredentialCreatorcache race, unusedisEditingflagprogressMonitor.tsbiome formatting issue, add progress model timeout + state file cleared detectionDockerfile.workerTest plan
npm run typecheckpassesnpm run lintpasses (0 errors, 0 warnings)integrationsDiscovery.test.ts— 27 tests covering auth, credential resolution, all 6 procedures, input validationrouter.test.ts— integrationsDiscovery sub-router registration🤖 Generated with Claude Code