Skip to content

fix(onboarding): retry job title eligibility check after a failed request - #1412

Closed
gabrielseco wants to merge 2 commits into
found-1869-hook-up-the-form-onblur-events-to-trigger-the-jobfrom
fix/job-title-eligibility-retry-after-failure
Closed

gabrielseco wants to merge 2 commits into
found-1869-hook-up-the-form-onblur-events-to-trigger-the-jobfrom
fix/job-title-eligibility-retry-after-failure

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

If the job title eligibility check fails once (e.g. a network or server error), it now runs again the next time the user leaves a field. Before, it was never retried unless the user changed their role answers.

Why

Cursor Bugbot flagged this on #1406 ("Failed checks skip later retries"). A single transient failure left the employment without a recorded check, and the user couldn't recover it without editing a role field.

What changed

Toggle details
  • useJobTitleEligibilityCheck.check() no longer gates the request on "params changed". The query cache already handles dedup: jobTitleEligibilityCheckOptions uses staleTime: Infinity, so a successful result is returned from cache with no request, while an errored (no data) query is stale and refetches. In-flight requests are deduped by query.fetch.
  • setParams still only runs when params change, so the useQuery key is stable.
  • No test changes here. The retry-after-failure test lives in test(onboarding): cover the job title eligibility blur dedup #1408, which also carries this same fix so its CI passes on its own.
  • Targets feat(onboarding): wire onBlur events to job title eligibility check #1406's branch, not main. No public API change.

Screenshots

N/A

Related Resources

Testing

  • Tested against the example/ app in a browser
  • Feature flag: job_title_eligibility

🤖 Generated with Claude Code

…uest

check() recorded the new params before the request finished and only
fired the request when params changed. With retry: false and
staleTime: Infinity, a failed first attempt was never retried on later
blurs unless a role field was edited.

Always call queryClient.query when params are complete: a successful
result is served from cache (no request), an errored/missing result
refetches, and in-flight requests are deduped by the query cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 168.07 kB 168.08 kB -5 B (-0.0%) 🟢
Total (raw) 561.72 kB 561.73 kB -8 B (-0.0%) 🟢
CSS (gzip) 21.94 kB 21.94 kB 0 B (0%) 🟢
CSS (raw) 114.43 kB 114.43 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 168.07 kB / 350 kB (48.0%)
  • ✅ Total raw: 561.72 kB / 850 kB (66.1%)
  • ✅ CSS gzipped: 21.94 kB / 25 kB (87.8%)

Largest Files (Top 5)

  1. CheckBoxField-DBWQDi6N.js - 24.64 kB (0 B (0%))
  2. ContractorOnboarding-Bb6M25-p.js - 13.55 kB (0 B (0%))
  3. Onboarding-CY1vt1jP.js - 11.68 kB (new)
  4. Termination-D8_Yz_Ju.js - 11.07 kB (0 B (0%))
  5. styles.css - 10.97 kB (0 B (0%))
View All Files (75 total)
File Size (gzip) Change
CheckBoxField-DBWQDi6N.js 24.64 kB 0 B (0%)
ContractorOnboarding-Bb6M25-p.js 13.55 kB 0 B (0%)
Onboarding-CY1vt1jP.js 11.68 kB new
Termination-D8_Yz_Ju.js 11.07 kB 0 B (0%)
styles.css 10.97 kB 0 B (0%)
index.css 10.97 kB 0 B (0%)
CostCalculator-B24h9gs5.js 10.65 kB 0 B (0%)
internals-C1kFEhms.js 8.23 kB 0 B (0%)
index.js 5.05 kB +3 B (+0.1%)
JSONSchemaForm-D8Xz5yJL.js 4.9 kB 0 B (0%)

✅ Bundle size check passed

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-f5qppz65c-remotecom.vercel.app
Latest Commit:cc4cf81

Deployed with vercel-action

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-kc0ygq6hf-remotecom.vercel.app
Latest Commit:cc4cf81

Deployed with vercel-action

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 85.98% 85.97% +0.02% 🟢
Statements 85.56% 85.55% +0.01% 🟢
Functions 84.49% 84.49% 0% ⚪
Branches 77.11% 77.07% +0.04% 🟢

Detailed Breakdown

Lines Coverage
  • Covered: 4877 / 5672
  • Coverage: 85.98%
  • Change: +0.02% (0 lines)
Statements Coverage
  • Covered: 4961 / 5798
  • Coverage: 85.56%
  • Change: +0.01% (0 statements)
Functions Coverage
  • Covered: 1296 / 1534
  • Coverage: 84.49%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 3009 / 3902
  • Coverage: 77.11%
  • Change: +0.04% (0 branches)

✅ Coverage check passed

gabrielseco added a commit that referenced this pull request Sep 28, 2026
…r a failure

A failed check must be retried on the next blur even when the role
answers are unchanged. Depends on the fix in #1412; fails until it
lands on the base branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gabrielseco added a commit that referenced this pull request Sep 28, 2026
…uest

Same change as #1412, so this PR's retry test passes on its own. The hunk
is identical, so merging both is clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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