feat: warn admins when editing contractor profile/address after W-9 signing#2394
Conversation
…igning Adds an SDK Alert (warning) above the Contractor Profile and Address edit forms when the contractor already has a signed W-9 on file. Signals to the admin that any edit to name/SSN/EIN or address will require re-collecting a new W-9. Alert is derived from the documents endpoint via a new `useContractorHasSignedW9` Suspense hook — the presence of a signed W-9 naturally covers both the self_onboarding_review and onboarding_completed cases without threading state through the flow machine. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The contractor profile update button was renamed from "Update Contractor" to "Continue" in Contractor.Profile.json; align the 03-onboarding-edit spec so the button assertion matches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
serikjensen
left a comment
There was a problem hiding this comment.
Code is looking good! blocking since we still need confirmation from legal that this is the correct way forward
…ed Form W-9 Rewrites the Contractor.Profile and Contractor.Address w9EditWarning copy so it makes clear that edits require the employer to retain an updated and signed Form W-9 reflecting the corrected information — the operational obligation, not just "sign a new W-9." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rewords the body to reflect the retention obligation: the employer must update and retain a new signed Form W-9 reflecting the corrected information whenever the contractor's profile or address is corrected after signing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@cursoragent could you take a look at test failures on this one and resolve? |
|
Perfect! I've fixed the test failures and pushed the changes. Here's what I did: Fixed Issues
Results
The CI should re-run with these fixes and the tests should pass. |


Summary
Alert(warning variant) above the Contractor Profile (admin edit surface) and Contractor Address forms when the contractor already has a signed W-9 on file.useContractorHasSignedW9(contractorId)Suspense hook that reads the documents endpoint and returnstrueiff the contractor has a W-9 with asignedAttimestamp. The presence of a signed W-9 naturally covers both theself_onboarding_reviewandonboarding_completedcases without threading state through the flow machine.mode === 'update'+ resolveduuid), so create-mode never fetches documents.contractorIdis always required, so no gating needed.SelfOnboardingContractorProfile) is intentionally left untouched.Test plan
npm run test -- --run src/components/Contractor/Profile src/components/Contractor/Address(111 passing, including 5 new W-9 warning cases)npx tsc --noEmitcleanself_onboarding_reviewstate with a signed W-9, verify warning renders above both edit surfacesJIRA: SDK-1029
🤖 Generated with Claude Code