feat(contacts): curated Industry combobox on company form (PMS-582) #391
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-582-company-industry-combobox"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PMS-582 (found in PMS-554 Companies smoke)
Company Industry was free text, producing inconsistent values ("IT" / "I.T." / "Information Technology") that are hard to filter and report on.
Approach (decided): curated combobox + free text
Industry, unlike job titles, is a finite taxonomy, so we standardize toward a curated canonical list. But the field stays free text, so a value outside the list is still accepted for the long tail. This fixes consistency without the rigidity or migration pain of a hard dropdown, and without echoing the existing dirty data (which a pure past-values suggestion would have done).
Change (frontend only)
SuggestInputcomponent (from PMS-583) to accept a curated staticsuggestionslist, filtered client-side as you type, alongside its existing server-sourcedfieldmode. Whensuggestionsis set, no request is made.SuggestInputwith aCOMPANY_INDUSTRIESvocabulary (~29 common industries). Picking one fills the field; typing a custom value is preserved.No migration
Existing free-text values remain valid (free text is still allowed); they are simply not enforced. No data movement, no loss.
Test
Companies -> New/edit -> focus Industry, type "in" -> the canonical list filters (Information Technology, Insurance, ...); click to fill, or type a brand-new industry (kept).
🤖 Generated with Claude Code
The company Industry field was free text, producing inconsistent values ("IT" / "I.T." / "Information Technology") that are hard to filter and report on. Unlike job titles, industry is a finite taxonomy, so we standardize toward a curated canonical list while still allowing free text for the long tail (so existing values are never lost and edge cases work, with no destructive migration). Generalizes the SuggestInput component (PMS-583) to take a curated static `suggestions` list filtered client-side, in addition to its existing server-sourced `field` mode. The Industry field now uses it with a COMPANY_INDUSTRIES vocabulary. Suggestions are the clean canonical options, not the existing dirty data, so this actually fixes consistency rather than echoing it (the reason a pure past-values approach was the wrong fit here). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>