Repository navigation
feat(onboarding): re-run job title check on mount - #1514
Merged
gabrielseco merged 15 commits intoOct 13, 2026
Merged
Conversation
Agree on a written goal before coding: target flow, scope, exact copy, out of scope, open questions and verification claims. The skill waits for approval, then saves the goal to ~/.claude/goals/<project>/<branch>.md so it survives worktree removal and never lands in a PR. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
/goal usually runs on main before a branch exists, so naming the file from the current branch saved every goal as main.md. The draft now proposes a Branch, used for both the goal file and the worktree. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The skill is shared, so pointing at sibling repos under a home folder only works on one machine. Defer to each user's local instructions for counterpart repos, and keep the example gotcha free of internal names. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The check only ran on blur and submit, so returning to contract details after changing the job title showed the verdict saved for the old title until the user clicked Continue. Run it once when the form mounts; the existing guards skip it when no role answers are saved, and the query cache keyed by job title and role answers skips the request when nothing changed within the session. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (291 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 unchanged
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
The flow never refetched the employment after updating basic information, so the job title eligibility check kept sending the old job title after an in-session title change. Refetch before moving on so the employment query stays the single source of truth. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2 tasks
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Start from a saved verdict that shows a statement so the test proves it gets replaced, wait for late duplicates in the remount case, and cover the risk acknowledgement, the disabled submit button and the feature flag on mount. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Type the new title into basic information and continue, with the update handler storing the title it receives, instead of calling the flow's submit directly with a handler that ignored the payload. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Serve basicInformationSchemaV1Portugal instead of a hand-built schema, and render the steps only once the flow has loaded so the form starts from the saved employment. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The update resolves with an error instead of throwing, so the refetch also ran after a failed save. Guard it, and test that a failed update stays on the step without refetching, and that a successful one only moves on once the refetch has finished. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ch settles Replace the 200ms timeout probe with a check that the job title field is still rendered while the post-save employment refetch is pending. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The refetch is awaited before the error callback fires, so a refetch after a failed update is already counted by the time onError is called. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t-step' into feat/onboarding-job-title-eligibility-on-mount
cammellos
approved these changes
Oct 13, 2026
gabrielseco
deleted the
feat/onboarding-job-title-eligibility-on-mount
branch
October 13, 2026 11:23
Merged
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
When an employer comes back to the contract details step after changing the job title, the job title eligibility check now runs right away. The statement they see then matches the current job title, not the verdict saved for the old one.
Why
What changed
Toggle details
OnboardingForm.tsx: one line. The existing mount effect also runs the check. The existing guards still apply: the feature must be on, the schema must have the check field, and every role answer must be filled and valid. A fresh employment with no answers makes no request.hooks.tsx: JSDoc only oncheckJobTitleEligibility. A custom UI should also call it when the step mounts. Public API: documentation change, no signature change.Screenshots
N/A. Screenshots come with the partners verification below.
Related Resources
mainonce it merges.Testing
Partners verification is pending. Planned on
.env.partnerswith a seeded USA employment:job_title: "Surgeon"and the statement changes, with no blur or click.example/app in a browserjob_title_eligibility🤖 Generated with Claude Code
Note
Medium Risk
Changes onboarding submit/refetch and eligibility timing; incorrect behavior could show wrong hiring statements or advance with stale employment data, though failed PATCH paths are guarded.
Overview
Re-runs job title eligibility when the onboarding form mounts with an existing employment, so contract details no longer show a verdict tied to an outdated job title after the employer edits basic information and returns.
The prebuilt
OnboardingFormmount effect now callssyncJobTitleEligibility(same guards as blur/submit: feature on, complete role fields). Successful basic information PATCH responses triggerrefetchEmployment()so the check uses the latest saved job title; failed updates stay on the step without an extra GET.checkJobTitleEligibilityJSDoc notes that custom UIs should run the check on mount too.Tests cover mount-time checks (including after a same-session title change), no duplicate requests on remount, submit disabled during the mount check, and no refetch on failed basic-info PATCH.
Reviewed by Cursor Bugbot for commit 67c17e3. Bugbot is set up for automated code reviews on this repo. Configure here.