Skip to content

feat(review-step) - if initiated move to review step#1003

Open
gabrielseco wants to merge 1 commit intomainfrom
initiated-status-move-to-review
Open

feat(review-step) - if initiated move to review step#1003
gabrielseco wants to merge 1 commit intomainfrom
initiated-status-move-to-review

Conversation

@gabrielseco
Copy link
Copy Markdown
Collaborator

@gabrielseco gabrielseco commented May 11, 2026

Note

Medium Risk
Changes step-gating logic so initiated employments become read-only and can auto-navigate to the review step, which may alter onboarding progression for existing in-flight records.

Overview
Allows employments in initiated status to be treated as review-step eligible in both the employee onboarding and contractor onboarding flows.

This updates the status lists used to determine read-only behavior and to disable the invite button, so initiated now triggers the same review-step navigation/locking behavior as other finalized statuses.

Reviewed by Cursor Bugbot for commit b9a8ef0. Bugbot is set up for automated code reviews on this repo. Configure here.

@gabrielseco gabrielseco marked this pull request as ready for review May 11, 2026 10:22
@github-actions
Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 211.12 kB 211.12 kB +4 B (+0.0%) 🔴
Total (raw) 570.97 kB 570.92 kB +48 B (+0.0%) 🔴
CSS (gzip) 20.69 kB 20.69 kB 0 B (0%) 🟢
CSS (raw) 107.95 kB 107.95 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 211.12 kB / 250 kB (84.4%)
  • ✅ Total raw: 570.97 kB / 600 kB (95.2%)
  • ✅ CSS gzipped: 20.69 kB / 25 kB (82.8%)

Largest Files (Top 5)

  1. chunk-XG6ASTX5.js - 14 kB (0 B (0%))
  2. styles.css - 10.35 kB (0 B (0%))
  3. index.css - 10.35 kB (0 B (0%))
  4. index.js - 6.06 kB (+1 B (+0.0%))
  5. chunk-TNQKP2XT.js - 5.89 kB (0 B (0%))
View All Files (312 total)
File Size (gzip) Change
chunk-XG6ASTX5.js 14 kB 0 B (0%)
styles.css 10.35 kB 0 B (0%)
index.css 10.35 kB 0 B (0%)
index.js 6.06 kB +1 B (+0.0%)
chunk-TNQKP2XT.js 5.89 kB 0 B (0%)
chunk-XCFXJI74.js 5.81 kB new
chunk-RZCU2MT3.js 5.23 kB 0 B (0%)
chunk-WUSKSXW2.js 4.62 kB 0 B (0%)
chunk-UPWHHNK7.js 4.3 kB new
chunk-QYNWADPG.js 4.06 kB 0 B (0%)

✅ Bundle size check passed

@github-actions
Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚪ Coverage unchanged

Metric Current Previous Change Status
Lines 90.02% 90.02% 0%
Statements 89.69% 89.69% 0%
Functions 87.68% 87.68% 0%
Branches 80.06% 80.06% 0%

Detailed Breakdown

Lines Coverage
  • Covered: 3671 / 4078
  • Coverage: 90.02%
  • Change: 0% (0 lines)
Statements Coverage
  • Covered: 3732 / 4161
  • Coverage: 89.69%
  • Change: 0% (0 statements)
Functions Coverage
  • Covered: 996 / 1136
  • Coverage: 87.68%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 2272 / 2838
  • Coverage: 80.06%
  • Change: 0% (0 branches)

✅ Coverage check passed

@github-actions
Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-d81vy8ubq-remotecom.vercel.app
Latest Commit:b9a8ef0
Inspect:View deployment

Deployed with vercel-action

Copy link
Copy Markdown

@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 1 potential issue.

Fix All in Cursor

❌ 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 b9a8ef0. Configure here.

* @constant
*/
export const reviewStepAllowedEmploymentStatus: Employment['status'][] = [
'initiated',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Infinite loading state when initiated employment lacks contract documents

High Severity

Adding 'initiated' to reviewStepAllowedEmploymentStatus in the ContractorOnboarding flow can cause a permanent loading state. The isNavigatingToReview check in hooks.tsx requires internalContractDocumentId to be truthy, but an initiated employment (meaning onboarding has merely been started by the employer) may not yet have contract documents. When that happens, shouldHandleReadOnlyEmployment stays true while isNavigatingToReview stays false, so isLoading never resolves and goToStep('review') is never called — the user is stuck on a spinner indefinitely.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b9a8ef0. Configure here.

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.

1 participant