Skip to content

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

Merged
gabrielseco merged 12 commits into
mainfrom
initiated-status-move-to-review
May 16, 2026
Merged

feat(review-step) - if initiated move to review step#1003
gabrielseco merged 12 commits into
mainfrom
initiated-status-move-to-review

Conversation

@gabrielseco

@gabrielseco gabrielseco commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Problem

When the employment returns initiated which could happen after you invite the user, we don't move the user to the review step in both contractor management && onboarding flow

if we don't do this, when users try to edit an employment the API will fail as initiated definition is

- `initiated`: The user has been invited but has not completed registration.

Solution

For both flows, we put the initiated status on the utils constants to make this work

How to test

From what we've seen if the user.email is already on the system in my case ggarciaseco@gmail.com, in partners is where the initiated happened

Loom

https://www.loom.com/share/60b799d9e668451e99d904091b4c5f71


Note

Medium Risk
Changes onboarding/contractor flows to treat the initiated employment status as read-only and disable invites, which affects core navigation and invite behavior across multiple flows but is localized to status gating logic.

Overview
Ensures employments in initiated state are treated like other read-only statuses by adding initiated to the review-step allowed list in both Onboarding and ContractorOnboarding, so users are auto-routed to the review step instead of being allowed to edit.

Updates invite behavior to prevent sending invites when status is initiated: OnboardingInvite now disables its button based on onboardingBag.canInvite (and initiated is included in disabledInviteButtonEmploymentStatus), and the example ReviewOnboardingStep no longer passes/uses a separate canInvite prop.

Tests are expanded/adjusted to cover initiated for auto-navigation and to assert invite buttons are disabled for initiated, with additional waits to avoid timing flakiness around canInvite resolution.

Reviewed by Cursor Bugbot for commit 78c5faa. 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

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 211.79 kB 211.73 kB +55 B (+0.0%) 🔴
Total (raw) 574.05 kB 573.95 kB +95 B (+0.0%) 🔴
CSS (gzip) 20.86 kB 20.86 kB 0 B (0%) 🟢
CSS (raw) 108.83 kB 108.83 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 211.79 kB / 250 kB (84.7%)
  • ✅ Total raw: 574.05 kB / 600 kB (95.7%)
  • ✅ CSS gzipped: 20.86 kB / 25 kB (83.4%)

Largest Files (Top 5)

  1. chunk-5BU3CD2P.js - 14 kB (0 B (0%))
  2. styles.css - 10.43 kB (0 B (0%))
  3. index.css - 10.43 kB (0 B (0%))
  4. index.js - 6.11 kB (-1 B (-0.0%))
  5. chunk-ER46UFIU.js - 5.89 kB (0 B (0%))
View All Files (312 total)
File Size (gzip) Change
chunk-5BU3CD2P.js 14 kB 0 B (0%)
styles.css 10.43 kB 0 B (0%)
index.css 10.43 kB 0 B (0%)
index.js 6.11 kB -1 B (-0.0%)
chunk-ER46UFIU.js 5.89 kB 0 B (0%)
chunk-MUT3OPVH.js 5.81 kB new
chunk-JXAAON7I.js 5.26 kB 0 B (0%)
chunk-PMAIML44.js 4.62 kB 0 B (0%)
chunk-Y5RLX6UH.js 4.45 kB new
chunk-3PKL3V6F.js 4.06 kB 0 B (0%)

✅ Bundle size check passed

@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 90.06% 90.05% 0%
Statements 89.73% 89.72% 0%
Functions 87.73% 87.73% 0%
Branches 80.10% 80.08% +0.02% 🟢

Detailed Breakdown

Lines Coverage
  • Covered: 3695 / 4103
  • Coverage: 90.06%
  • Change: 0% (2 lines)
Statements Coverage
  • Covered: 3755 / 4185
  • Coverage: 89.73%
  • Change: 0% (2 statements)
Functions Coverage
  • Covered: 1001 / 1141
  • Coverage: 87.73%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 2302 / 2874
  • Coverage: 80.10%
  • Change: +0.02% (3 branches)

✅ Coverage check passed

@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

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

Deployed with vercel-action

Comment thread src/flows/ContractorOnboarding/utils.ts
@remotecom remotecom reopened this May 13, 2026
Comment thread src/flows/Onboarding/components/OnboardingInvite.tsx Outdated
Comment thread src/flows/Onboarding/tests/OnboardingInvite.test.tsx
Comment thread src/flows/Onboarding/utils.ts
Comment thread example/src/ReviewOnboardingStep.tsx
Comment thread src/flows/Onboarding/tests/OnboardingInvite.test.tsx
Comment thread src/flows/ContractorOnboarding/utils.ts
Comment thread src/flows/Onboarding/tests/OnboardingInvite.test.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

There are 2 total unresolved issues (including 1 from previous review).

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 f1a7629. Configure here.

Comment thread src/flows/ContractorOnboarding/hooks.tsx Outdated
@gabrielseco gabrielseco merged commit 271e840 into main May 16, 2026
10 checks passed
@gabrielseco gabrielseco deleted the initiated-status-move-to-review branch May 16, 2026 02:24
@gabrielseco gabrielseco mentioned this pull request May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants