Skip to content

pbyr-4653/chore(jsf) - move local json schema for Termination, ContractorOnboarding and CreateCompany to v1 - #1271

Merged
jordividaller merged 1 commit into
mainfrom
chore/jsf-v1-termination-contractor-onboarding-create-company
Sep 4, 2026
Merged

pbyr-4653/chore(jsf) - move local json schema for Termination, ContractorOnboarding and CreateCompany to v1 #1271
jordividaller merged 1 commit into
mainfrom
chore/jsf-v1-termination-contractor-onboarding-create-company

Conversation

@jordividaller

@jordividaller jordividaller commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

What

Declare x-rmt-meta: { jsfVersion: '1' } on the static JSON schemas of three flows,
so they render and validate with json-schema-form v1 instead of the v0 fallback:

  • Termination/json-schemas (6 files, including the allOf conditionals)
  • ContractorOnboarding/json-schemas (5 files)
  • CreateCompany/json-schemas/companyBasicInformationStep.ts

The stamp is placed on the object that is actually handed to createHeadlessForm,
so it survives the derived schemas built at runtime (currency injection in
createInvoiceSchedule, the composed Termination/jsonSchema).

Why

Step towards the full v1 migration. The form kit stays pinned at 0.0.23, where a
schema without an explicit x-rmt-meta still falls back to v0 — so every other flow
is untouched and this can land on its own, ahead of the kit bump.

Out of scope

Onboarding/json-schemas/selectCountryStep stays on v0 until the select-country
issue is fixed. It is shared, so the ContractorOnboarding select-country step and
PayrollAdminOnboarding stay on v0 too.

Testing

  • Full suite green (88 files / 866 tests), type-check, lint and format clean.
  • Verified through the kit's getMetaVersion that all 12 schemas — plus the derived
    createInvoiceSchedule variant — resolve to v1.
  • Manual QA in example/ on the three flows: validation errors, conditional fields,
    coercion of number, money and checkbox values, and error messages.

Note

Medium Risk
Behavior of validation, conditionals, and field coercion can differ between JSF v0 and v1 on employee termination and onboarding forms, even though the diff is metadata-only.

Overview
Adds x-rmt-meta: { jsfVersion: '1' } to the root schema object passed into the form kit for Termination (step schemas plus the composed jsonSchema), ContractorOnboarding (five step schemas, including createInvoiceSchedule so runtime currency injection keeps v1), and CreateCompany (companyBasicInformationStep).

Those flows opt out of the v0 default while the kit stays on 0.0.23; other flows without the stamp are unchanged. This is an incremental step toward a full v1 migration, not a dependency bump.

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

… static schemas to v1

Declare `x-rmt-meta: { jsfVersion: '1' }` on the static schemas of these
three flows so they run on json-schema-form v1 instead of the v0 fallback.

The form kit stays pinned at 0.0.23, where a schema without an explicit
`x-rmt-meta` still falls back to v0, so every other flow is unaffected.

Onboarding/selectCountryStep keeps the v0 fallback until the select-country
issue is fixed, which also leaves the ContractorOnboarding select-country
step and PayrollAdminOnboarding on v0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jordividaller

Copy link
Copy Markdown
Collaborator Author

All concerned flows has been manually tested to be sure we do not have regression.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 259.38 kB 259.19 kB +196 B (+0.1%) 🔴
Total (raw) 693.99 kB 693.63 kB +360 B (+0.1%) 🔴
CSS (gzip) 21.69 kB 21.69 kB 0 B (0%) 🟢
CSS (raw) 112.77 kB 112.77 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 259.38 kB / 350 kB (74.1%)
  • ✅ Total raw: 693.99 kB / 850 kB (81.6%)
  • ✅ CSS gzipped: 21.69 kB / 25 kB (86.8%)

Largest Files (Top 5)

  1. chunk-AUPAAQUT.js - 14 kB (0 B (0%))
  2. styles.css - 10.85 kB (0 B (0%))
  3. index.css - 10.85 kB (0 B (0%))
  4. index.js - 6.79 kB (-5 B (-0.1%))
  5. chunk-KDHFTLCW.js - 6.58 kB (0 B (0%))
View All Files (421 total)
File Size (gzip) Change
chunk-AUPAAQUT.js 14 kB 0 B (0%)
styles.css 10.85 kB 0 B (0%)
index.css 10.85 kB 0 B (0%)
index.js 6.79 kB -5 B (-0.1%)
chunk-KDHFTLCW.js 6.58 kB 0 B (0%)
chunk-D6G3ZRDQ.js 6.43 kB 0 B (0%)
chunk-3XMYSJ4Q.js 5.82 kB new
chunk-C4HFMTSB.js 5.33 kB 0 B (0%)
chunk-P2YLLK6M.js 4.65 kB 0 B (0%)
chunk-MKOMDNWM.js 4.22 kB 0 B (0%)

✅ Bundle size check passed

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚪ Coverage unchanged

Metric Current Previous Change Status
Lines 85.48% 85.48% 0%
Statements 85.04% 85.04% 0%
Functions 83.70% 83.70% 0%
Branches 76.89% 76.89% 0%

Detailed Breakdown

Lines Coverage
  • Covered: 4355 / 5095
  • Coverage: 85.48%
  • Change: 0% (0 lines)
Statements Coverage
  • Covered: 4428 / 5207
  • Coverage: 85.04%
  • Change: 0% (0 statements)
Functions Coverage
  • Covered: 1155 / 1380
  • Coverage: 83.70%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 2699 / 3510
  • Coverage: 76.89%
  • Change: 0% (0 branches)

✅ Coverage check passed

@github-actions

github-actions Bot commented Sep 1, 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-ne5lzijba-remotecom.vercel.app
Latest Commit:48669c4

Deployed with vercel-action

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-dvo17rf3z-remotecom.vercel.app
Latest Commit:48669c4

Deployed with vercel-action

@jordividaller
jordividaller merged commit d0dffef into main Sep 4, 2026
11 checks passed
@jordividaller
jordividaller deleted the chore/jsf-v1-termination-contractor-onboarding-create-company branch September 4, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants