Bug
In the partner onboarding form, the Legal company name input is made readOnly whenever it has a validation error:
// apps/web/app/(ee)/partners.dub.co/(onboarding)/onboarding/onboarding-form.tsx:259
readOnly={!!partner?.companyName || !!errors.companyName}
{...register("companyName", {
required: profileType === "company",
})}
Since the field is required when profileType === "company", submitting the form with it empty sets errors.companyName, which immediately flips the input to readOnly. The user can no longer type into it, so the error can never be cleared, so Continue can never succeed.
The onboarding form is unrecoverable from that state without a full page reload.
Steps to reproduce
- Go to
partners.dub.co onboarding ("Create your partner profile")
- Set Profile Type to Company
- Leave Legal company name empty and click Continue
- The field now renders with both the red error border and the read-only grey background (
read-only:bg-neutral-100 read-only:text-neutral-500), and rejects all input
- There is no way to proceed. Only a page reload recovers it.
Expected
A required-field validation error should leave the input editable so the user can actually fix it.
Suggested fix
readOnly should only express the "already set, not editable" case:
readOnly={!!partner?.companyName}
Notes
Hit by a real partner signing up to our program. They were fully blocked and assumed the platform was broken. Worth noting the deadlock is easy to fall into, because the natural reading of an empty required field is "click Continue and see what it wants".
Bug
In the partner onboarding form, the Legal company name input is made
readOnlywhenever it has a validation error:Since the field is
requiredwhenprofileType === "company", submitting the form with it empty setserrors.companyName, which immediately flips the input toreadOnly. The user can no longer type into it, so the error can never be cleared, soContinuecan never succeed.The onboarding form is unrecoverable from that state without a full page reload.
Steps to reproduce
partners.dub.coonboarding ("Create your partner profile")read-only:bg-neutral-100 read-only:text-neutral-500), and rejects all inputExpected
A required-field validation error should leave the input editable so the user can actually fix it.
Suggested fix
readOnlyshould only express the "already set, not editable" case:Notes
Hit by a real partner signing up to our program. They were fully blocked and assumed the platform was broken. Worth noting the deadlock is easy to fall into, because the natural reading of an empty required field is "click Continue and see what it wants".