feat(SDK-1120): add contractor address management#2470
Open
dmortal wants to merge 12 commits into
Open
Conversation
New events back the management ContractorProfile card and edit form's edit/save/cancel/alert-dismiss transitions.
Adds useContractorProfileSummary, a read-only hook for the upcoming management ProfileCard, mirroring useEmployeeProfileSummary. Extends the existing useContractorDetailsForm with a showEmailField option so a management edit form can always show Email regardless of the selfOnboarding toggle state, which previously gated Email's visibility.
Adds a management surface for viewing and editing a contractor's basic
profile details after onboarding, mirroring Employee/Profile/management's
card + edit-form + state-machine structure. The edit form renders an
already-on-file SSN/EIN as a locked, masked value with a "Change" action
per the design prototype, instead of a blank editable input. Exported as
ContractorManagement.{Profile, ProfileCard, ProfileEditForm}.
…rofile-management
…actor profile ProfileCard and ProfileEditForm rendered a literal "XX-XXXXXXX" placeholder for a business contractor's EIN instead of the partially-masked value the API actually returns (e.g. "XX-XXX4879"). SSN keeps its hardcoded mask since the Contractor model has no equivalent real SSN value field.
…rofile-management # Conflicts: # docs/reference/index.mdx
Adds a Contractor Address management surface (Address, AddressCard, AddressEditForm) mirroring the Contractor Profile management pattern from SDK-1119: a read-view card plus edit form driven by a robot3 state machine, reusing the existing useContractorAddressForm onboarding hook and a new lightweight useContractorAddressSummary read hook. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rototype Match sdk-app/src/design/components/contractor/management/ContractorAddress: the card shows a static "Address" title with a postal-block address display instead of per-field labels, and the edit form uses an "Edit address" heading plus a description naming the contractor and address type. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dmortal
marked this pull request as ready for review
July 24, 2026 17:00
The hook was tagged @public but never re-exported from src/index.ts, so it was unreachable as advertised. It's only ever used internally by ProfileCard, matching the same read-only-summary-hook shape as the existing @internal useStateTaxesSummary — downgrade the tags to match rather than wire up a top-level export nothing currently needs.
…ontractor-address-management
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
Adds a Contractor Address management surface (mirroring the Contractor Profile management pattern from SDK-1119, #2469):
Address,AddressCard, andAddressEditForm, orchestrated via arobot3state machine.Stacked on #2469 (SDK-1119) — base branch is
sdk-1119-contractor-profile-management, notmain. The diff here is limited to the Address management additions; merge #2469 first, then retarget/merge this one.Changes
Address: orchestrator driving the read-view card and edit form via an internal state machine (card/editAddress)AddressCard: standalone read-only card fetching its own data via a newuseContractorAddressSummaryhook, with an Edit actionAddressEditForm: standalone edit form for street address, city, state, and ZIP — reuses the existing onboardinguseContractorAddressFormhook as-is (a contractor always has exactly one address, so both onboarding and management edit the same update-only record)Contractor.Management.Address, new component events (contractor/management/address/editRequested|updated|editCancelled|alertDismissed), docs regeneratedScreen.Recording.2026-07-24.at.1.13.00.PM.mov
Related
Testing
npm run test -- --run src/components/Contractor/Address— 6 test files, 48 tests passingnpm run test -- --run(full suite) — 305 test files, 3598 tests passingnpx tsc --noEmit -p .andnpx eslint src— clean