refactor(onboarding-invite) - use new mutation method#757
Conversation
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (312 total)
✅ Bundle size check passed |
|
Deploy preview for remote-flows ready! ✅ Preview Built with commit 6718f46. |
|
Deploy preview for remote-flows-example-app ready! ✅ Preview Built with commit 6718f46. |
|
bugbot run |
|
Skipping Bugbot: Unable to authenticate your request. Please make sure Bugbot is properly installed and configured for this repository. |
|
npm warn exec The following package was not found and will be installed: tsx@4.21.0 📊 Coverage Report
|
| Metric | Current | Previous | Change | Status |
|---|---|---|---|---|
| Lines | 88.66% | 88.66% | 0% | ⚪ |
| Statements | 88.32% | 88.32% | 0% | ⚪ |
| Functions | 84.78% | 84.78% | 0% | ⚪ |
| Branches | 79.29% | 79.30% | -0.02% | 🔴 |
Detailed Breakdown
Lines Coverage
- Covered: 3346 / 3774
- Coverage: 88.66%
- Change: 0% (-1 lines)
Statements Coverage
- Covered: 3403 / 3853
- Coverage: 88.32%
- Change: 0% (-1 statements)
Functions Coverage
- Covered: 936 / 1104
- Coverage: 84.78%
- Change: 0% (0 functions)
Branches Coverage
- Covered: 2109 / 2660
- Coverage: 79.29%
- Change: -0.02% (-2 branches)
✅ Coverage check passed
|
bugbot run |
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.
Use new mutation method to handle errors and move fixtures
Note
Medium Risk
Moderate risk because it changes how invite mutation errors propagate/are shaped (throwing vs returning), which could alter UI error handling and tests if any callers relied on the old response-based branching.
Overview
Refactors
OnboardingInviteto usemutationToPromise(...).mutateAsyncOrThrow, simplifying the invite flow to assume success data is returned and handling failures via thrown structured errors (withresponsestripped before callingonError).Moves the contractor basic-information JSON schema fixture out of flow test fixtures into
src/common/api/fixtures/contractors.ts, and updates MSW test handlers to servecontractor_basic_informationglobally (removing per-test mocks and trimming onboarding tests accordingly).Written by Cursor Bugbot for commit 74e71a0. This will update automatically on new commits. Configure here.