Skip to content

feat(SDK-1120): add contractor address management#2470

Open
dmortal wants to merge 12 commits into
mainfrom
sdk-1120-contractor-address-management
Open

feat(SDK-1120): add contractor address management#2470
dmortal wants to merge 12 commits into
mainfrom
sdk-1120-contractor-address-management

Conversation

@dmortal

@dmortal dmortal commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Contractor Address management surface (mirroring the Contractor Profile management pattern from SDK-1119, #2469): Address, AddressCard, and AddressEditForm, orchestrated via a robot3 state machine.

Stacked on #2469 (SDK-1119) — base branch is sdk-1119-contractor-profile-management, not main. 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 new useContractorAddressSummary hook, with an Edit action
  • AddressEditForm: standalone edit form for street address, city, state, and ZIP — reuses the existing onboarding useContractorAddressForm hook as-is (a contractor always has exactly one address, so both onboarding and management edit the same update-only record)
  • New i18n namespace Contractor.Management.Address, new component events (contractor/management/address/editRequested|updated|editCancelled|alertDismissed), docs regenerated
Screen.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 passing
  • npm run test -- --run (full suite) — 305 test files, 3598 tests passing
  • npx tsc --noEmit -p . and npx eslint src — clean

dmortal and others added 9 commits July 22, 2026 12:53
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}.
…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
dmortal marked this pull request as ready for review July 24, 2026 17:00
@dmortal
dmortal requested a review from a team as a code owner July 24, 2026 17:00
dmortal added 3 commits July 24, 2026 15:48
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.
Same fix as PR #2469's useContractorProfileSummary: it was tagged @public
but never re-exported from src/index.ts, and is only used internally by
AddressCard. Downgrade to @internal to match useStateTaxesSummary.
Base automatically changed from sdk-1119-contractor-profile-management to main July 24, 2026 20:51
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