Skip to content

fix(contractor-of-record) - fix submission contract-details#932

Merged
gabrielseco merged 8 commits intomainfrom
pybr-3711-fix-contractor-of-record-submission
Apr 17, 2026
Merged

fix(contractor-of-record) - fix submission contract-details#932
gabrielseco merged 8 commits intomainfrom
pybr-3711-fix-contractor-of-record-submission

Conversation

@gabrielseco
Copy link
Copy Markdown
Collaborator

@gabrielseco gabrielseco commented Apr 16, 2026

The switcher wasn't implemented correctly as it made the impression that it worked but it wasn't...

Had to fix that to expose a value property, then fix a reference bug on the useEffect, abstracted to implement later in Onboarding for example and also added tests to catch these problems


Note

Medium Risk
Touches core form rendering and change-watching behavior; controlled-prop changes can break existing custom components and subtly affect when checkFieldUpdates fires (now deep-equal based).

Overview
Custom JSF field components are now treated as controlled: JSFCustomComponentProps gains a required value, and both JSONSchemaFormFields and FieldSetField pass value={watch(...)} while keeping setValue(...) callbacks. This fixes UI elements like the Contractor Onboarding Switcher (Tabs) that previously looked selectable but didn’t reliably reflect/persist the current selection.

Contractor Onboarding form state syncing is refactored into a new useJSONSchemaForm hook, replacing the inline watch/useEffect change-detection logic with deep-equality based updates to checkFieldUpdates. Tests for custom components were rewritten/expanded to cover value propagation, updates, accessibility (aria-pressed), and behavior both at root level and inside fieldsets.

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

@gabrielseco
Copy link
Copy Markdown
Collaborator Author

bugbot run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 208.37 kB 208.28 kB +90 B (+0.0%) 🔴
Total (raw) 559.53 kB 559.23 kB +299 B (+0.1%) 🔴
CSS (gzip) 20.11 kB 20.11 kB 0 B (0%) 🟢
CSS (raw) 103.71 kB 103.71 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 208.37 kB / 250 kB (83.3%)
  • ✅ Total raw: 559.53 kB / 600 kB (93.3%)
  • ✅ CSS gzipped: 20.11 kB / 25 kB (80.4%)

Largest Files (Top 5)

  1. chunk-72RFYT5Y.js - 13.83 kB (0 B (0%))
  2. index.css - 10.05 kB (0 B (0%))
  3. styles.css - 10.05 kB (0 B (0%))
  4. index.js - 6.05 kB (-4 B (-0.1%))
  5. chunk-ERY43GUW.js - 5.93 kB (new)
View All Files (310 total)
File Size (gzip) Change
chunk-72RFYT5Y.js 13.83 kB 0 B (0%)
index.css 10.05 kB 0 B (0%)
styles.css 10.05 kB 0 B (0%)
index.js 6.05 kB -4 B (-0.1%)
chunk-ERY43GUW.js 5.93 kB new
chunk-R47Q7R6C.js 5.82 kB 0 B (0%)
chunk-CEIDSIMA.js 4.41 kB new
chunk-4XDQRXEG.js 4.23 kB new
chunk-XXXLKG43.js 4.06 kB 0 B (0%)
chunk-TIJRONPS.js 3.45 kB 0 B (0%)

✅ Bundle size check passed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 89.92% 89.91% 0%
Statements 89.59% 89.58% 0%
Functions 87.47% 87.47% 0%
Branches 79.82% 79.81% +0.01% 🟢

Detailed Breakdown

Lines Coverage
  • Covered: 3585 / 3987
  • Coverage: 89.92%
  • Change: 0% (1 lines)
Statements Coverage
  • Covered: 3648 / 4072
  • Coverage: 89.59%
  • Change: 0% (1 statements)
Functions Coverage
  • Covered: 984 / 1125
  • Coverage: 87.47%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 2227 / 2790
  • Coverage: 79.82%
  • Change: +0.01% (2 branches)

✅ Coverage check passed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Deploy preview for remote-flows-example-app ready!

✅ Preview
https://remote-flows-example-7jgs7mikg-remotecom.vercel.app

Built with commit 40cf630.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Deploy preview for remote-flows ready!

✅ Preview
https://remote-flows-5646arcri-remotecom.vercel.app

Built with commit 40cf630.
This pull request is being automatically deployed with vercel-action

Comment thread src/components/form/fields/FieldSetField.tsx
@gabrielseco gabrielseco marked this pull request as ready for review April 16, 2026 09:50
@gabrielseco
Copy link
Copy Markdown
Collaborator Author

bugbot run

@gabrielseco gabrielseco changed the title fix(contractor-of-record) - fix submissionb fix(contractor-of-record) - fix submission contract-details Apr 16, 2026
Comment thread example/src/ContractorOnboarding.tsx Outdated
Comment thread src/components/form/useJSONSchemaForm.tsx
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3b1a698. Configure here.

Comment thread src/components/form/useJSONSchemaForm.tsx Outdated
@gabrielseco gabrielseco merged commit c17739f into main Apr 17, 2026
11 checks passed
@gabrielseco gabrielseco deleted the pybr-3711-fix-contractor-of-record-submission branch April 17, 2026 10:47
@gabrielseco gabrielseco mentioned this pull request Apr 17, 2026
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.

2 participants