feat(contacts): curated Industry combobox on company form (PMS-582) #391

Merged
longjacksonle merged 1 commit from feat/PMS-582-company-industry-combobox into main 2026-06-30 18:42:16 +02:00

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)

  • Generalizes the SuggestInput component (from PMS-583) to accept a curated static suggestions list, filtered client-side as you type, alongside its existing server-sourced field mode. When suggestions is set, no request is made.
  • The company form's Industry field now uses SuggestInput with a COMPANY_INDUSTRIES vocabulary (~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

## 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) - Generalizes the `SuggestInput` component (from PMS-583) to accept a curated static `suggestions` list, filtered client-side as you type, alongside its existing server-sourced `field` mode. When `suggestions` is set, no request is made. - The company form's Industry field now uses `SuggestInput` with a `COMPANY_INDUSTRIES` vocabulary (~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](https://claude.com/claude-code)
feat(contacts): curated Industry combobox on company form (PMS-582)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 10m12s
Create release / Create release from merged PR (pull_request) Has been skipped
cbb7f9ef70
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>
longjacksonle deleted branch feat/PMS-582-company-industry-combobox 2026-06-30 18:42:17 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!391
No description provided.