generate new endpoints#1114
Conversation
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (341 total)
✅ Bundle size check passed |
| }, | ||
| }, | ||
| }); | ||
| ); |
There was a problem hiding this comment.
MSW mocks use outdated endpoints
Medium Severity
This commit switches pre-onboarding hooks to generated routes under pre-onboarding-requirements (including {requirement_slug}/documents), but default MSW handlers and test overrides still mock the removed pre-onboarding-document-requirements and pre-onboarding-documents paths, so mocked requests never match and PreOnboarding tests fail.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 32f7f31. Configure here.
| }); | ||
| await refetchRequirements(); | ||
| return response; */ | ||
| }; |
There was a problem hiding this comment.
Acknowledge handler is no-op
High Severity
onAcknowledgeRequirement is exposed on the public hook bag but the acknowledge mutation and requirements refetch are commented out, so callers complete without recording an acknowledgement on the API.
Reviewed by Cursor Bugbot for commit d0b6d3f. Configure here.
| const onAcknowledgeRequirement = async (requirementSlug: string) => { | ||
| if (!activeRequirementSlug) { | ||
| throw new Error('No active requirement selected'); | ||
| } |
There was a problem hiding this comment.
Wrong guard on acknowledge
Medium Severity
onAcknowledgeRequirement throws when activeRequirementSlug is unset even though it receives requirementSlug. Acknowledgement steps may never call onCreateDocument, which is what sets the active slug.
Reviewed by Cursor Bugbot for commit d0b6d3f. Configure here.
| throw new Error('No active requirement selected'); | ||
| } | ||
|
|
||
| console.log('onAcknowledgeRequirement', requirementSlug); |
There was a problem hiding this comment.
Debug log left in handler
Low Severity
onAcknowledgeRequirement includes a console.log debug statement that will run in production when the handler is invoked.
Triggered by project rule: Code Review Guidelines
Reviewed by Cursor Bugbot for commit d0b6d3f. Configure here.
| const { mutateAsyncOrThrow: acknowledgeRequirementMutationAsync } = | ||
| mutationToPromise(acknowledgeRequirementMutation); | ||
| const { mutateAsyncOrThrow: deleteAcknowledgeRequirementMutationAsync } = | ||
| mutationToPromise(deleteAcknowledgeRequirementMutation); |
There was a problem hiding this comment.
Remove-ack mutation never used
Low Severity
useRemoveAcknowledgePreOnboardingRequirement and deleteAcknowledgeRequirementMutationAsync are wired via mutationToPromise but nothing in this file calls the delete mutation, including the commented toggle logic.
Reviewed by Cursor Bugbot for commit d0b6d3f. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
There are 8 total unresolved issues (including 5 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e921580. Configure here.
|
|
||
| const handleChange = (checked: CheckedState) => { | ||
| console.log('handleChange', checked); | ||
| }; |
There was a problem hiding this comment.
Ack checkbox ignores API
High Severity
The new acknowledgement checkbox uses a controlled checked value from requirement.status, but handleChange only logs and never calls PreOnboardingRequirementsBag’s onAcknowledgeRequirement (or any mutation). Toggling the box cannot persist acknowledgement or update requirement status in the example flow.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e921580. Configure here.
| console.log('isDisabled', isDisabled); | ||
| console.log('isChecked', isChecked); | ||
| console.log('isBlocked', isBlocked); | ||
| console.log('isLocked', isLocked); |
There was a problem hiding this comment.
Debug console logs committed
Medium Severity
AckRequirement adds multiple console.log calls in handleChange and during render (isDisabled, isChecked, isBlocked, isLocked). These look like temporary debugging, not production logging, and violate the project’s console policy.
Triggered by project rule: Code Review Guidelines
Reviewed by Cursor Bugbot for commit e921580. Configure here.
| {isBlocked ? ( | ||
| <BlockedDependencyTooltip | ||
| dependsOnRequirement={requirement.depends_on_requirement} | ||
| > |
There was a problem hiding this comment.
Blocked ack missing dependency guard
Medium Severity
When an acknowledgement requirement is blocked, the UI always wraps the checkbox in BlockedDependencyTooltip and passes requirement.depends_on_requirement without a null check, unlike document requirements that use optional chaining on the same field.
Reviewed by Cursor Bugbot for commit e921580. Configure here.


Note
Medium Risk
Breaking changes in generated client exports and pre-onboarding URL shapes can break integrators; onboarding compliance UI is incomplete until acknowledge is wired to the new POST/DELETE endpoints.
Overview
Regenerates the OpenAPI SDK to align with a unified pre-onboarding requirements model: list via
getV1OnboardingEmploymentsEmploymentIdPreOnboardingRequirements, document creation via.../requirements/{slug}/documents, and new acknowledge / delete acknowledge endpoints. Older document-requirements list and create pre-onboarding documents exports are removed or renamed (PreOnboardingDocumentRequirement→PreOnboardingRequirement).The generated HTTP client no longer hardcodes
baseUrl: 'https://gateway.remote.com/'inclient.gen.ts. The same regeneration also adds WD GPH pay read APIs,postV1Timesheets, a second OAuth token helper, and dropsgetV1PayslipsIdfrom exports.In the example app, onboarding enables the
pre_onboarding_requirementsfeature. The review step branches requirements bytype: document rows stay on the existing preview/sign flow (DocumentRequirement, renamed fromRequirement); acknowledgement rows render a new checkbox UI with dependency tooltips and HTML descriptions viatransformHtmlToComponents. Acknowledgement toggling is still a stub (console.logonly, no API call yet).Reviewed by Cursor Bugbot for commit e921580. Bugbot is set up for automated code reviews on this repo. Configure here.