feat: add msw API handlers for development#183
feat: add msw API handlers for development#183iamitprakash merged 8 commits intochore/msw-mock-datafrom
Conversation
|
Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Untyped Error Parameter ▹ view | ||
| Missing Mock Response Debug Logs ▹ view | ||
| Magic number in default parameter ▹ view | ||
| Invalid MSW URL Pattern ▹ view | ||
| Invalid Error Response Structure ▹ view | ✅ Fix detected | |
| Unsanitized URL Path Parameter ▹ view | ✅ Fix detected | |
| Loss of Error Context in Response ▹ view | ✅ Fix detected | |
| Direct Console Usage Instead of Logger ▹ view | ||
| Missing Pagination Parameter Validation ▹ view | ✅ Fix detected | |
| Inadequate Error Handling Strategy ▹ view | ✅ Fix detected |
Files scanned
| File Path | Reviewed |
|---|---|
| mocks/utils/common.ts | ✅ |
| mocks/handlers/index.ts | ✅ |
| mocks/handlers/labels.handler.ts | ✅ |
| mocks/handlers/users.handler.ts | ✅ |
| mocks/data/labels.mock.ts | ✅ |
| mocks/data/users.mock.ts | ✅ |
| mocks/handlers/teams.handler.ts | ✅ |
| mocks/data/watchlist.mock.ts | ✅ |
| mocks/handlers/tasks.handler.ts | ✅ |
| mocks/data/teams.mock.ts | ✅ |
| mocks/data/tasks.mock.ts | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
* chore: removed unused mock files and add mock data for msw * refactor(mocks): export mock data for labels, tasks, teams, users, and watchlist * feat: add msw API handlers for development (#183) * refactor(mocks): remove unused Task and Team mock files * fix(mocks): start mocking before API calls to prevent race conditions * refactor(mocks): export handlers * refactor(mocks): enhance task labels handling in mock data * refactor(mocks): integrate user assignment in task creation for mock data * refactor(mocks): improve error handling and response structure in mock API handlers
Date: 25 Aug 2025
Developer Name: @AnujChhikara
Issue Ticket Number
Description
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
screen-recording-2025-08-18-at-10852-pm_fvOZ5bHR.mp4
Test Coverage
Screenshot 1
Additional Notes
Description by Korbit AI
What change is being made?
Add mock API handlers using MSW (Mock Service Worker) for the development environment, covering labels, tasks, teams, users, and watchlist functionality.
Why are these changes being made?
These changes are being introduced to enable efficient development and testing workflows by providing a way to simulate real API behavior without making actual network requests. This setup supports the frontend application by allowing it to interact with mock data for different scenarios, facilitating quicker and more reliable integration testing.