Organization editor can submit the previous name after the input is changed or cleared
When editing an existing organization name, the visible text can differ from the value submitted by the form. Typing a different name that has autocomplete suggestions, without selecting a suggestion, still submits the original organization. Clearing the input also submits the original organization instead of triggering the required-field validation.
Reproduction on main at d709b1898549c5ab4091302a4c26f45bbe198c66:
- Edit an existing organization entry (for example
Original Org) with valid start/end dates.
- Replace its name with
New Org, which has a matching suggestion, but do not click the suggestion.
- Click Confirm. The
modifyUserOrgs variables still contain orgName: "Original Org", even though the input shows New Org.
- In a fresh edit, clear the name and click Confirm. The same old name is submitted, with no required-field error.
- As a control, clicking the
New Org suggestion before confirming submits New Org correctly.
Expected: the form value tracks the visible input. A nonempty name should be submitted as entered (or explicitly rejected if invalid); an empty required name should prevent submission. Suggestion loading/results should not determine whether the form notices a text edit.
OrgInput.tsx currently updates only its local keyword on typing. It calls the parent onChange only after a search returns zero suggestions or when a suggestion is clicked. Thus Ant Design's form retains the previous value while the visible input changes. The same shared input is used by the organization editing forms.
Verified with actual OrgEdit, OrgInput, DateRangePicker, Ant Design Form/Input/RangePicker, Compass Button, generated GraphQL query/mutation hooks, and React Query in Chromium, in both English and Chinese. The GraphQL client transport was replaced with deterministic synthetic responses and captured mutation variables locally; no real profile or backend was contacted. In all four failure cases (two cases × two languages), the old name was submitted. Both suggestion-selection controls submitted the selected name, with no page errors.
Historical #305 introduced this input; #306 only adjusted its spinner placement. Existing #432 changes logging in the parent forms and does not address input/form synchronization.
Organization editor can submit the previous name after the input is changed or cleared
When editing an existing organization name, the visible text can differ from the value submitted by the form. Typing a different name that has autocomplete suggestions, without selecting a suggestion, still submits the original organization. Clearing the input also submits the original organization instead of triggering the required-field validation.
Reproduction on
mainatd709b1898549c5ab4091302a4c26f45bbe198c66:Original Org) with valid start/end dates.New Org, which has a matching suggestion, but do not click the suggestion.modifyUserOrgsvariables still containorgName: "Original Org", even though the input showsNew Org.New Orgsuggestion before confirming submitsNew Orgcorrectly.Expected: the form value tracks the visible input. A nonempty name should be submitted as entered (or explicitly rejected if invalid); an empty required name should prevent submission. Suggestion loading/results should not determine whether the form notices a text edit.
OrgInput.tsxcurrently updates only its localkeywordon typing. It calls the parentonChangeonly after a search returns zero suggestions or when a suggestion is clicked. Thus Ant Design's form retains the previous value while the visible input changes. The same shared input is used by the organization editing forms.Verified with actual
OrgEdit,OrgInput,DateRangePicker, Ant Design Form/Input/RangePicker, Compass Button, generated GraphQL query/mutation hooks, and React Query in Chromium, in both English and Chinese. The GraphQL client transport was replaced with deterministic synthetic responses and captured mutation variables locally; no real profile or backend was contacted. In all four failure cases (two cases × two languages), the old name was submitted. Both suggestion-selection controls submitted the selected name, with no page errors.Historical #305 introduced this input; #306 only adjusted its spinner placement. Existing #432 changes logging in the parent forms and does not address input/form synchronization.