Skip to content

feat(contractors) - create eligibility step for contractor of record#732

Merged
gabrielseco merged 30 commits intomainfrom
pbyr-3467-add-cor-product-to-product-prices
Feb 12, 2026
Merged

feat(contractors) - create eligibility step for contractor of record#732
gabrielseco merged 30 commits intomainfrom
pbyr-3467-add-cor-product-to-product-prices

Conversation

@gabrielseco
Copy link
Collaborator

@gabrielseco gabrielseco commented Feb 10, 2026

Add Eligibility step for the COR selection, I build some parts but no the whole flow

  • we're able to submit the eligibility form and create an intent
  • we're able to delete an intent if we change the subscription
  • if values were submitted before they appear in the form for now
  • steps are built dynamically

What is missing?

  • if eligiblity is not passed we need to handle that
  • we need to handle the review step
  • if eligibility was passed not showing the form again
  • mocks
  • tests to make sure COR works

Dependencies

  • execute BE script in all envs to make COR copy product card to work
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 via contractorOnboardingBag.steps for 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.json thresholds.

Written by Cursor Bugbot for commit b892b0e. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Deploy preview for remote-flows-example-app ready!

✅ Preview
https://remote-flows-example-mrmv8h3uh-remotecom.vercel.app

Built with commit b892b0e.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Deploy preview for remote-flows ready!

✅ Preview
https://remote-flows-f7nlu68rz-remotecom.vercel.app

Built with commit b892b0e.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

npm warn exec The following package was not found and will be installed: tsx@4.21.0

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 87.82% 87.66% +0.16% 🟢
Statements 87.46% 87.29% +0.17% 🟢
Functions 83.71% 83.32% +0.39% 🟢
Branches 79.46% 79.27% +0.19% 🟢

Detailed Breakdown

Lines Coverage
  • Covered: 2999 / 3415
  • Coverage: 87.82%
  • Change: +0.16% (93 lines)
Statements Coverage
  • Covered: 3056 / 3494
  • Coverage: 87.46%
  • Change: +0.17% (95 statements)
Functions Coverage
  • Covered: 858 / 1025
  • Coverage: 83.71%
  • Change: +0.39% (24 functions)
Branches Coverage
  • Covered: 1888 / 2376
  • Coverage: 79.46%
  • Change: +0.19% (37 branches)

✅ Coverage check passed

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 186.41 kB 184.64 kB +1.77 kB (+1.0%) 🔴
Total (raw) 498.9 kB 492.64 kB +6.26 kB (+1.3%) 🔴
CSS (gzip) 19.35 kB 19.35 kB 0 B (0%) 🟢
CSS (raw) 101.78 kB 101.78 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 186.41 kB / 200 kB (93.2%)
  • ✅ Total raw: 498.9 kB / 550 kB (90.7%)
  • ✅ CSS gzipped: 19.35 kB / 25 kB (77.4%)

Largest Files (Top 5)

  1. chunk-ZSJ6YADQ.js - 12.43 kB (new)
  2. styles.css - 9.68 kB (0 B (0%))
  3. index.css - 9.68 kB (0 B (0%))
  4. index.js - 5.87 kB (+14 B (+0.2%))
  5. chunk-ZHRMPK42.js - 5.61 kB (new)
View All Files (283 total)
File Size (gzip) Change
chunk-ZSJ6YADQ.js 12.43 kB new
styles.css 9.68 kB 0 B (0%)
index.css 9.68 kB 0 B (0%)
index.js 5.87 kB +14 B (+0.2%)
chunk-ZHRMPK42.js 5.61 kB new
chunk-RBVGOVSD.js 4.07 kB new
chunk-DG7WU355.js 3.76 kB new
chunk-T7O3YYOG.js 3.29 kB 0 B (0%)
chunk-HVG6VCP4.js 3.29 kB new
chunk-MKSMTFPZ.js 3.21 kB new

✅ Bundle size check passed

@gabrielseco gabrielseco changed the title Pbyr 3467 add cor product to product prices feat(contractors) - create eligibility step for contractor of record Feb 11, 2026
@gabrielseco gabrielseco marked this pull request as ready for review February 11, 2026 12:33
@gabrielseco gabrielseco self-assigned this Feb 11, 2026
* add tests

* add rule

* add rule

* trigger

* create fixtures and global handlers

* reorder mocks

* fix fixture
@gabrielseco gabrielseco merged commit 7c0aea4 into main Feb 12, 2026
7 checks passed
@gabrielseco gabrielseco deleted the pbyr-3467-add-cor-product-to-product-prices branch February 12, 2026 13:22
@gabrielseco gabrielseco mentioned this pull request Feb 12, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

return contractorSubscriptions?.find(
(subscription) => subscription.product.short_name === 'COR',
)?.eligibility_questionnaire?.responses;
}, [contractorSubscriptions]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Triggered by project rule: Code Review Guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants