fix(onboarding): retry job title eligibility check after a failed request - #1412
Closed
gabrielseco wants to merge 2 commits into
Conversation
…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>
Contributor
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (75 total)
✅ Bundle size check passed |
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
Contributor
|
Deploy preview for adp-cost-calculator ready!
Deployed with vercel-action |
Contributor
📊 Coverage Report✅ Coverage increased! 🎉
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:jobTitleEligibilityCheckOptionsusesstaleTime: 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 byquery.fetch.setParamsstill only runs when params change, so theuseQuerykey is stable.main. No public API change.Screenshots
N/A
Related Resources
Testing
example/app in a browserjob_title_eligibility🤖 Generated with Claude Code