refactor(init): split tools and preflight#764
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
|
Codecov Results 📊✅ 134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 1652 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 95.45% 95.46% +0.01%
==========================================
Files 237 252 +15
Lines 36049 36426 +377
Branches 0 0 —
==========================================
+ Hits 34412 34774 +362
- Misses 1637 1652 +15
- Partials 0 0 —Generated by Codecov Action |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 94c214f. Configure here.
| return null; | ||
| } | ||
|
|
||
| return mergeProjectSelection(seed, resolved); |
There was a problem hiding this comment.
Redundant API call fetches same project data twice
Low Severity
In the detection flow, tryGetExistingProjectData is called twice for the same org/project. First in resolveDetectedProject (line 190), storing the result in seed.existingProject. Then again in resolveExistingProjectChoice (line 242) via resolveProjectSelection, which ignores the already-fetched data. Each call triggers two HTTP requests (getProject + tryGetPrimaryDsn), so this doubles the API cost of the detection path. The seed.existingProject value could be passed to resolveExistingProjectChoice to skip the redundant fetch.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 94c214f. Configure here.


Summary
Testing