feat(contractors) - create eligibility step for contractor of record#732
feat(contractors) - create eligibility step for contractor of record#732gabrielseco merged 30 commits intomainfrom
Conversation
|
Deploy preview for remote-flows-example-app ready! ✅ Preview Built with commit b892b0e. |
|
Deploy preview for remote-flows ready! ✅ Preview Built with commit b892b0e. |
|
npm warn exec The following package was not found and will be installed: tsx@4.21.0 📊 Coverage Report✅ Coverage increased! 🎉
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (283 total)
✅ Bundle size check passed |
* add tests * add rule * add rule * trigger * create fixtures and global handlers * reorder mocks * fix fixture
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| return contractorSubscriptions?.find( | ||
| (subscription) => subscription.product.short_name === 'COR', | ||
| )?.eligibility_questionnaire?.responses; | ||
| }, [contractorSubscriptions]); |
There was a problem hiding this comment.
COR lookup uses optional short_name instead of identifier
Medium Severity
Three new useMemo hooks find the COR subscription using subscription.product.short_name === 'COR', but short_name is typed as optional (short_name?: string) in the Product type. The rest of the codebase consistently identifies COR via product.identifier and the corProductIdentifier constant. If the API omits short_name, hasEligibilityQuestionnaireSubmitted, isEligibilityBlocked, and eligibilityAnswers all silently resolve to falsy/undefined, breaking eligibility pre-filling and already-submitted detection.
Additional Locations (2)
| return contractorSubscriptions?.find( | ||
| (subscription) => subscription.product.short_name === 'COR', | ||
| )?.eligibility_questionnaire?.responses; | ||
| }, [contractorSubscriptions]); |
There was a problem hiding this comment.
Triplicated COR subscription find logic across memos
Low Severity
The identical contractorSubscriptions?.find((subscription) => subscription.product.short_name === 'COR') lookup is repeated in three consecutive useMemo hooks (hasEligibilityQuestionnaireSubmitted, isEligibilityBlocked, eligibilityAnswers), all sharing the same [contractorSubscriptions] dependency. A single memo finding the COR subscription once, with the three values derived from it, would eliminate the triplication and reduce the risk of divergent lookups.
Triggered by project rule: Code Review Guidelines


Add Eligibility step for the COR selection, I build some parts but no the whole flow
What is missing?
Dependencies
Vite.+.React.+.TS.-.11.February.2026.mp4
Note
Medium Risk
Touches core onboarding step orchestration and adds new network mutations (create/delete COR intent + questionnaire submission), so regressions could impact contractor onboarding progression and state sync; changes are test-covered but include dynamic step logic and generated SDK updates.
Overview
Adds a new COR eligibility questionnaire step to the contractor onboarding flow, and switches step configuration to be built dynamically (step list now derived from
buildSteps, and exposed viacontractorOnboardingBag.stepsfor navigation UI).Wires new eligibility questionnaire API calls into the flow: fetch schema, submit responses, create/manage/delete COR subscription intent, and prefill eligibility answers from backend subscription data; also refines pricing-plan handling to return early for COR selection and to delete existing COR intent when switching away.
Updates generated client SDK/types (new compliance-profile endpoint/types, SCIM error response typing, added subscription eligibility fields, and minor security/doc tweaks), adds shared MSW fixtures/handlers and new onboarding tests for the COR eligibility step, and relaxes bundle-size workflow comparison failure handling while bumping
.sizelimit.jsonthresholds.Written by Cursor Bugbot for commit b892b0e. This will update automatically on new commits. Configure here.