Problem
src/views/EditSystemModal/EditSystemModal.tsx is 1311 lines doing manual form state and validation across 16 useState hooks, while react-hook-form, yup, and @hookform/resolvers all sit in package.json unused for this. Most of the file is exactly the state plumbing those libraries exist to eliminate. The modal also has no test file, so the current hand-rolled validation is unpinned.
Proposal
Adopt react-hook-form with a yup schema; SystemDetailPage/fieldConfig.ts already shows the field-config pattern to reuse for declaring the fields. Sequencing matters: #460 lands the vocabulary-driven validated selects in this same modal, and those should be built on a real form foundation rather than added to the useState pile and migrated later. Do this first or fold them together. Test coverage for the modal is tracked separately but pairs naturally with this rework.
Surfaced in a tech-debt survey ahead of the post-release push.
Problem
src/views/EditSystemModal/EditSystemModal.tsxis 1311 lines doing manual form state and validation across 16useStatehooks, whilereact-hook-form,yup, and@hookform/resolversall sit in package.json unused for this. Most of the file is exactly the state plumbing those libraries exist to eliminate. The modal also has no test file, so the current hand-rolled validation is unpinned.Proposal
Adopt react-hook-form with a yup schema;
SystemDetailPage/fieldConfig.tsalready shows the field-config pattern to reuse for declaring the fields. Sequencing matters: #460 lands the vocabulary-driven validated selects in this same modal, and those should be built on a real form foundation rather than added to the useState pile and migrated later. Do this first or fold them together. Test coverage for the modal is tracked separately but pairs naturally with this rework.Surfaced in a tech-debt survey ahead of the post-release push.