Skip to content

feat(onboarding): build high-tier contract details once - #1507

Merged
gabrielseco merged 3 commits into
mainfrom
feat/jsf-v1-contract-details-high-tier
Oct 13, 2026
Merged

gabrielseco merged 3 commits into
mainfrom
feat/jsf-v1-contract-details-high-tier

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Contract details for Canada, the United Kingdom, India, the Philippines and the United States now use the newer form engine that builds the form once, like France, Italy, Germany and Spain already do.

Why

We're moving contract details onto the build-once path country by country, starting with the countries the embedded integration uses most. These five are the high tier in scripts/reports/embedded-integration-country-tiers.json.

The rollout covers five countries a week in two steps:

  1. Week N: bump the example app's contract_details pin to latest.
  2. Week N+1: move those countries onto the build-once path.

This PR is the build-once step for the high tier. It's kept separate from the version bumps so either one can be reverted on its own.

What changed

Toggle details
  • src/flows/Onboarding/utils.ts: adds CAN, GBR, IND, PHL, USA to JSF_V1_CONTRACT_DETAILS_COUNTRIES. usesJsfV1ContractDetails now routes these countries to useContractDetailsSchema instead of the legacy contract details path.
  • src/flows/Onboarding/tests/utils.test.ts: covers the five new countries.

No public API change. The list is internal.

Example app pins compared with tiger's latest, as of 2026-10-12:

Country Example pin Latest
CAN 7 7
GBR 6 6
IND 6 6
PHL 6 6
USA 8 8

All five are on latest. The version bumps for CAN, IND, PHL and USA have merged into main, so this PR moves them onto the build-once path against their latest schemas.

Screenshots

N/A

Related Resources

Testing

  • Tested against the example/ app in a browser (contract details step for each of CAN, GBR, IND, PHL, USA)
    • CAN, GBR, PHL and USA on partners. IND on sandbox, because creating an IND employment on partners returns a 500.
    • For each country, on a freshly seeded employment:
      • Submitting the empty form shows the required-field errors.
      • Filling the form in the UI and submitting saves it (PATCH 200) and moves on to Benefits.
      • The saved contract_details match what was sent.
      • After a reload the form shows the saved values with no errors.
      • Submitting again sends the same payload.
    • Salary amounts are sent in cents: typing 85,000 sends 8500000.
  • Feature flag: N/A

🤖 Generated with Claude Code


Note

Medium Risk
Switches contract-details form strategy for five production countries, affecting money handling and conditional-field behavior; rollout assumes schema version pins are bumped separately first.

Overview
Onboarding contract details for Canada, UK, India, Philippines, and the US now follow the same build-once path as France, Italy, Germany, and Spain, by extending JSF_V1_CONTRACT_DETAILS_COUNTRIES in utils.ts so usesJsfV1ContractDetails / getContractDetailsStrategy return buildOnce instead of the legacy rebuild hook.

Unit tests assert those five codes are treated as jsf v1. The headless-form rollout doc is updated to record the high-tier migration (#1507) and the phased country move off useLegacyContractDetailsSchema.

Reviewed by Cursor Bugbot for commit 17b6ed7. Bugbot is set up for automated code reviews on this repo. Configure here.

Move CAN, GBR, IND, PHL and USA contract details onto the jsf v1
path (useContractDetailsSchema, built once with useHeadlessForm).
These are the high-tier countries for the embedded integration.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 230.5 kB 230.47 kB +24 B (+0.0%) 🔴
Total (raw) 641.96 kB 641.93 kB +30 B (+0.0%) 🔴
CSS (gzip) 21.94 kB 21.94 kB 0 B (0%) 🟢
CSS (raw) 114.43 kB 114.43 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 230.5 kB / 350 kB (65.9%)
  • ✅ Total raw: 641.96 kB / 850 kB (75.5%)
  • ✅ CSS gzipped: 21.94 kB / 25 kB (87.8%)

Largest Files (Top 5)

  1. index.esm-wIkXrqU6.js - 11.4 kB (0 B (0%))
  2. styles.css - 10.97 kB (0 B (0%))
  3. index.css - 10.97 kB (0 B (0%))
  4. internals-D6148AAY.js - 6.13 kB (0 B (0%))
  5. hooks-ThU7CDLI.js - 5.85 kB (0 B (0%))
View All Files (291 total)
File Size (gzip) Change
index.esm-wIkXrqU6.js 11.4 kB 0 B (0%)
styles.css 10.97 kB 0 B (0%)
index.css 10.97 kB 0 B (0%)
internals-D6148AAY.js 6.13 kB 0 B (0%)
hooks-ThU7CDLI.js 5.85 kB 0 B (0%)
sdk.gen-BRPiw4M1.js 5.58 kB 0 B (0%)
index.js 5.51 kB 0 B (0%)
flows/Onboarding/hooks.js 4.65 kB 0 B (0%)
utils-CUgvJHl4.js 4.07 kB 0 B (0%)
FieldSetField-QbfQb5Lp.js 4.04 kB 0 B (0%)

✅ Bundle size check passed

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-hb4dc7y83-remotecom.vercel.app
Latest Commit:17b6ed7

Deployed with vercel-action

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-6ubxw5kl7-remotecom.vercel.app
Latest Commit:17b6ed7

Deployed with vercel-action

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚪ Coverage unchanged

Metric Current Previous Change Status
Lines 89.53% 89.53% 0% ⚪
Statements 89.40% 89.40% 0% ⚪
Functions 88.41% 88.41% 0% ⚪
Branches 81.14% 81.14% 0% ⚪

Detailed Breakdown

Lines Coverage
  • Covered: 5385 / 6015
  • Coverage: 89.53%
  • Change: 0% (0 lines)
Statements Coverage
  • Covered: 5450 / 6096
  • Coverage: 89.40%
  • Change: 0% (0 statements)
Functions Coverage
  • Covered: 1426 / 1613
  • Coverage: 88.41%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 3339 / 4115
  • Coverage: 81.14%
  • Change: 0% (0 branches)

✅ Coverage check passed

@remotecom remotecom assigned remotecom and gabrielseco and unassigned remotecom Oct 12, 2026
@gabrielseco
gabrielseco merged commit d7896fc into main Oct 13, 2026
16 checks passed
@gabrielseco
gabrielseco deleted the feat/jsf-v1-contract-details-high-tier branch October 13, 2026 11:15
@gabrielseco gabrielseco mentioned this pull request Oct 13, 2026
gabrielseco added a commit that referenced this pull request Oct 15, 2026
* feat(onboarding): build medium-tier contract details once

Moves POL, NGA, IRL, SWE and NLD onto the jsf v1 build-once path, like #1507 did for the high tier.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* update countries

* docs(headless-form): record medium tier and extra countries in rollout doc

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

4 participants